diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2019-10-25 18:25:17 +0100 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2019-11-01 17:26:05 +0000 |
commit | 7ae80a928564eba96c4fef0b91b1c50e1647fb8d (patch) | |
tree | 18a6a38e9d61f09f46cc08ba231802eb4519b846 /src/core/GLES_COMPUTE/GCHelpers.cpp | |
parent | bfd75d64b99342a6cb46380f7173c39026ed7ea2 (diff) | |
download | ComputeLibrary-7ae80a928564eba96c4fef0b91b1c50e1647fb8d.tar.gz |
COMPMID-2549: Add GLES Runtime Context interfaces.
* Creates interfaces and concrete classes
* Ports GCActivationalLayer
* Adapts test framework and relevant tests
Change-Id: Ide36cd65ebf185958db3c4a5bebd630fcb2f39b3
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Reviewed-on: https://review.mlplatform.org/c/2199
Reviewed-by: Pablo Marquez <pablo.tello@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/GLES_COMPUTE/GCHelpers.cpp')
-rw-r--r-- | src/core/GLES_COMPUTE/GCHelpers.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/core/GLES_COMPUTE/GCHelpers.cpp b/src/core/GLES_COMPUTE/GCHelpers.cpp index 8970688ca7..b9740071a5 100644 --- a/src/core/GLES_COMPUTE/GCHelpers.cpp +++ b/src/core/GLES_COMPUTE/GCHelpers.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 ARM Limited. + * Copyright (c) 2018-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -23,6 +23,8 @@ */ #include "arm_compute/core/GLES_COMPUTE/GCHelpers.h" +#include "arm_compute/core/GLES_COMPUTE/GCCoreRuntimeContext.h" + namespace arm_compute { GPUTarget get_target_from_device() @@ -31,4 +33,18 @@ GPUTarget get_target_from_device() return get_target_from_name(device_name); } + +GCKernel create_opengl_kernel(GCCoreRuntimeContext *ctx, const std::string &kernel_name, const std::set<std::string> &build_opts) +{ + if(ctx && ctx->kernel_library()) + { + // New api going through the core context + return ctx->kernel_library()->create_kernel(kernel_name, build_opts); + } + else + { + // Legacy code through the singleton + return GCKernelLibrary::get().create_kernel(kernel_name, build_opts); + } +} } // namespace arm_compute |