diff --git a/inference-engine/include/ie_blob.h b/inference-engine/include/ie_blob.h index 1f23ab87b22..dbe264c054d 100644 --- a/inference-engine/include/ie_blob.h +++ b/inference-engine/include/ie_blob.h @@ -576,14 +576,7 @@ public: /** *@brief Virtual destructor. */ - -#if defined(__clang__) && !defined(__SYCL_COMPILER_VERSION) virtual ~TBlob(); -#else - virtual ~TBlob() { - free(); - } -#endif // __clang__ && !__SYCL_COMPILER_VERSION /** * @brief Gets the size of the given type. @@ -806,7 +799,6 @@ protected: } }; -#if defined(__clang__) && !defined(__SYCL_COMPILER_VERSION) extern template class INFERENCE_ENGINE_API_CLASS(InferenceEngine::TBlob); extern template class INFERENCE_ENGINE_API_CLASS(InferenceEngine::TBlob); extern template class INFERENCE_ENGINE_API_CLASS(InferenceEngine::TBlob); @@ -819,7 +811,8 @@ extern template class INFERENCE_ENGINE_API_CLASS(InferenceEngine::TBlob); extern template class INFERENCE_ENGINE_API_CLASS(InferenceEngine::TBlob); extern template class INFERENCE_ENGINE_API_CLASS(InferenceEngine::TBlob); extern template class INFERENCE_ENGINE_API_CLASS(InferenceEngine::TBlob); -#endif // __clang__ && !__SYCL_COMPILER_VERSION +extern template class INFERENCE_ENGINE_API_CLASS(InferenceEngine::TBlob); +extern template class INFERENCE_ENGINE_API_CLASS(InferenceEngine::TBlob); /** * @brief Creates a blob with the given tensor descriptor. diff --git a/inference-engine/include/ie_parameter.hpp b/inference-engine/include/ie_parameter.hpp index cc5cabe3609..086556151f7 100644 --- a/inference-engine/include/ie_parameter.hpp +++ b/inference-engine/include/ie_parameter.hpp @@ -274,11 +274,11 @@ private: struct HasOperatorEqual : CheckOperatorEqual::type {}; struct Any { -#if defined(__clang__) && !defined(__SYCL_COMPILER_VERSION) +#ifdef __ANDROID__ virtual ~Any(); #else virtual ~Any() = default; -#endif // __clang__ && !__SYCL_COMPILER_VERSION +#endif virtual bool is(const std::type_info&) const = 0; virtual Any* copy() const = 0; virtual bool operator==(const Any& rhs) const = 0; @@ -335,7 +335,7 @@ private: Any* ptr = nullptr; }; -#if defined(__clang__) && !defined(__SYCL_COMPILER_VERSION) +#ifdef __ANDROID__ extern template struct INFERENCE_ENGINE_API_CLASS(InferenceEngine::Parameter::RealData); extern template struct INFERENCE_ENGINE_API_CLASS(InferenceEngine::Parameter::RealData); extern template struct INFERENCE_ENGINE_API_CLASS(InferenceEngine::Parameter::RealData); @@ -350,6 +350,6 @@ extern template struct INFERENCE_ENGINE_API_CLASS( InferenceEngine::Parameter::RealData>); extern template struct INFERENCE_ENGINE_API_CLASS( InferenceEngine::Parameter::RealData>); -#endif // __clang__ && !__SYCL_COMPILER_VERSION +#endif } // namespace InferenceEngine diff --git a/inference-engine/src/gna_plugin/gna_plugin.cpp b/inference-engine/src/gna_plugin/gna_plugin.cpp index b360399c8ce..f94244889b2 100644 --- a/inference-engine/src/gna_plugin/gna_plugin.cpp +++ b/inference-engine/src/gna_plugin/gna_plugin.cpp @@ -85,12 +85,10 @@ using namespace std; using namespace GNAPluginNS; using namespace InferenceEngine::details; -#ifdef __clang__ namespace InferenceEngine { template<> - InferenceEngine::TBlob >::~TBlob() { free(); } + InferenceEngine::TBlob >::~TBlob() { free(); } } -#endif // __clang__ template void GNAPlugin::copyInputData(T *dst, diff --git a/inference-engine/src/inference_engine/ie_common.cpp b/inference-engine/src/inference_engine/ie_common.cpp index 6cdab87784c..9fb105c0fd8 100644 --- a/inference-engine/src/inference_engine/ie_common.cpp +++ b/inference-engine/src/inference_engine/ie_common.cpp @@ -102,7 +102,7 @@ Parameter::~Parameter() { clear(); } -#if defined(__clang__) && !defined(__SYCL_COMPILER_VERSION) +#ifdef __ANDROID__ Parameter::Any::~Any() {} template struct Parameter::RealData; @@ -118,6 +118,7 @@ template struct Parameter::RealData>; template struct Parameter::RealData>; template struct Parameter::RealData>; template struct Parameter::RealData; +#endif // // ie_blob.h @@ -140,6 +141,7 @@ template class TBlob; template class TBlob; template class TBlob; template class TBlob; -#endif // defined(__clang__) && !defined(__SYCL_COMPILER_VERSION) +template class TBlob; +template class TBlob; -} // namespace InferenceEngine \ No newline at end of file +} // namespace InferenceEngine diff --git a/ngraph/test/util/engine/ie_engines.cpp b/ngraph/test/util/engine/ie_engines.cpp index 447df74cf49..a7af958304f 100644 --- a/ngraph/test/util/engine/ie_engines.cpp +++ b/ngraph/test/util/engine/ie_engines.cpp @@ -315,20 +315,14 @@ void test::IE_Engine::reset() namespace InferenceEngine { -// those definitions and template specializations are required for clang (both Linux and Mac) // Without this section the linker is not able to find destructors for missing TBlob specializations // which are instantiated in the unit tests that use TestCase and this engine -#ifdef __clang__ template TBlob::~TBlob() { free(); } - template class TBlob; - template class TBlob; template class TBlob; template class TBlob; - template class TBlob; -#endif } // namespace InferenceEngine