| 56 | } |
| 57 | |
| 58 | arm_compute::IContext *create_context(AclTarget target, const AclContextOptions *options) |
| 59 | { |
| 60 | ARM_COMPUTE_UNUSED(options); |
| 61 | |
| 62 | switch (target) |
| 63 | { |
| 64 | #ifdef ARM_COMPUTE_CPU_ENABLED |
| 65 | case AclCpu: |
| 66 | return create_backend_ctx<arm_compute::cpu::CpuContext>(options); |
| 67 | #endif /* ARM_COMPUTE_CPU_ENABLED */ |
| 68 | #ifdef ARM_COMPUTE_OPENCL_ENABLED |
| 69 | case AclGpuOcl: |
| 70 | return create_backend_ctx<arm_compute::gpu::opencl::ClContext>(options); |
| 71 | #endif /* ARM_COMPUTE_OPENCL_ENABLED */ |
| 72 | default: |
| 73 | return nullptr; |
| 74 | } |
| 75 | return nullptr; |
| 76 | } |
| 77 | } // namespace |
| 78 | |
| 79 | extern "C" AclStatus AclCreateContext(AclContext *external_ctx, AclTarget target, const AclContextOptions *options) |