This class defines Tensor description. More...
#include <ie_layouts.h>
Public Member Functions | |
TensorDesc (const Precision &precision, SizeVector dims, const BlockingDesc &blockDesc) | |
The constructor creates the tensor descriptor using blocking descriptor. More... | |
TensorDesc (const Precision &precision, SizeVector dims, Layout layout) | |
The constructor creates the tensor descriptor using standard layout. More... | |
TensorDesc (const Precision &precision, Layout layout) | |
The constructor creates the empty tensor descriptor with precision and layout. More... | |
TensorDesc () | |
The default constructor which creates empty tensor descriptor. | |
void | reshape (const SizeVector &dims, Layout layout=Layout::ANY) |
Reshapes the tensor descriptor. More... | |
void | reshape (const SizeVector &dims, const BlockingDesc &blockDesc) |
Reshapes the tensor descriptor. More... | |
SizeVector & | getDims () |
Returns the vector of dimensions. More... | |
const SizeVector & | getDims () const noexcept |
Returns the constant vector of dimensions. More... | |
void | setDims (const SizeVector &dims) |
Sets dimensions. More... | |
Layout | getLayout () const |
Returns the memory layout. More... | |
void | setLayout (Layout l) |
Sets the layout. More... | |
const Precision & | getPrecision () const |
Returns the memory precision. More... | |
void | setPrecision (const Precision &p) |
Sets the memory precision. More... | |
const BlockingDesc & | getBlockingDesc () const |
Returns the blocking descriptor. More... | |
bool | operator== (const TensorDesc &rhs) const |
The comparison operator for the TensorDesc. More... | |
bool | operator!= (const TensorDesc &rhs) const |
The comparison operator for the TensorDesc. More... | |
size_t | offset (const SizeVector &v) const |
Calculates offset for the vector of dimensions. More... | |
size_t | offset (size_t l) const |
Calculates offset for the local offset. More... | |
Static Public Member Functions | |
static Layout | getLayoutByDims (SizeVector dims) |
Returns the standard layout for dimensions. More... | |
This class defines Tensor description.
InferenceEngine::TensorDesc::TensorDesc | ( | const Precision & | precision, |
SizeVector | dims, | ||
const BlockingDesc & | blockDesc | ||
) |
The constructor creates the tensor descriptor using blocking descriptor.
precision | memory precision |
dims | memory dimensions |
blockDesc | blocking descriptor |
InferenceEngine::TensorDesc::TensorDesc | ( | const Precision & | precision, |
SizeVector | dims, | ||
Layout | layout | ||
) |
The constructor creates the tensor descriptor using standard layout.
precision | memory precision |
dims | memory dimensions |
layout | memory layout |
The constructor creates the empty tensor descriptor with precision and layout.
precision | memory precision |
layout | memory layout |
|
inline |
Returns the blocking descriptor.
|
inline |
Returns the vector of dimensions.
|
inlinenoexcept |
Returns the constant vector of dimensions.
|
inline |
Returns the memory layout.
|
static |
Returns the standard layout for dimensions.
dims | the vector of dimensions |
|
inline |
Returns the memory precision.
size_t InferenceEngine::TensorDesc::offset | ( | const SizeVector & | v | ) | const |
Calculates offset for the vector of dimensions.
v | vector of dimensions |
size_t InferenceEngine::TensorDesc::offset | ( | size_t | l | ) | const |
Calculates offset for the local offset.
l | local offset |
bool InferenceEngine::TensorDesc::operator!= | ( | const TensorDesc & | rhs | ) | const |
The comparison operator for the TensorDesc.
rhs | object to compare |
bool InferenceEngine::TensorDesc::operator== | ( | const TensorDesc & | rhs | ) | const |
The comparison operator for the TensorDesc.
rhs | object to compare |
void InferenceEngine::TensorDesc::reshape | ( | const SizeVector & | dims, |
Layout | layout = Layout::ANY |
||
) |
Reshapes the tensor descriptor.
dims | new dimensions |
layout | new layout if it is necessary |
void InferenceEngine::TensorDesc::reshape | ( | const SizeVector & | dims, |
const BlockingDesc & | blockDesc | ||
) |
Reshapes the tensor descriptor.
dims | new dimensions |
blockDesc | new blocking descriptor |
void InferenceEngine::TensorDesc::setDims | ( | const SizeVector & | dims | ) |
Sets dimensions.
dims | new dimensions |
|
inline |
Sets the layout.
l | memory layout |
|
inline |
Sets the memory precision.
p | precision |