24 #ifndef __ARM_COMPUTE_CLTENSORALLOCATOR_H__ 25 #define __ARM_COMPUTE_CLTENSORALLOCATOR_H__ 54 const cl::Buffer &
cl_data()
const;
64 uint8_t *
map(cl::CommandQueue &q,
bool blocking);
73 void unmap(cl::CommandQueue &q, uint8_t *mapping);
86 uint8_t *lock()
override;
88 void unlock()
override;
const cl::Buffer & cl_data() const
Interface to be implemented by the child class to return the pointer to the CL data.
uint8_t * map(cl::CommandQueue &q, bool blocking)
Enqueue a map operation of the allocated buffer on the given queue.
Basic implementation of a CL memory tensor allocator.
uint8_t * data()
Interface to be implemented by the child class to return the pointer to the mapped data...
CLTensorAllocator()
Default constructor.
void unmap(cl::CommandQueue &q, uint8_t *mapping)
Enqueue an unmap operation of the allocated buffer on the given queue.
void allocate() override
Allocate size specified by TensorInfo of OpenCL memory.
~CLTensorAllocator()=default
Default destructor.
CLTensorAllocator & operator=(const CLTensorAllocator &)=delete
Prevent instances of this class from being copy assigned (As this class contains pointers).
Interface to allocate tensors.