30 #ifdef ARM_COMPUTE_CPU_ENABLED 34 #ifdef ARM_COMPUTE_OPENCL_ENABLED 40 template <
typename ContextType>
43 return new(std::nothrow) ContextType(options);
63 #ifdef ARM_COMPUTE_CPU_ENABLED 65 return create_backend_ctx<arm_compute::cpu::CpuContext>(options);
67 #ifdef ARM_COMPUTE_OPENCL_ENABLED 69 return create_backend_ctx<arm_compute::gpu::opencl::ClContext>(options);
82 if(!is_target_valid(target))
88 if(options !=
nullptr && !are_context_options_valid(options))
94 auto acl_ctx = create_context(target, options);
122 return utils::as_cenum<AclStatus>(status);
#define ARM_COMPUTE_RETURN_CENUM_ON_FAILURE(status)
AclStatus AclCreateContext(AclContext *ctx, AclTarget target, const AclContextOptions *options)
__cplusplus
AclStatus AclDestroyContext(AclContext external_ctx)
Destroy a given context object.
StatusCode validate_internal_context(const IContext *ctx)
Check if an internal context is valid.
Copyright (c) 2017-2021 Arm Limited.
AclExecutionMode mode
Execution mode to use.
Call failed as invalid argument was passed.
Call failed as an invalid backend was requested.
Cpu target that uses SIMD extensions.
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
int refcount() const
Reference counter accessor.
Call succeeded, leading to valid state for all involved objects/data.
bool is_in(E check, std::initializer_list< E > list)
Check if the given value is in the given enum value list.
Call failed due to failure to allocate resources.
#define ARM_COMPUTE_ASSERT_NOT_NULLPTR(ptr)
#define ARM_COMPUTE_LOG_ERROR_WITH_FUNCNAME_ACL(msg)
Log an error message to the logger with function name before the message.
IContext * get_internal(AclContext ctx)
Extract internal representation of a Context.