aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/CL
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2019-10-25 18:25:17 +0100
committerGeorgios Pinitas <georgios.pinitas@arm.com>2019-11-01 17:26:05 +0000
commit7ae80a928564eba96c4fef0b91b1c50e1647fb8d (patch)
tree18a6a38e9d61f09f46cc08ba231802eb4519b846 /arm_compute/core/CL
parentbfd75d64b99342a6cb46380f7173c39026ed7ea2 (diff)
downloadComputeLibrary-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 'arm_compute/core/CL')
-rw-r--r--arm_compute/core/CL/CLCoreRuntimeContext.h20
-rw-r--r--arm_compute/core/CL/CLHelpers.h2
-rw-r--r--arm_compute/core/CL/CLKernelLibrary.h2
-rw-r--r--arm_compute/core/CL/OpenCL.h6
4 files changed, 23 insertions, 7 deletions
diff --git a/arm_compute/core/CL/CLCoreRuntimeContext.h b/arm_compute/core/CL/CLCoreRuntimeContext.h
index 6e2bd43d53..c5d81778b5 100644
--- a/arm_compute/core/CL/CLCoreRuntimeContext.h
+++ b/arm_compute/core/CL/CLCoreRuntimeContext.h
@@ -28,8 +28,10 @@
namespace arm_compute
{
+// Forward declarations
class CLKernelLibrary;
-/** Core runtime context */
+
+/** Core runtime context for OpenCL */
class CLCoreRuntimeContext final
{
public:
@@ -48,10 +50,20 @@ public:
CLCoreRuntimeContext &operator=(const CLCoreRuntimeContext &) = default;
/** Default move assignment operator */
CLCoreRuntimeContext &operator=(CLCoreRuntimeContext &&) = default;
- /** CPU Scheduler setter */
-
+ /** Kernel Library accessor
+ *
+ * @return The kernel library instance used by the core context
+ */
CLKernelLibrary *kernel_library() const;
- cl::Context context();
+ /** OpenCL context accessor
+ *
+ * @return The OpenCL context used by the core context
+ */
+ cl::Context context();
+ /** OpenCL command queue accessor
+ *
+ * @return The OpenCL queue used by the core context
+ */
cl::CommandQueue queue();
private:
diff --git a/arm_compute/core/CL/CLHelpers.h b/arm_compute/core/CL/CLHelpers.h
index 9130e05121..8801af579e 100644
--- a/arm_compute/core/CL/CLHelpers.h
+++ b/arm_compute/core/CL/CLHelpers.h
@@ -182,5 +182,5 @@ bool preferred_dummy_work_items_support(const cl::Device &device);
* @return An opencl kernel
*/
cl::Kernel create_opencl_kernel(CLCoreRuntimeContext *ctx, const std::string &kernel_name, const CLBuildOptions &build_opts);
-}
+} // namespace arm_compute
#endif /* __ARM_COMPUTE_CLHELPERS_H__ */
diff --git a/arm_compute/core/CL/CLKernelLibrary.h b/arm_compute/core/CL/CLKernelLibrary.h
index f2282692f9..4f5aa76a03 100644
--- a/arm_compute/core/CL/CLKernelLibrary.h
+++ b/arm_compute/core/CL/CLKernelLibrary.h
@@ -327,5 +327,5 @@ private:
static const std::map<std::string, std::string> _program_source_map; /**< Contains sources for all programs.
Used for compile-time kernel inclusion. >*/
};
-}
+} // namespace arm_compute
#endif /* __ARM_COMPUTE_CLKERNELLIBRARY_H__ */
diff --git a/arm_compute/core/CL/OpenCL.h b/arm_compute/core/CL/OpenCL.h
index b1d50e73b1..9b402abe2f 100644
--- a/arm_compute/core/CL/OpenCL.h
+++ b/arm_compute/core/CL/OpenCL.h
@@ -61,9 +61,13 @@ bool opencl_is_available();
class CLSymbols final
{
public:
+ /** Default Constructor */
CLSymbols() = default;
+ /** Load OpenCL symbols from handle
+ *
+ * @param[in] handle Handle to load symbols from
+ */
void load_symbols(void *handle);
-
/** Get the static instance of CLSymbols.
*
* @return The static instance of CLSymbols.