class InferenceEngine::BlockingDesc

Overview

This class describes blocking layouts. More…

#include <ie_layouts.h>

class BlockingDesc
{
public:
    // construction

    BlockingDesc();
    BlockingDesc(const SizeVector& dims, Layout layout);
    BlockingDesc(const SizeVector& blocked_dims, const SizeVector& order);

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

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

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

    // methods

    const SizeVector& getBlockDims() const;
    const SizeVector& getOrder() const;
    const SizeVector& getOffsetPaddingToData() const;
    size_t getOffsetPadding() const;
    const SizeVector& getStrides() const;
    bool operator == (const BlockingDesc& rhs) const;
    bool operator != (const BlockingDesc& rhs) const;
};

Detailed Documentation

This class describes blocking layouts.

Construction

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

Methods

const SizeVector& getBlockDims() const

Returns the blocked dimensions vector.

Returns:

blocked dimensions

const SizeVector& getOrder() const

Returns the vector of order.

Returns:

order of dimensions

const SizeVector& getOffsetPaddingToData() const

Returns the per-dimension offset vector.

Returns:

offsets in elements

size_t getOffsetPadding() const

Returns the offset to the current memory block.

Returns:

offset in elements

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