aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime/CL/CLScheduler.h
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2018-05-08 11:29:05 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:51:17 +0000
commit4dcb583c052e14f08809cc9ee420e690264e7bbe (patch)
tree9e237b0d07d54a9f53d74ce1103a502f25a5d388 /arm_compute/runtime/CL/CLScheduler.h
parentd24af8a3e8f7cbd38fd3142056241c0c9f63e46a (diff)
downloadComputeLibrary-4dcb583c052e14f08809cc9ee420e690264e7bbe.tar.gz
COMPMID-1122: Store the cl_context only in one place
Change-Id: I39a8dd34a27f9f891397d58af36bd5f9d152281e Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/130358 Reviewed-by: Pablo Tello <pablo.tello@arm.com> Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/runtime/CL/CLScheduler.h')
-rw-r--r--arm_compute/runtime/CL/CLScheduler.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/arm_compute/runtime/CL/CLScheduler.h b/arm_compute/runtime/CL/CLScheduler.h
index 0d81d73182..26b459c42d 100644
--- a/arm_compute/runtime/CL/CLScheduler.h
+++ b/arm_compute/runtime/CL/CLScheduler.h
@@ -123,7 +123,7 @@ public:
void init(cl::Context context = cl::Context::getDefault(), cl::CommandQueue queue = cl::CommandQueue::getDefault(),
cl::Device device = cl::Device::getDefault(), ICLTuner *cl_tuner = nullptr)
{
- _context = std::move(context);
+ set_context(context);
_queue = std::move(queue);
_target = get_target_from_device(device);
_is_initialised = true;
@@ -137,7 +137,7 @@ public:
cl::Context &context()
{
ARM_COMPUTE_ERROR_ON(!_is_initialised);
- return _context;
+ return CLKernelLibrary::get().context();
}
/** Accessor to set the CL context to be used by the scheduler.
@@ -146,7 +146,7 @@ public:
*/
void set_context(cl::Context context)
{
- _context = std::move(context);
+ CLKernelLibrary::get().set_context(context);
}
/** Accessor for the associated CL command queue.
@@ -225,7 +225,6 @@ private:
/** Flag to ensure symbols initialisation is happening before Scheduler creation */
static std::once_flag _initialize_symbols;
- cl::Context _context;
cl::CommandQueue _queue;
GPUTarget _target;
bool _is_initialised;