Added ONNX reader for the OpenVINO (#532)
* Added ONNX reader for the OpenVINO * Fixed comments * Fixed comments * Fixed message * Fixed memory consumption * Revert IReaderPtr * Fixed Myriad tests * Fixed comment * Renamed inference_engine_ir_readers to inference_engine_ir_reader
This commit is contained in:
@@ -12,39 +12,38 @@
|
||||
#include "details/ie_no_copy.hpp"
|
||||
|
||||
#if defined(USE_STATIC_IE) || (defined(__GNUC__) && (__GNUC__ < 4))
|
||||
#define INFERENCE_ENGINE_API(...) extern "C" __VA_ARGS__
|
||||
#define INFERENCE_ENGINE_API_CPP(...) __VA_ARGS__
|
||||
#define INFERENCE_ENGINE_API_CLASS(...) __VA_ARGS__
|
||||
#define INFERENCE_ENGINE_CDECL __attribute__((cdecl))
|
||||
# define INFERENCE_ENGINE_API(...) extern "C" __VA_ARGS__
|
||||
# define INFERENCE_ENGINE_API_CPP(...) __VA_ARGS__
|
||||
# define INFERENCE_ENGINE_API_CLASS(...) __VA_ARGS__
|
||||
# define INFERENCE_ENGINE_CDECL __attribute__((cdecl))
|
||||
#else
|
||||
#if defined(_WIN32)
|
||||
#define INFERENCE_ENGINE_CDECL
|
||||
|
||||
#ifdef IMPLEMENT_INFERENCE_ENGINE_API
|
||||
#define INFERENCE_ENGINE_API(...) extern "C" __declspec(dllexport) __VA_ARGS__ __cdecl
|
||||
#define INFERENCE_ENGINE_API_CPP(...) __declspec(dllexport) __VA_ARGS__ __cdecl
|
||||
#define INFERENCE_ENGINE_API_CLASS(...) __declspec(dllexport) __VA_ARGS__
|
||||
#else
|
||||
#define INFERENCE_ENGINE_API(...) extern "C" __declspec(dllimport) __VA_ARGS__ __cdecl
|
||||
#define INFERENCE_ENGINE_API_CPP(...) __declspec(dllimport) __VA_ARGS__ __cdecl
|
||||
#define INFERENCE_ENGINE_API_CLASS(...) __declspec(dllimport) __VA_ARGS__
|
||||
#endif
|
||||
#else
|
||||
#define INFERENCE_ENGINE_CDECL __attribute__((cdecl))
|
||||
#define INFERENCE_ENGINE_API(...) extern "C" __attribute__((visibility("default"))) __VA_ARGS__
|
||||
#define INFERENCE_ENGINE_API_CPP(...) __attribute__((visibility("default"))) __VA_ARGS__
|
||||
#define INFERENCE_ENGINE_API_CLASS(...) __attribute__((visibility("default"))) __VA_ARGS__
|
||||
#endif
|
||||
# if defined(_WIN32)
|
||||
# define INFERENCE_ENGINE_CDECL
|
||||
# ifdef IMPLEMENT_INFERENCE_ENGINE_API
|
||||
# define INFERENCE_ENGINE_API(...) extern "C" __declspec(dllexport) __VA_ARGS__ __cdecl
|
||||
# define INFERENCE_ENGINE_API_CPP(...) __declspec(dllexport) __VA_ARGS__ __cdecl
|
||||
# define INFERENCE_ENGINE_API_CLASS(...) __declspec(dllexport) __VA_ARGS__
|
||||
# else
|
||||
# define INFERENCE_ENGINE_API(...) extern "C" __declspec(dllimport) __VA_ARGS__ __cdecl
|
||||
# define INFERENCE_ENGINE_API_CPP(...) __declspec(dllimport) __VA_ARGS__ __cdecl
|
||||
# define INFERENCE_ENGINE_API_CLASS(...) __declspec(dllimport) __VA_ARGS__
|
||||
# endif
|
||||
# else
|
||||
# define INFERENCE_ENGINE_CDECL __attribute__((cdecl))
|
||||
# define INFERENCE_ENGINE_API(...) extern "C" __attribute__((visibility("default"))) __VA_ARGS__
|
||||
# define INFERENCE_ENGINE_API_CPP(...) __attribute__((visibility("default"))) __VA_ARGS__
|
||||
# define INFERENCE_ENGINE_API_CLASS(...) __attribute__((visibility("default"))) __VA_ARGS__
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
#define INFERENCE_ENGINE_DEPRECATED(msg) __declspec(deprecated(msg))
|
||||
# define INFERENCE_ENGINE_DEPRECATED(msg) __declspec(deprecated(msg))
|
||||
#elif defined __INTEL_COMPILER
|
||||
#define INFERENCE_ENGINE_DEPRECATED(msg) __attribute__((deprecated(msg)))
|
||||
# define INFERENCE_ENGINE_DEPRECATED(msg) __attribute__((deprecated(msg)))
|
||||
#elif defined(__GNUC__)
|
||||
#define INFERENCE_ENGINE_DEPRECATED(msg) __attribute__((deprecated((msg))))
|
||||
# define INFERENCE_ENGINE_DEPRECATED(msg) __attribute__((deprecated((msg))))
|
||||
#else
|
||||
#define INFERENCE_ENGINE_DEPRECATED(msg)
|
||||
# define INFERENCE_ENGINE_DEPRECATED(msg)
|
||||
#endif
|
||||
|
||||
#if defined IMPLEMENT_INFERENCE_ENGINE_API || defined IMPLEMENT_INFERENCE_ENGINE_PLUGIN
|
||||
@@ -63,32 +62,32 @@
|
||||
|
||||
// Suppress warning "-Wdeprecated-declarations" / C4996
|
||||
#if defined(_MSC_VER)
|
||||
#define IE_DO_PRAGMA(x) __pragma(x)
|
||||
# define IE_DO_PRAGMA(x) __pragma(x)
|
||||
#elif defined(__GNUC__)
|
||||
#define IE_DO_PRAGMA(x) _Pragma(#x)
|
||||
# define IE_DO_PRAGMA(x) _Pragma(#x)
|
||||
#else
|
||||
#define IE_DO_PRAGMA(x)
|
||||
# define IE_DO_PRAGMA(x)
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && !defined(__clang__)
|
||||
#define IE_SUPPRESS_DEPRECATED_START \
|
||||
IE_DO_PRAGMA(warning(push)) \
|
||||
IE_DO_PRAGMA(warning(disable : 4996))
|
||||
#define IE_SUPPRESS_DEPRECATED_END IE_DO_PRAGMA(warning(pop))
|
||||
# define IE_SUPPRESS_DEPRECATED_START \
|
||||
IE_DO_PRAGMA(warning(push)) \
|
||||
IE_DO_PRAGMA(warning(disable : 4996))
|
||||
# define IE_SUPPRESS_DEPRECATED_END IE_DO_PRAGMA(warning(pop))
|
||||
#elif defined(__INTEL_COMPILER)
|
||||
#define IE_SUPPRESS_DEPRECATED_START \
|
||||
IE_DO_PRAGMA(warning(push)) \
|
||||
IE_DO_PRAGMA(warning(disable : 1478))
|
||||
IE_DO_PRAGMA(warning(disable : 1786))
|
||||
#define IE_SUPPRESS_DEPRECATED_END IE_DO_PRAGMA(warning(pop))
|
||||
# define IE_SUPPRESS_DEPRECATED_START \
|
||||
IE_DO_PRAGMA(warning(push)) \
|
||||
IE_DO_PRAGMA(warning(disable : 1478))
|
||||
IE_DO_PRAGMA(warning(disable : 1786))
|
||||
# define IE_SUPPRESS_DEPRECATED_END IE_DO_PRAGMA(warning(pop))
|
||||
#elif defined(__clang__) || ((__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ > 405))
|
||||
#define IE_SUPPRESS_DEPRECATED_START \
|
||||
IE_DO_PRAGMA(GCC diagnostic push) \
|
||||
IE_DO_PRAGMA(GCC diagnostic ignored "-Wdeprecated-declarations")
|
||||
#define IE_SUPPRESS_DEPRECATED_END IE_DO_PRAGMA(GCC diagnostic pop)
|
||||
# define IE_SUPPRESS_DEPRECATED_START \
|
||||
IE_DO_PRAGMA(GCC diagnostic push) \
|
||||
IE_DO_PRAGMA(GCC diagnostic ignored "-Wdeprecated-declarations")
|
||||
# define IE_SUPPRESS_DEPRECATED_END IE_DO_PRAGMA(GCC diagnostic pop)
|
||||
#else
|
||||
#define IE_SUPPRESS_DEPRECATED_START
|
||||
#define IE_SUPPRESS_DEPRECATED_END
|
||||
# define IE_SUPPRESS_DEPRECATED_START
|
||||
# define IE_SUPPRESS_DEPRECATED_END
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
@@ -111,3 +110,25 @@
|
||||
# define ENABLE_UNICODE_PATH_SUPPORT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def INFERENCE_PLUGIN_API(type)
|
||||
* @brief Defines Inference Engine Plugin API method
|
||||
* @param type A plugin type
|
||||
*/
|
||||
|
||||
#if defined(_WIN32)
|
||||
# ifdef IMPLEMENT_INFERENCE_ENGINE_PLUGIN
|
||||
# define INFERENCE_PLUGIN_API(type) extern "C" __declspec(dllexport) type
|
||||
# else
|
||||
# define INFERENCE_PLUGIN_API(type) extern "C" type
|
||||
# endif
|
||||
#elif (__GNUC__ >= 4) // NOLINT
|
||||
# ifdef IMPLEMENT_INFERENCE_ENGINE_PLUGIN
|
||||
# define INFERENCE_PLUGIN_API(type) extern "C" __attribute__((visibility("default"))) type
|
||||
# else
|
||||
# define INFERENCE_PLUGIN_API(type) extern "C" type
|
||||
# endif
|
||||
#else
|
||||
# define INFERENCE_PLUGIN_API(TYPE) extern "C" TYPE
|
||||
#endif
|
||||
|
||||
@@ -25,28 +25,6 @@
|
||||
#include "ie_iexecutable_network.hpp"
|
||||
#include "ie_version.hpp"
|
||||
|
||||
/**
|
||||
* @def INFERENCE_PLUGIN_API(type)
|
||||
* @brief Defines Inference Engine Plugin API method
|
||||
* @param type A plugin type
|
||||
*/
|
||||
|
||||
#if defined(_WIN32)
|
||||
#ifdef IMPLEMENT_INFERENCE_ENGINE_PLUGIN
|
||||
#define INFERENCE_PLUGIN_API(type) extern "C" __declspec(dllexport) type
|
||||
#else
|
||||
#define INFERENCE_PLUGIN_API(type) extern "C" type
|
||||
#endif
|
||||
#elif (__GNUC__ >= 4) // NOLINT
|
||||
#ifdef IMPLEMENT_INFERENCE_ENGINE_PLUGIN
|
||||
#define INFERENCE_PLUGIN_API(type) extern "C" __attribute__((visibility("default"))) type
|
||||
#else
|
||||
#define INFERENCE_PLUGIN_API(type) extern "C" type
|
||||
#endif
|
||||
#else
|
||||
#define INFERENCE_PLUGIN_API(TYPE) extern "C" TYPE
|
||||
#endif
|
||||
|
||||
namespace InferenceEngine {
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user