16 constexpr
const int MAX_DIMS_NUMBER = 12;
18 enum eDIMS_AXIS : uint8_t { X_AXIS = 0, Y_AXIS, Z_AXIS };
20 template <
class T,
int N = MAX_DIMS_NUMBER>
23 bool _allocated[N] = {};
33 for (
size_t i = 0; i < len; i++) {
42 for (
const auto val : values) {
49 for (
const auto val : init_list) {
64 return _axises[index];
67 const T& operator[](
size_t index)
const {
68 if (index >= N || !_allocated[index]) {
71 return _axises[index];
74 T& operator[](
size_t index) {
75 if (index >= N || !_allocated[index]) {
78 return _axises[index];
84 for (
size_t i = 0; i < N; i++) {
85 _allocated[i] = src._allocated[i];
95 if (
this == &src)
return true;
96 if (_length != src.size())
return false;
97 for (
size_t i = 0; i < N; i++)
98 if ((_allocated[i] != src._allocated[i]) || (_allocated[i] && _axises[i] != src._axises[i]))
return false;
102 size_t size()
const {
106 void insert(
size_t axis,
const T& val) {
108 if (!_allocated[axis]) {
109 _allocated[
axis] =
true;
114 THROW_IE_EXCEPTION <<
"Layer Property insertion at(axis) should be in [0," << N <<
")";
118 void remove(
size_t axis) {
119 if (axis < N && _allocated[axis]) {
120 _allocated[
axis] =
false;
126 for (
int i = 0; i != N; i++) {
132 bool exist(
size_t axis)
const {
133 return (axis < N && _allocated[axis]);
#define THROW_IE_EXCEPTION
A macro used to throw the exception with a notable description.
Definition: ie_exception.hpp:25
Inference Engine API.
Definition: ie_argmax_layer.hpp:15
int axis
Axis number for a softmax operation.
Definition: ie_layers.h:829
Definition: ie_layers_property.hpp:21
T & at(int index)
allows access up-to capacity size
Definition: ie_layers_property.hpp:60