ARM Compute Library
17.04
|
Provides global access to a CL context and command queue. More...
#include <CLScheduler.h>
Public Member Functions | |
void | default_init () |
Initialises the context and command queue used by the scheduler to default values and sets a default device and kernel path for the CLKernelLibrary. More... | |
void | enqueue (ICLKernel &kernel, bool flush=true) |
Schedule the execution of the passed kernel if possible. More... | |
void | init (cl::Context context=cl::Context::getDefault(), cl::CommandQueue queue=cl::CommandQueue::getDefault()) |
Initialises the context and command queue to be used by the scheduler. More... | |
cl::Context & | context () |
Accessor for the associated CL context. More... | |
void | set_context (cl::Context context) |
Accessor to set the CL context to be used by the scheduler. More... | |
cl::CommandQueue & | queue () |
Accessor for the associated CL command queue. More... | |
void | set_queue (cl::CommandQueue queue) |
Accessor to set the CL command queue to be used by the scheduler. More... | |
void | sync () |
Blocks until all commands in the associated command queue have finished. More... | |
cl::Event | enqueue_sync_event () |
Enqueues a marker into the associated command queue and return the event. More... | |
Static Public Member Functions | |
static CLScheduler & | get () |
Access the scheduler singleton. More... | |
Provides global access to a CL context and command queue.
Definition at line 35 of file CLScheduler.h.
|
inline |
Accessor for the associated CL context.
Definition at line 77 of file CLScheduler.h.
Referenced by CLScheduler::init().
|
inline |
Initialises the context and command queue used by the scheduler to default values and sets a default device and kernel path for the CLKernelLibrary.
Definition at line 50 of file CLScheduler.h.
References CLScheduler::enqueue(), CLKernelLibrary::get(), CLScheduler::init(), and CLKernelLibrary::init().
Referenced by main_cl_convolution(), main_cl_events(), and main_neoncl_scale_median_gaussian().
void enqueue | ( | ICLKernel & | kernel, |
bool | flush = true |
||
) |
Schedule the execution of the passed kernel if possible.
[in] | kernel | Kernel to execute. |
[in] | flush | (Optional) Specifies if the command queue will be flushed after running the kernel. |
Referenced by CLScheduler::default_init().
|
inline |
Enqueues a marker into the associated command queue and return the event.
Definition at line 119 of file CLScheduler.h.
Referenced by main_cl_events().
|
static |
Access the scheduler singleton.
Referenced by main_cl_convolution(), main_cl_events(), main_neoncl_scale_median_gaussian(), CLArray< T >::map(), and CLArray< T >::unmap().
|
inline |
Initialises the context and command queue to be used by the scheduler.
[in] | context | A CL context. |
[in] | queue | A CL command queue. |
Definition at line 67 of file CLScheduler.h.
References CLScheduler::context(), and CLScheduler::queue().
Referenced by CLScheduler::default_init().
|
inline |
Accessor for the associated CL command queue.
Definition at line 95 of file CLScheduler.h.
Referenced by CLScheduler::init().
|
inline |
Accessor to set the CL context to be used by the scheduler.
[in] | context | A CL context. |
Definition at line 86 of file CLScheduler.h.
|
inline |
Accessor to set the CL command queue to be used by the scheduler.
[in] | queue | A CL command queue. |
Definition at line 104 of file CLScheduler.h.
|
inline |
Blocks until all commands in the associated command queue have finished.
Definition at line 110 of file CLScheduler.h.
Referenced by main_cl_convolution(), main_cl_events(), and main_neoncl_scale_median_gaussian().