21.08
|
Accessor implementation for CLTensor objects. More...
#include <CLAccessor.h>
Public Member Functions | |
CLAccessor (CLTensor &tensor) | |
Create an accessor for the given tensor . More... | |
CLAccessor (const CLAccessor &)=delete | |
Prevent instances of this class from being copy constructed. More... | |
CLAccessor & | operator= (const CLAccessor &)=delete |
Prevent instances of this class from being copied. More... | |
CLAccessor (CLAccessor &&)=default | |
Allow instances of this class to be move constructed. More... | |
~CLAccessor () | |
Destructor that unmaps the CL memory. 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 CLTensor objects.
Definition at line 36 of file CLAccessor.h.
|
inline |
Create an accessor for the given tensor
.
[in,out] | tensor | To be accessed tensor. |
Definition at line 87 of file CLAccessor.h.
References Framework::get(), and CLTensor::map().
|
delete |
Prevent instances of this class from being copy constructed.
|
default |
Allow instances of this class to be move constructed.
|
inline |
Destructor that unmaps the CL memory.
Definition at line 96 of file CLAccessor.h.
References Framework::get(), and CLTensor::unmap().
|
inline |
Get the tensor data.
Definition at line 154 of file CLAccessor.h.
References ICLTensor::buffer().
|
inline |
Get the tensor data.
Definition at line 159 of file CLAccessor.h.
References ICLTensor::buffer().
|
inlineoverridevirtual |
Data layout of the tensor.
Implements IAccessor.
Definition at line 124 of file CLAccessor.h.
References TensorInfo::data_layout(), and CLTensor::info().
|
inlineoverridevirtual |
Data type of the tensor.
Implements IAccessor.
Definition at line 129 of file CLAccessor.h.
References TensorInfo::data_type(), and CLTensor::info().
|
inlineoverridevirtual |
Size of each element in the tensor in bytes.
Implements IAccessor.
Definition at line 109 of file CLAccessor.h.
References TensorInfo::element_size(), and CLTensor::info().
|
inlineoverridevirtual |
Image format of the tensor.
Implements IAccessor.
Definition at line 119 of file CLAccessor.h.
References TensorInfo::format(), and CLTensor::info().
|
inlineoverridevirtual |
Number of channels of the tensor.
Implements IAccessor.
Definition at line 134 of file CLAccessor.h.
References CLTensor::info(), and TensorInfo::num_channels().
|
inlineoverridevirtual |
Number of elements of the tensor.
Implements IAccessor.
Definition at line 139 of file CLAccessor.h.
References CLTensor::info(), TensorInfo::tensor_shape(), and TensorShape::total_size().
|
inlineoverridevirtual |
Read only access to the specified element.
[in] | coord | Coordinates of the desired element. |
Implements IAccessor.
Definition at line 164 of file CLAccessor.h.
References ITensor::ptr_to_element().
|
inlineoverridevirtual |
Access to the specified element.
[in] | coord | Coordinates of the desired element. |
Implements IAccessor.
Definition at line 169 of file CLAccessor.h.
References ITensor::ptr_to_element().
|
delete |
Prevent instances of this class from being copied.
|
inlineoverridevirtual |
Available padding around the tensor.
Implements IAccessor.
Definition at line 144 of file CLAccessor.h.
References CLTensor::info(), and TensorInfo::padding().
|
inlineoverridevirtual |
Quantization info in case of asymmetric quantized type.
Implements IAccessor.
Definition at line 149 of file CLAccessor.h.
References CLTensor::info(), and TensorInfo::quantization_info().
|
inlineoverridevirtual |
Shape of the tensor.
Implements IAccessor.
Definition at line 104 of file CLAccessor.h.
References CLTensor::info(), and TensorInfo::tensor_shape().
|
inlineoverridevirtual |
Total size of the tensor in bytes.
Implements IAccessor.
Definition at line 114 of file CLAccessor.h.
References CLTensor::info(), and TensorInfo::total_size().