23.08
|
Go to the documentation of this file.
24 #ifndef ARM_COMPUTE_ICLTENSOR_H
25 #define ARM_COMPUTE_ICLTENSOR_H
67 virtual const cl::Buffer &
cl_buffer()
const = 0;
75 void map(cl::CommandQueue &q,
bool blocking =
true);
83 void unmap(cl::CommandQueue &q);
88 void clear(cl::CommandQueue &q);
91 uint8_t *
buffer()
const override;
101 virtual uint8_t *do_map(cl::CommandQueue &q,
bool blocking) = 0;
109 virtual void do_unmap(cl::CommandQueue &q) = 0;
virtual ~ICLTensor()=default
Default virtual destructor.
void map(cl::CommandQueue &q, bool blocking=true)
Enqueue a map operation of the allocated buffer on the given queue.
Interface for OpenCL tensor.
virtual const cl::Buffer & cl_buffer() const =0
Interface to be implemented by the child class to return a reference to the OpenCL buffer containing ...
Interface for CPU tensor.
virtual CLQuantization quantization() const =0
Interface to be implemented by the child class to return the wrapped quantization info data.
ICLTensor & operator=(const ICLTensor &)=delete
Prevent instances of this class from being copied.
uint8_t * buffer() const override
Interface to be implemented by the child class to return a pointer to CPU memory.
OpenCL quantization data.
void unmap(cl::CommandQueue &q)
Enqueue an unmap operation of the allocated and mapped buffer on the given queue.
ICLTensor()
Default constructor.
Copyright (c) 2017-2023 Arm Limited.
void clear(cl::CommandQueue &q)
Clear the contents of the tensor synchronously.