22 class INFERENCE_ENGINE_API_CLASS(BlockingDesc) {
87 return offsetPaddingToData;
134 size_t offsetPadding;
140 class INFERENCE_ENGINE_API_CLASS(TensorDesc) {
213 bool inconsistentLayout =
true;
216 inconsistentLayout = !dims.empty();
219 inconsistentLayout = dims.size() != 1;
221 case Layout::BLOCKED:
223 inconsistentLayout =
false;
226 inconsistentLayout = dims.size() != 6;
232 inconsistentLayout = dims.size() != 5;
237 inconsistentLayout = dims.size() != 4;
240 inconsistentLayout = dims.size() != 3;
245 inconsistentLayout = dims.size() != 2;
250 if (inconsistentLayout)
251 THROW_IE_EXCEPTION <<
"Size of dims(" << std::to_string(dims.size()) <<
") and format(" << l
252 <<
") are inconsistent.";
304 size_t offset(
size_t l)
const;
#define THROW_IE_EXCEPTION
A macro used to throw the exception with a notable description.
Definition: ie_exception.hpp:24
Layout
Layouts that the inference engine supports.
Definition: ie_common.h:77
Layout getLayout() const
Returns the memory layout.
Definition: ie_layouts.h:204
Inference Engine API.
Definition: ie_argmax_layer.hpp:11
const BlockingDesc & getBlockingDesc() const
Returns the blocking descriptor.
Definition: ie_layouts.h:276
void setLayout(Layout l)
Sets the layout.
Definition: ie_layouts.h:212
const SizeVector & getDims() const noexcept
Returns the constant vector of dimensions.
Definition: ie_layouts.h:191
const SizeVector & getStrides() const
Returns strides for each dimension.
Definition: ie_layouts.h:102
This class defines Tensor description.
Definition: ie_layouts.h:140
SizeVector & getDims()
Returns the vector of dimensions.
Definition: ie_layouts.h:184
A header file that provides class for describing precision of data.
const SizeVector & getBlockDims() const
Returns the blocked dimensions vector.
Definition: ie_layouts.h:70
size_t getOffsetPadding() const
Returns the offset to the current memory block.
Definition: ie_layouts.h:94
The macro defines a symbol import/export mechanism essential for Microsoft Windows(R) OS...
const SizeVector & getOrder() const
Returns the vector of order.
Definition: ie_layouts.h:78
std::vector< size_t > SizeVector
Represents tensor size. The order is opposite to the order in Caffe*: (w,h,n,b) where the most freque...
Definition: ie_common.h:27
This class describes blocking layouts.
Definition: ie_layouts.h:22
const SizeVector & getOffsetPaddingToData() const
Returns the per-dimension offset vector.
Definition: ie_layouts.h:86
const Precision & getPrecision() const
Returns the memory precision.
Definition: ie_layouts.h:260
This is a header file with common inference engine definitions.
This class holds precision value and provides precision related operations.
Definition: ie_precision.hpp:21
void setPrecision(const Precision &p)
Sets the memory precision.
Definition: ie_layouts.h:268