Public Member Functions | Static Public Member Functions
InferenceEngine::TensorDesc Class Reference

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.
 
virtual  ~TensorDesc ()=default
  Destructor.
 
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...
 

Detailed Description

This class defines Tensor description.

Constructor & Destructor Documentation

§ TensorDesc() [1/3]

InferenceEngine::TensorDesc::TensorDesc ( const Precision precision,
SizeVector  dims,
const BlockingDesc blockDesc 
)

The constructor creates the tensor descriptor using blocking descriptor.

Parameters
precision memory precision
dims memory dimensions
blockDesc blocking descriptor

§ TensorDesc() [2/3]

InferenceEngine::TensorDesc::TensorDesc ( const Precision precision,
SizeVector  dims,
Layout  layout 
)

The constructor creates the tensor descriptor using standard layout.

Parameters
precision memory precision
dims memory dimensions
layout memory layout

§ TensorDesc() [3/3]

InferenceEngine::TensorDesc::TensorDesc ( const Precision precision,
Layout  layout 
)

The constructor creates the empty tensor descriptor with precision and layout.

Parameters
precision memory precision
layout memory layout

Member Function Documentation

§ getBlockingDesc()

const BlockingDesc& InferenceEngine::TensorDesc::getBlockingDesc ( ) const
inline

Returns the blocking descriptor.

Returns
blocking descriptor

§ getDims() [1/2]

SizeVector& InferenceEngine::TensorDesc::getDims ( )
inline

Returns the vector of dimensions.

Returns
dimensions

§ getDims() [2/2]

const SizeVector& InferenceEngine::TensorDesc::getDims ( ) const
inlinenoexcept

Returns the constant vector of dimensions.

Returns
dimensions

§ getLayout()

Layout InferenceEngine::TensorDesc::getLayout ( ) const
inline

Returns the memory layout.

Returns
layout

§ getLayoutByDims()

static Layout InferenceEngine::TensorDesc::getLayoutByDims ( SizeVector  dims )
static

Returns the standard layout for dimensions.

Parameters
dims the vector of dimensions
Returns
the standard memory layout

§ getPrecision()

const Precision& InferenceEngine::TensorDesc::getPrecision ( ) const
inline

Returns the memory precision.

Returns
precision

§ offset() [1/2]

size_t InferenceEngine::TensorDesc::offset ( const SizeVector v ) const

Calculates offset for the vector of dimensions.

Parameters
v vector of dimensions
Returns
offset

§ offset() [2/2]

size_t InferenceEngine::TensorDesc::offset ( size_t  l ) const

Calculates offset for the local offset.

Parameters
l local offset
Returns
offset

§ operator!=()

bool InferenceEngine::TensorDesc::operator!= ( const TensorDesc rhs ) const

The comparison operator for the TensorDesc.

Parameters
rhs object to compare
Returns
true if objects aren't equal

§ operator==()

bool InferenceEngine::TensorDesc::operator== ( const TensorDesc rhs ) const

The comparison operator for the TensorDesc.

Parameters
rhs object to compare
Returns
true if objects are equal

§ reshape() [1/2]

void InferenceEngine::TensorDesc::reshape ( const SizeVector dims,
Layout  layout = Layout::ANY 
)

Reshapes the tensor descriptor.

Parameters
dims new dimensions
layout new layout if it is necessary

§ reshape() [2/2]

void InferenceEngine::TensorDesc::reshape ( const SizeVector dims,
const BlockingDesc blockDesc 
)

Reshapes the tensor descriptor.

Parameters
dims new dimensions
blockDesc new blocking descriptor

§ setDims()

void InferenceEngine::TensorDesc::setDims ( const SizeVector dims )

Sets dimensions.

Parameters
dims new dimensions

§ setLayout()

void InferenceEngine::TensorDesc::setLayout ( Layout  l )
inline

Sets the layout.

Parameters
l memory layout

§ setPrecision()

void InferenceEngine::TensorDesc::setPrecision ( const Precision p )
inline

Sets the memory precision.

Parameters
p precision

The documentation for this class was generated from the following file: