23.08
|
Accessor implementation for SimpleTensor objects. More...
#include <SimpleTensorAccessor.h>
Public Member Functions | |
SimpleTensorAccessor (SimpleTensor< T > &tensor) | |
Create an accessor for the given tensor . More... | |
SimpleTensorAccessor (const SimpleTensorAccessor &)=delete | |
Prevent instances of this class from being copy constructed. More... | |
SimpleTensorAccessor & | operator= (const SimpleTensorAccessor &)=delete |
Prevent instances of this class from being copied. More... | |
SimpleTensorAccessor (SimpleTensorAccessor &&)=default | |
Allow instances of this class to be move constructed. More... | |
SimpleTensorAccessor & | operator= (SimpleTensorAccessor &&)=default |
Allow instances of this class to be moved. More... | |
const void * | data () const |
Get the tensor data. More... | |
void * | data () |
Get the tensor data. More... | |
TensorShape | shape () const override |
Shape of the tensor. More... | |
size_t | element_size () const override |
Size of each element in the tensor in bytes. More... | |
size_t | size () const override |
Total size of the tensor in bytes. More... | |
Format | format () const override |
Image format of the tensor. More... | |
DataLayout | data_layout () const override |
Data layout of the tensor. More... | |
DataType | data_type () const override |
Data type of the tensor. More... | |
int | num_channels () const override |
Number of channels of the tensor. More... | |
int | num_elements () const override |
Number of elements of the tensor. More... | |
PaddingSize | padding () const override |
Available padding around the tensor. More... | |
QuantizationInfo | quantization_info () const override |
Quantization info in case of asymmetric quantized type. More... | |
const void * | operator() (const Coordinates &coord) const override |
Read only access to the specified element. More... | |
void * | operator() (const Coordinates &coord) override |
Access to the specified element. More... | |
![]() | |
virtual | ~IAccessor ()=default |
Virtual destructor. More... | |
Accessor implementation for SimpleTensor objects.
Definition at line 36 of file SimpleTensorAccessor.h.
|
inline |
Create an accessor for the given tensor
.
[in,out] | tensor | To be accessed tensor. |
Definition at line 84 of file SimpleTensorAccessor.h.
References tensor.
|
delete |
Prevent instances of this class from being copy constructed.
|
default |
Allow instances of this class to be move constructed.
void* data | ( | ) |
Get the tensor data.
|
inline |
Get the tensor data.
Definition at line 150 of file SimpleTensorAccessor.h.
|
inlineoverridevirtual |
Data layout of the tensor.
Implements IAccessor.
Definition at line 114 of file SimpleTensorAccessor.h.
|
inlineoverridevirtual |
Data type of the tensor.
Implements IAccessor.
Definition at line 120 of file SimpleTensorAccessor.h.
|
inlineoverridevirtual |
Size of each element in the tensor in bytes.
Implements IAccessor.
Definition at line 96 of file SimpleTensorAccessor.h.
|
inlineoverridevirtual |
Image format of the tensor.
Implements IAccessor.
Definition at line 108 of file SimpleTensorAccessor.h.
|
inlineoverridevirtual |
Number of channels of the tensor.
Implements IAccessor.
Definition at line 126 of file SimpleTensorAccessor.h.
|
inlineoverridevirtual |
Number of elements of the tensor.
Implements IAccessor.
Definition at line 132 of file SimpleTensorAccessor.h.
|
inlineoverridevirtual |
Read only access to the specified element.
[in] | coord | Coordinates of the desired element. |
Implements IAccessor.
Definition at line 162 of file SimpleTensorAccessor.h.
|
inlineoverridevirtual |
Access to the specified element.
[in] | coord | Coordinates of the desired element. |
Implements IAccessor.
Definition at line 168 of file SimpleTensorAccessor.h.
|
delete |
Prevent instances of this class from being copied.
|
default |
Allow instances of this class to be moved.
|
inlineoverridevirtual |
Available padding around the tensor.
Implements IAccessor.
Definition at line 138 of file SimpleTensorAccessor.h.
|
inlineoverridevirtual |
Quantization info in case of asymmetric quantized type.
Implements IAccessor.
Definition at line 144 of file SimpleTensorAccessor.h.
|
inlineoverridevirtual |
Shape of the tensor.
Implements IAccessor.
Definition at line 90 of file SimpleTensorAccessor.h.
|
inlineoverridevirtual |
Total size of the tensor in bytes.
Implements IAccessor.
Definition at line 102 of file SimpleTensorAccessor.h.