17#ifndef __CIRCLE_RESIZER_SHAPE_H__
18#define __CIRCLE_RESIZER_SHAPE_H__
37 Shape(
const std::initializer_list<Dim> &dims);
42 Shape(
const std::vector<Dim> &shape_vec);
50 Shape(
const std::initializer_list<uint32_t> &shape_vec);
89 std::vector<Dim> _dims;
bool is_scalar() const
Returns true if the shape is a scalar. Otherwise, return false.
static Shape scalar()
Create scalar shape. Note, that the same can be achieved with Shape{}.
bool is_dynamic() const
Returns true if all dimensions in the shape are static or the shape is a scalar. Otherwise,...
Dim operator[](const size_t &axis) const
Returns dimension of the position determined by axis.
size_t rank() const
Returns number of dimensions in the shape.
bool operator==(const Shape &rhs) const
Returns true of the current shape and the provided rhs are equal.
std::ostream & operator<<(std::ostream &os, const Shape &shape)
Print the shape in format [1, 2, 3].