Data Structures | Namespaces | Macros | Typedefs | Enumerations | Functions
ie_common.h File Reference

This is a header file with common inference engine definitions. More...

#include <algorithm>
#include <cstdlib>
#include <memory>
#include <ostream>
#include <string>
#include <vector>
#include <map>
#include <sstream>
#include <stdexcept>
#include <iterator>
#include <ie_api.h>
#include <cassert>

Go to the source code of this file.

Data Structures

union  InferenceEngine::UserValue
 The method holds the user values to enable binding of data per graph node. More...
 
struct  InferenceEngine::InferenceEngineProfileInfo
 Represents basic inference profiling information per layer. More...
 
struct  InferenceEngine::ResponseDesc
 Represents detailed information for an error. More...
 
struct  InferenceEngine::QueryNetworkResult
 Response structure encapsulating information about supported layer. More...
 
struct  InferenceEngine::Exception
 Base Inference Engine exception class. More...
 

Namespaces

 InferenceEngine
 Inference Engine C++ API.
 

Macros

#define IE_THROW(...)   IE_PP_OVERLOAD(IE_THROW, __VA_ARGS__)
 A macro used to throw specified exception with a description.
 
#define IE_ASSERT(EXPRESSION)
 Uses assert() function if NDEBUG is not defined, InferenceEngine exception otherwise. More...
 
#define IE_EXCEPTION_SWITCH(STATUS, TYPE_ALIAS, ...)
 Generate Switch statement over error codes adn maps them to coresponding exceptions type. More...
 

Typedefs

using InferenceEngine::SizeVector = std::vector< size_t >
 Represents tensor size. More...
 
using InferenceEngine::DataPtr = std::shared_ptr< Data >
 Smart pointer to Data.
 
using InferenceEngine::CDataPtr = std::shared_ptr< const Data >
 Smart pointer to constant Data.
 
using InferenceEngine::DataWeakPtr = std::weak_ptr< Data >
 Smart weak pointer to Data.
 
using InferenceEngine::ConstOutputsDataMap = std::map< std::string, CDataPtr >
 A collection that contains string as key, and const Data smart pointer as value.
 
using InferenceEngine::OutputsDataMap = std::map< std::string, DataPtr >
 A collection that contains string as key, and Data smart pointer as value.
 

Enumerations

enum  InferenceEngine::Layout : uint8_t {
  InferenceEngine::ANY = 0 , InferenceEngine::NCHW = 1 , InferenceEngine::NHWC = 2 , InferenceEngine::NCDHW = 3 ,
  InferenceEngine::NDHWC = 4 , InferenceEngine::OIHW = 64 , InferenceEngine::GOIHW = 65 , InferenceEngine::OIDHW = 66 ,
  InferenceEngine::GOIDHW = 67 , InferenceEngine::SCALAR = 95 , InferenceEngine::C = 96 , InferenceEngine::CHW = 128 ,
  InferenceEngine::HWC = 129 , InferenceEngine::HW = 192 , InferenceEngine::NC = 193 , InferenceEngine::CN = 194 ,
  InferenceEngine::BLOCKED = 200
}
 Layouts that the inference engine supports. More...
 
enum  InferenceEngine::ColorFormat : uint32_t {
  InferenceEngine::RAW = 0u , InferenceEngine::RGB , InferenceEngine::BGR , InferenceEngine::RGBX ,
  InferenceEngine::BGRX , InferenceEngine::NV12 , InferenceEngine::I420
}
 Extra information about input color format for preprocessing. More...
 
enum  InferenceEngine::StatusCode : int {
  OK = 0 , GENERAL_ERROR = -1 , NOT_IMPLEMENTED = -2 , NETWORK_NOT_LOADED = -3 ,
  PARAMETER_MISMATCH = -4 , NOT_FOUND = -5 , OUT_OF_BOUNDS = -6 , UNEXPECTED = -7 ,
  REQUEST_BUSY = -8 , RESULT_NOT_READY = -9 , NOT_ALLOCATED = -10 , INFER_NOT_STARTED = -11 ,
  NETWORK_NOT_READ = -12 , INFER_CANCELLED = -13
}
 This enum contains codes for all possible return values of the interface functions.
 

Functions

std::ostream & InferenceEngine::operator<< (std::ostream &out, const Layout &p)
 Prints a string representation of InferenceEngine::Layout to a stream. More...
 
std::ostream & InferenceEngine::operator<< (std::ostream &out, const ColorFormat &fmt)
 Prints a string representation of InferenceEngine::ColorFormat to a stream. More...
 

Detailed Description

This is a header file with common inference engine definitions.

Macro Definition Documentation

◆ IE_ASSERT

#define IE_ASSERT (   EXPRESSION)
Value:
assert((EXPRESSION)); \
InferenceEngine::details::NullStream()

Uses assert() function if NDEBUG is not defined, InferenceEngine exception otherwise.

◆ IE_EXCEPTION_SWITCH

#define IE_EXCEPTION_SWITCH (   STATUS,
  TYPE_ALIAS,
  ... 
)
Value:
switch (STATUS) { \
IE_EXCEPTION_CASE(TYPE_ALIAS, GENERAL_ERROR , GeneralError , __VA_ARGS__) \
IE_EXCEPTION_CASE(TYPE_ALIAS, NOT_IMPLEMENTED , NotImplemented , __VA_ARGS__) \
IE_EXCEPTION_CASE(TYPE_ALIAS, NETWORK_NOT_LOADED , NetworkNotLoaded , __VA_ARGS__) \
IE_EXCEPTION_CASE(TYPE_ALIAS, PARAMETER_MISMATCH , ParameterMismatch , __VA_ARGS__) \
IE_EXCEPTION_CASE(TYPE_ALIAS, NOT_FOUND , NotFound , __VA_ARGS__) \
IE_EXCEPTION_CASE(TYPE_ALIAS, OUT_OF_BOUNDS , OutOfBounds , __VA_ARGS__) \
IE_EXCEPTION_CASE(TYPE_ALIAS, UNEXPECTED , Unexpected , __VA_ARGS__) \
IE_EXCEPTION_CASE(TYPE_ALIAS, REQUEST_BUSY , RequestBusy , __VA_ARGS__) \
IE_EXCEPTION_CASE(TYPE_ALIAS, RESULT_NOT_READY , ResultNotReady , __VA_ARGS__) \
IE_EXCEPTION_CASE(TYPE_ALIAS, NOT_ALLOCATED , NotAllocated , __VA_ARGS__) \
IE_EXCEPTION_CASE(TYPE_ALIAS, INFER_NOT_STARTED , InferNotStarted , __VA_ARGS__) \
IE_EXCEPTION_CASE(TYPE_ALIAS, NETWORK_NOT_READ , NetworkNotRead , __VA_ARGS__) \
IE_EXCEPTION_CASE(TYPE_ALIAS, INFER_CANCELLED , InferCancelled , __VA_ARGS__) \
default: IE_ASSERT(!"Unreachable"); \
}
#define IE_ASSERT(EXPRESSION)
Uses assert() function if NDEBUG is not defined, InferenceEngine exception otherwise.
Definition: ie_common.h:444

Generate Switch statement over error codes adn maps them to coresponding exceptions type.