24 #ifndef ARM_COMPUTE_TEST_CLACCESSOR_H 25 #define ARM_COMPUTE_TEST_CLACCESSOR_H 62 const void *
data()
const;
72 size_t size()
const override;
uint8_t * ptr_to_element(const Coordinates &id) const
Return a pointer to the element at the passed coordinates.
TensorInfo * info() const override
Interface to be implemented by the child class to return the tensor's metadata.
Container for 2D border size.
size_t num_channels() const override
The number of channels for each tensor element.
DataLayout data_layout() const override
Get the data layout of the tensor.
QuantizationInfo quantization_info() const override
Get the quantization settings (scale and offset) of the tensor.
CLAccessor & operator=(const CLAccessor &)=delete
Prevent instances of this class from being copied.
TensorShape shape() const override
Shape of the tensor.
size_t element_size() const override
Size of each element in the tensor in bytes.
PaddingSize padding() const override
Padding of tensor.
Copyright (c) 2017-2023 Arm Limited.
size_t size() const override
Total size of the tensor in bytes.
Format format() const override
Colour format of the image.
void map(bool blocking=true)
Enqueue a map operation of the allocated buffer.
static Framework & get()
Access to the singleton.
DataType data_type() const override
Data type used for each element of the tensor.
int num_elements() const override
Number of elements of the tensor.
uint8_t * buffer() const override
Interface to be implemented by the child class to return a pointer to CPU memory. ...
Quantization information.
Format
Image colour formats.
Accessor implementation for CLTensor objects.
size_t total_size() const override
Returns the total size of the tensor in bytes.
size_t total_size() const
Collapses all dimensions to a single linear total size.
DataLayout data_layout() const override
Data layout of the tensor.
~CLAccessor()
Destructor that unmaps the CL memory.
const void * data() const
Get the tensor data.
CLAccessor(CLTensor &tensor)
Create an accessor for the given tensor.
Common interface to provide information and access to tensor like structures.
const void * operator()(const Coordinates &coord) const override
Read only access to the specified element.
int num_channels() const override
Number of channels of the tensor.
QuantizationInfo quantization_info() const override
Quantization info in case of asymmetric quantized type.
Format format() const override
Image format of the tensor.
CLTensor * tensor
Pointer to the auxiliary tensor.
PaddingSize padding() const override
Available padding around the tensor.
const TensorShape & tensor_shape() const override
Size for each dimension of the tensor.
DataType
Available data types.
void unmap()
Enqueue an unmap operation of the allocated and mapped buffer.
DataLayout
[DataLayout enum definition]
size_t element_size() const override
Element size in bytes calculated as data_size() * num_channels()
DataType data_type() const override
Data type of the tensor.
Basic implementation of the OpenCL tensor interface.