20#include <initializer_list>
36 Index(std::initializer_list<int32_t> &&l) noexcept : _indices(std::move(l))
43 int32_t
rank()
const {
return static_cast<int32_t
>(_indices.
size()); }
77std::ostream &
operator<<(std::ostream &s,
const Index &idx);
vector with cheap memory allocation
size_t size() const noexcept
Index(std::initializer_list< int32_t > &&l) noexcept
Index & resize(int32_t size)
resize index to given dimension number
int32_t at(int32_t axis) const
return position on given axis
Index & fill(int32_t index)
fill all axis with index
int32_t & at(int32_t axis)
return position on given axis
std::ostream & operator<<(std::ostream &s, const Index &idx)
constexpr std::size_t wrap_index(std::int32_t index, std::size_t limit) noexcept