Merge remote-tracking branch 'upstream/3.4' into merge-3.4
authorAlexander Alekhin <alexander.alekhin@intel.com>
Wed, 19 Sep 2018 07:54:15 +0000 (10:54 +0300)
committerAlexander Alekhin <alexander.alekhin@intel.com>
Wed, 19 Sep 2018 07:58:43 +0000 (10:58 +0300)
1  2 
modules/dnn/include/opencv2/dnn/dnn.hpp
modules/dnn/src/op_inf_engine.cpp

@@@ -937,8 -944,15 +937,15 @@@ CV__DNN_INLINE_NS_BEGI
                               CV_OUT std::vector<int>& indices,
                               const float eta = 1.f, const int top_k = 0);
  
+     /** @brief Release a Myriad device is binded by OpenCV.
+      *
+      * Single Myriad device cannot be shared across multiple processes which uses
+      * Inference Engine's Myriad plugin.
+      */
+     CV_EXPORTS_W void resetMyriadDevice();
  //! @}
 -CV__DNN_EXPERIMENTAL_NS_END
 +CV__DNN_INLINE_NS_END
  }
  }
  
@@@ -589,4 -590,14 +590,14 @@@ void forwardInfEngine(Ptr<BackendNode>
  #endif  // HAVE_INF_ENGINE
  }
  
 -CV__DNN_EXPERIMENTAL_NS_BEGIN
++CV__DNN_INLINE_NS_BEGIN
+ void resetMyriadDevice()
+ {
+ #ifdef HAVE_INF_ENGINE
+     sharedPlugins.erase(InferenceEngine::TargetDevice::eMYRIAD);
+ #endif  // HAVE_INF_ENGINE
+ }
 -CV__DNN_EXPERIMENTAL_NS_END
++CV__DNN_INLINE_NS_END
  }}  // namespace dnn, namespace cv