24 #ifndef __ARM_COMPUTE_ICLKERNEL_H__ 25 #define __ARM_COMPUTE_ICLKERNEL_H__ 89 virtual void run(
const Window &window, cl::CommandQueue &queue) = 0;
98 _kernel.setArg(idx++, value);
108 template <
unsigned int dimension_size>
109 void add_tensor_argument(
unsigned int &idx,
const ICLTensor *tensor,
const Window &window);
114 template <
unsigned int dimension_size>
115 unsigned int num_arguments_per_tensor()
const;
119 cl::NDRange _lws_hint;
Common information for all the kernels.
unsigned int num_arguments_per_3D_tensor() const
Returns the number of arguments enqueued per 3D tensor object.
cl::Kernel & kernel()
Returns a reference to the OpenCL kernel of this object.
void add_argument(unsigned int &idx, T value)
Add the passed parameters to the object's kernel's arguments starting from the index idx...
unsigned int num_arguments_per_1D_tensor() const
Returns the number of arguments enqueued per 1D tensor object.
Common interface for all the OpenCL kernels.
void add_3D_tensor_argument(unsigned int &idx, const ICLTensor *tensor, const Window &window)
Add the passed 3D tensor's parameters to the object's kernel's arguments starting from the index idx...
unsigned int num_arguments_per_2D_tensor() const
Returns the number of arguments enqueued per 2D tensor object.
virtual void run(const Window &window, cl::CommandQueue &queue)=0
Enqueue the OpenCL kernel to process the given window on the passed OpenCL command queue...
void add_2D_tensor_argument(unsigned int &idx, const ICLTensor *tensor, const Window &window)
Add the passed 2D tensor's parameters to the object's kernel's arguments starting from the index idx...
void enqueue(cl::CommandQueue &queue, ICLKernel &kernel, const Window &window, const cl::NDRange &lws_hint=cl::Range_128_1)
Add the kernel to the command queue with the given window.
Interface for OpenCL tensor.
void add_1D_tensor_argument(unsigned int &idx, const ICLTensor *tensor, const Window &window)
Add the passed 1D tensor's parameters to the object's kernel's arguments starting from the index idx...
const Window & window() const
The maximum window the kernel can be executed on.
Describe a multidimensional execution window.