17 constexpr
const int MAX_DIMS_NUMBER = 12;
19 enum eDIMS_AXIS : uint8_t { X_AXIS = 0, Y_AXIS, Z_AXIS };
21 template <
class T,
int N = MAX_DIMS_NUMBER>
24 bool _allocated[N] = {};
34 for (
size_t i = 0; i < len; i++) {
43 for (
const auto val : values) {
50 for (
const auto val : init_list) {
65 return _axises[index];
68 const T& operator[](
size_t index)
const {
69 if (index >= N || !_allocated[index]) {
72 return _axises[index];
75 T& operator[](
size_t index) {
76 if (index >= N || !_allocated[index]) {
79 return _axises[index];
85 for (
size_t i = 0; i < N; i++) {
86 _allocated[i] = src._allocated[i];
96 if (
this == &src)
return true;
97 if (_length != src.size())
return false;
98 for (
size_t i = 0; i < N; i++)
99 if ((_allocated[i] != src._allocated[i]) || (_allocated[i] && _axises[i] != src._axises[i]))
return false;
103 size_t size()
const {
107 void insert(
size_t axis,
const T& val) {
109 if (!_allocated[axis]) {
110 _allocated[axis] =
true;
115 THROW_IE_EXCEPTION <<
"Layer Property insertion at(axis) should be in [0," << N <<
")";
119 void remove(
size_t axis) {
120 if (axis < N && _allocated[axis]) {
121 _allocated[axis] =
false;
127 for (
int i = 0; i != N; i++) {
133 bool exist(
size_t axis)
const {
134 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
Definition: cldnn_config.hpp:16
int axis
Axis number for a softmax operation.
Definition: ie_layers.h:829
Definition: ie_layers_property.hpp:22
T & at(int index)
allows access up-to capacity size
Definition: ie_layers_property.hpp:61
A header file for the main Inference Engine exception.