23.08
|
Go to the documentation of this file.
24 #ifndef ARM_COMPUTE_TEST_SIMPLE_TENSOR_ACCESSOR_H
25 #define ARM_COMPUTE_TEST_SIMPLE_TENSOR_ACCESSOR_H
58 const void *
data()
const;
68 size_t size()
const override;
92 return _tensor.shape();
98 return _tensor.element_size();
101 template <
typename T>
104 return _tensor.num_elements() * _tensor.element_size();
107 template <
typename T>
110 return _tensor.format();
113 template <
typename T>
116 return _tensor.data_layout();
119 template <
typename T>
122 return _tensor.data_type();
125 template <
typename T>
128 return _tensor.num_channels();
131 template <
typename T>
134 return _tensor.num_elements();
137 template <
typename T>
140 return _tensor.padding();
143 template <
typename T>
146 return _tensor.quantization_info();
149 template <
typename T>
152 return _tensor.data();
155 template <
typename T>
158 return _tensor.data();
161 template <
typename T>
164 return _tensor(coord);
167 template <
typename T>
170 return _tensor(coord);
Quantization information.
DataLayout
[DataLayout enum definition]
Container for 2D border size.
TensorShape shape() const override
Shape of the tensor.
SimpleTensorAccessor & operator=(const SimpleTensorAccessor &)=delete
Prevent instances of this class from being copied.
DataLayout data_layout() const override
Data layout of the tensor.
DataType data_type() const override
Data type of the tensor.
int num_elements() const override
Number of elements of the tensor.
SimpleTensorAccessor(SimpleTensor< T > &tensor)
Create an accessor for the given tensor.
CLTensor * tensor
Pointer to the auxiliary tensor.
Format format() const override
Image format of the tensor.
Format
Image colour formats.
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.
Simple tensor object that stores elements in a consecutive chunk of memory.
Copyright (c) 2017-2023 Arm Limited.
size_t element_size() const override
Size of each element in the tensor in bytes.
size_t size() const override
Total size of the tensor in bytes.
int num_channels() const override
Number of channels of the tensor.
Common interface to provide information and access to tensor like structures.
Accessor implementation for SimpleTensor objects.
DataType
Available data types.
const void * data() const
Get the tensor data.
PaddingSize padding() const override
Available padding around the tensor.