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