aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime/CL/CLHelpers.h
diff options
context:
space:
mode:
authorPablo Tello <pablo.tello@arm.com>2019-09-24 11:03:47 +0100
committerPablo Marquez <pablo.tello@arm.com>2019-10-15 14:05:55 +0000
commitdb8485ac24135f17e9882c76196924435abc064f (patch)
treedfe4ff6a50012ac93c6b1cf3fb29c099a7592522 /arm_compute/runtime/CL/CLHelpers.h
parenta046e164b96a8441b2fa14ef578f7db46a0e97da (diff)
downloadComputeLibrary-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/CLHelpers.h')
-rw-r--r--arm_compute/runtime/CL/CLHelpers.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arm_compute/runtime/CL/CLHelpers.h b/arm_compute/runtime/CL/CLHelpers.h
index f3b11f8b75..84f155afd2 100644
--- a/arm_compute/runtime/CL/CLHelpers.h
+++ b/arm_compute/runtime/CL/CLHelpers.h
@@ -25,9 +25,12 @@
#define __ARM_COMPUTE_CL_HELPERS_H__
#include "arm_compute/core/CL/OpenCL.h"
+#include "arm_compute/runtime/IScheduler.h"
namespace arm_compute
{
+class CLRuntimeContext;
+class ICLKernel;
/** This function creates an OpenCL context and a device.
*
* @note In debug builds, the function will automatically enable cl_arm_printf if the driver/device supports it.
@@ -37,5 +40,12 @@ namespace arm_compute
* a value telling why the function failed.
*/
std::tuple<cl::Context, cl::Device, cl_int> create_opencl_context_and_device();
+/** Schedules a kernel using the context if not nullptr else uses the legacy scheduling flow.
+ *
+ * @param[in] ctx Context to use.
+ * @param[in] kernel Kernel to schedule.
+ * @param[in] flush (Optional) Specifies if the command queue will be flushed after running the kernel.
+ */
+void schedule_kernel_on_ctx(CLRuntimeContext *ctx, ICLKernel *kernel, bool flush = true);
} // namespace arm_compute
#endif /* __ARM_COMPUTE_CL_HELPERS_H__ */