diff options
author | Pablo Tello <pablo.tello@arm.com> | 2019-09-24 11:03:47 +0100 |
---|---|---|
committer | Pablo Marquez <pablo.tello@arm.com> | 2019-10-15 14:05:55 +0000 |
commit | db8485ac24135f17e9882c76196924435abc064f (patch) | |
tree | dfe4ff6a50012ac93c6b1cf3fb29c099a7592522 /arm_compute/runtime/CL/ICLSimpleFunction.h | |
parent | a046e164b96a8441b2fa14ef578f7db46a0e97da (diff) | |
download | ComputeLibrary-db8485ac24135f17e9882c76196924435abc064f.tar.gz |
COMPMID-2205: CL runtime context.
CL Interfaces implemented.
Concrete classes implemented.
One test (ActivationLayer) ported to the new interface.
Change-Id: I283808bec36ccfc2f13fe048c45cbbee698ce525
Signed-off-by: Pablo Tello <pablo.tello@arm.com>
Reviewed-on: https://review.mlplatform.org/c/1998
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/runtime/CL/ICLSimpleFunction.h')
-rw-r--r-- | arm_compute/runtime/CL/ICLSimpleFunction.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/arm_compute/runtime/CL/ICLSimpleFunction.h b/arm_compute/runtime/CL/ICLSimpleFunction.h index 130c58a98c..8399a3d58e 100644 --- a/arm_compute/runtime/CL/ICLSimpleFunction.h +++ b/arm_compute/runtime/CL/ICLSimpleFunction.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -32,12 +32,25 @@ namespace arm_compute { +class CLRuntimeContext; /** Basic interface for functions which have a single OpenCL kernel */ class ICLSimpleFunction : public IFunction { public: - /** Default constructor */ - ICLSimpleFunction(); + /** Constructor + * + * @param[in] ctx Runtime context to be used by the function + */ + ICLSimpleFunction(CLRuntimeContext *ctx = nullptr); + + /** Prevent instances of this class from being copied (As this class contains pointers) */ + ICLSimpleFunction(const ICLSimpleFunction &) = delete; + /** Default move constructor */ + ICLSimpleFunction(ICLSimpleFunction &&) = default; + /** Prevent instances of this class from being copied (As this class contains pointers) */ + ICLSimpleFunction &operator=(const ICLSimpleFunction &) = delete; + /** Default move assignment operator */ + ICLSimpleFunction &operator=(ICLSimpleFunction &&) = default; // Inherited methods overridden: void run() override final; @@ -45,6 +58,7 @@ public: protected: std::unique_ptr<ICLKernel> _kernel; /**< Kernel to run */ CLFillBorderKernel _border_handler; /**< Kernel to handle borders */ + CLRuntimeContext *_ctx; /**< Context to use */ }; } #endif /*__ARM_COMPUTE_ICLSIMPLEFUNCTION_H__ */ |