24.04
|
Command buffer implementation for platform without mutable dispatch command buffer extension. More...
#include <CLCompatCommandBuffer.h>
Public Member Functions | |
CLCompatCommandBuffer (cl_command_queue queue) | |
Create a new command buffer targeting the specified command queue. More... | |
virtual | ~CLCompatCommandBuffer () |
Destructor. More... | |
CLCompatCommandBuffer (const CLCompatCommandBuffer &)=delete | |
Disallow copy constructor. More... | |
CLCompatCommandBuffer & | operator= (const CLCompatCommandBuffer &)=delete |
Disallow copy assignment. More... | |
CLCompatCommandBuffer (CLCompatCommandBuffer &&)=delete | |
Disallow move constructor. More... | |
CLCompatCommandBuffer & | operator= (CLCompatCommandBuffer &&)=delete |
Disallow move assignment. More... | |
void | add_kernel (cl_kernel kernel, const cl::NDRange &offset, const cl::NDRange &global, const cl::NDRange &local) override |
Add a kernel enqueue command to the command queue. More... | |
void | finalize () override |
Finalize the command buffer. More... | |
void | update () override |
Update the command buffer with new kernel argument values. More... | |
void | enqueue () override |
Enqueue the command buffer. More... | |
bool | is_finalized () const override |
Check if the command buffer has been finalized. More... | |
Public Member Functions inherited from CLCommandBuffer | |
CLCommandBuffer () | |
Constructor. More... | |
virtual | ~CLCommandBuffer () |
Destructor. More... | |
CLCommandBuffer (const CLCommandBuffer &)=delete | |
Disallow copy constructor. More... | |
CLCommandBuffer & | operator= (const CLCommandBuffer &)=delete |
Disallow copy assignment. More... | |
CLCommandBuffer (CLCommandBuffer &&other)=delete | |
Disallow move constructor. More... | |
CLCommandBuffer & | operator= (CLCommandBuffer &&other)=delete |
Disallow move assignment. More... | |
template<typename T , typename = std::enable_if_t<std::is_arithmetic<T>::value || std::is_pointer<T>::value>> | |
void | add_mutable_argument (cl_uint arg_idx, const T *value) |
Add the mutable argument to the current kernel enqueue command. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from CLCommandBuffer | |
static std::unique_ptr< CLCommandBuffer > | create (cl_command_queue queue) |
Create a new command buffer targeting the specified command queue. More... | |
Command buffer implementation for platform without mutable dispatch command buffer extension.
Definition at line 36 of file CLCompatCommandBuffer.h.
CLCompatCommandBuffer | ( | cl_command_queue | queue | ) |
Create a new command buffer targeting the specified command queue.
[in] | queue | The command queue to execute the command buffer. |
Definition at line 34 of file CLCompatCommandBuffer.cpp.
|
virtual |
|
delete |
Disallow copy constructor.
|
delete |
Disallow move constructor.
|
overridevirtual |
Add a kernel enqueue command to the command queue.
This function must be called before the command buffer has been finalized.
[in] | kernel | The CL kernel. |
[in] | offset | The global work offset. |
[in] | global | The global work size. |
[in] | local | The local work size. |
Implements CLCommandBuffer.
Definition at line 42 of file CLCompatCommandBuffer.cpp.
References ARM_COMPUTE_ERROR_ON, and offset().
|
overridevirtual |
Enqueue the command buffer.
This function must be called after the command buffer has been finalized.
Implements CLCommandBuffer.
Definition at line 81 of file CLCompatCommandBuffer.cpp.
References ARM_COMPUTE_ERROR_ON, clEnqueueNDRangeKernel(), clSetKernelArg(), and arm_compute::handle_cl_error().
|
overridevirtual |
Finalize the command buffer.
Implements CLCommandBuffer.
Definition at line 60 of file CLCompatCommandBuffer.cpp.
References ARM_COMPUTE_ERROR_ON.
|
overridevirtual |
Check if the command buffer has been finalized.
Implements CLCommandBuffer.
Definition at line 103 of file CLCompatCommandBuffer.cpp.
|
delete |
Disallow move assignment.
|
delete |
Disallow copy assignment.
|
overridevirtual |
Update the command buffer with new kernel argument values.
This function must be called after the command buffer has been finalized.
All the value pointed by the mutable argument will be applied to the command buffer.
Implements CLCommandBuffer.
Definition at line 74 of file CLCompatCommandBuffer.cpp.
References ARM_COMPUTE_ERROR_ON.