MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / AclCreateContext

Function AclCreateContext

src/c/AclContext.cpp:79–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77} // namespace
78
79extern "C" AclStatus AclCreateContext(AclContext *external_ctx, AclTarget target, const AclContextOptions *options)
80{
81 if (!is_target_valid(target))
82 {
83 ARM_COMPUTE_LOG_ERROR_WITH_FUNCNAME_ACL("Target is invalid!");
84 return AclUnsupportedTarget;
85 }
86
87 if (options != nullptr && !are_context_options_valid(options))
88 {
89 ARM_COMPUTE_LOG_ERROR_WITH_FUNCNAME_ACL("Context options are invalid!");
90 return AclInvalidArgument;
91 }
92
93 auto ctx = create_context(target, options);
94 if (ctx == nullptr)
95 {
96 ARM_COMPUTE_LOG_ERROR_WITH_FUNCNAME_ACL("Couldn't allocate internal resources for context creation!");
97 return AclOutOfMemory;
98 }
99 *external_ctx = ctx;
100
101 return AclSuccess;
102}
103
104extern "C" AclStatus AclDestroyContext(AclContext external_ctx)
105{

Callers 5

ContextMethod · 0.85
TEST_CASEFunction · 0.85
setupMethod · 0.85
setupMethod · 0.85
setupMethod · 0.85

Calls 3

is_target_validFunction · 0.85
create_contextFunction · 0.85

Tested by

no test coverage detected