15 constexpr
const int MAX_DIMS_NUMBER = 12;
17 enum eDIMS_AXIS : uint8_t {
23 template<
class T,
int N = MAX_DIMS_NUMBER>
26 bool _allocated[N] = {};
36 for (
size_t i = 0; i < len; i++) {
45 for (
const auto val : values) {
59 return _axises[index];
62 const T &operator[](
size_t index)
const {
63 if (index >= N ||!_allocated[index]) {
66 return _axises[index];
69 T &operator[](
size_t index) {
70 if (index >= N || !_allocated[index]) {
73 return _axises[index];
79 for (
size_t i = 0; i < N; i++) {
80 _allocated[i] = src._allocated[i];
90 if (
this == &src)
return true;
91 if (_length != src.size())
return false;
92 for (
size_t i = 0; i < N; i++)
93 if ((_allocated[i] != src._allocated[i]) ||
94 (_allocated[i] && _axises[i] != src._axises[i]))
return false;
102 void insert(
size_t axis,
const T &val) {
104 if (!_allocated[axis]) {
105 _allocated[axis] =
true;
114 void remove(
size_t axis) {
115 if (axis < N && _allocated[axis]) {
116 _allocated[axis] =
false;
122 for (
int i = 0; i != N; i++) {
128 bool exist(
size_t axis)
const {
129 return (axis < N && _allocated[axis]);
#define THROW_IE_EXCEPTION
A macro used to throw the exception with a notable description.
Definition: ie_exception.hpp:22
Definition: ie_argmax_layer.hpp:11
Definition: ie_layers_property.hpp:24
T & at(int index)
allows access up-to capacity size
Definition: ie_layers_property.hpp:55