ARM Compute Library
17.03.1
|
Basic implementation of the OpenCL tensor interface. More...
#include <CLTensor.h>
Public Member Functions | |
CLTensor () | |
Constructor. More... | |
ITensorAllocator * | allocator () |
Return a pointer to the tensor's allocator. More... | |
void | map (bool blocking=true) |
Enqueue a map operation of the allocated buffer. More... | |
void | unmap () |
Enqueue an unmap operation of the allocated and mapped buffer. More... | |
TensorInfo * | info () const override |
Interface to be implemented by the child class to return the tensor's metadata. More... | |
TensorInfo * | info () override |
Interface to be implemented by the child class to return the tensor's metadata. More... | |
const cl::Buffer & | cl_buffer () const override |
Interface to be implemented by the child class to return a reference to the OpenCL buffer containing the image's data. More... | |
Public Member Functions inherited from ICLTensor | |
ICLTensor () | |
ICLTensor (const ICLTensor &)=delete | |
ICLTensor & | operator= (const ICLTensor &)=delete |
void | map (cl::CommandQueue &q, bool blocking=true) |
Enqueue a map operation of the allocated buffer on the given queue. More... | |
void | unmap (cl::CommandQueue &q) |
Enqueue an unmap operation of the allocated and mapped buffer on the given queue. More... | |
void | clear (cl::CommandQueue &q) |
Clear the contents of the tensor synchronously. More... | |
uint8_t * | buffer () const override |
Interface to be implemented by the child class to return a pointer to CPU memory. More... | |
Public Member Functions inherited from ITensor | |
virtual | ~ITensor ()=default |
Default virtual destructor. More... | |
uint8_t * | ptr_to_element (const Coordinates &id) const |
Return a pointer to the element at the passed coordinates. More... | |
void | copy_from (const ITensor &src) |
Copy the content of another tensor. More... | |
Basic implementation of the OpenCL tensor interface.
Definition at line 39 of file CLTensor.h.
CLTensor | ( | ) |
Constructor.
ITensorAllocator* allocator | ( | ) |
Return a pointer to the tensor's allocator.
Referenced by main_cl_convolution(), main_cl_events(), and main_neoncl_scale_median_gaussian().
|
overridevirtual |
Interface to be implemented by the child class to return a reference to the OpenCL buffer containing the image's data.
Implements ICLTensor.
|
overridevirtual |
Interface to be implemented by the child class to return the tensor's metadata.
Implements ITensor.
Referenced by main_cl_convolution(), main_cl_events(), and main_neoncl_scale_median_gaussian().
|
overridevirtual |
Interface to be implemented by the child class to return the tensor's metadata.
Implements ITensor.
void map | ( | bool | blocking = true | ) |
Enqueue a map operation of the allocated buffer.
[in] | blocking | If true, then the mapping will be ready to use by the time this method returns, else it is the caller's responsibility to flush the queue and wait for the mapping operation to have completed. |
Referenced by main_neoncl_scale_median_gaussian().
void unmap | ( | ) |
Enqueue an unmap operation of the allocated and mapped buffer.
Referenced by main_neoncl_scale_median_gaussian().