Class ov::Shape#

class Shape : public std::vector<size_t>#

Shape for a tensor.

Public Functions

OPENVINO_API Shape::reference operator[] (std::ptrdiff_t i)

Gets dimension at index.

Parameters:

i – Index to shape dimension [-rank, rank).

Returns:

A reference to i-th dimension of this shape.

OPENVINO_API Shape::const_reference operator[] (std::ptrdiff_t i) const

Gets dimension at index.

Parameters:

i – Index to shape dimension [-rank, rank).

Returns:

A const reference to i-th dimension of this shape.

OPENVINO_API Shape::reference at (std::ptrdiff_t i)

Gets dimension at index, with bounds checking.

Parameters:

i – Index to shape dimension [-rank, rank).

Returns:

A reference to i-th dimension of this shape.

OPENVINO_API Shape::const_reference at (std::ptrdiff_t i) const

Gets dimension at index, with bounds checking.

Parameters:

i – Index to shape dimension [-rank, rank).

Returns:

A const reference to i-th dimension of this shape.