Class InferenceEngine::BlockingDesc

class BlockingDesc

This class describes blocking layouts.

Public Functions

BlockingDesc()

The default constructor which creates empty blocking descriptor.

BlockingDesc(const SizeVector &dims, Layout layout)

The constructor which allows to create blocking descriptors for standard layouts.

Parameters
  • dims – real dimensions

  • layout – memory layout

BlockingDesc(const SizeVector &blocked_dims, const SizeVector &order)

The constructor allows to create blocking descriptors for blocked memory.

Parameters
  • blocked_dims – blocked dimensions

  • order – the order of dimensions

BlockingDesc(const SizeVector &blocked_dims, const SizeVector &order, size_t offset)

The constructor allows to create blocking descriptors for blocked memory.

Parameters
  • blocked_dims – blocked dimensions

  • order – the order of dimensions

  • offset – offset to the current memory block

BlockingDesc(const SizeVector &blocked_dims, const SizeVector &order, size_t offset, const SizeVector &dimOffsets)

The constructor allows to create blocking descriptors for blocked memory.

Parameters
  • blocked_dims – blocked dimensions

  • order – the order of dimensions

  • offset – offset to the current memory block

  • dimOffsets – per-dimension offset from the padding to actual data,

BlockingDesc(const SizeVector &blocked_dims, const SizeVector &order, size_t offset, const SizeVector &dimOffsets, const SizeVector &strides)

The constructor allows to create blocking descriptors for blocked memory.

Parameters
  • blocked_dims – blocked dimensions

  • order – the order of dimensions

  • offset – offset to the current memory block

  • dimOffsets – per-dimension offset from the padding to actual data,

  • strides – strides for each dimension

inline const SizeVector &getBlockDims() const

Returns the blocked dimensions vector.

Returns

blocked dimensions

inline const SizeVector &getOrder() const

Returns the vector of order.

Returns

order of dimensions

inline const SizeVector &getOffsetPaddingToData() const

Returns the per-dimension offset vector.

Returns

offsets in elements

inline size_t getOffsetPadding() const

Returns the offset to the current memory block.

Returns

offset in elements

inline const SizeVector &getStrides() const

Returns strides for each dimension.

Returns

strides in elements

bool operator==(const BlockingDesc &rhs) const

The comparison operator for the BlockingDesc.

Parameters

rhs – object to compare

Returns

true if objects are equal

bool operator!=(const BlockingDesc &rhs) const

The comparison operator for the BlockingDesc.

Parameters

rhs – object to compare

Returns

true if objects aren’t equal