Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / thirdparty / clDNN / api / CPP / topology.hpp
index e5a44e4..37481ab 100644 (file)
@@ -61,6 +61,13 @@ struct topology
         return *this;
     }
 
+    /// Construct C++ topology based on C API @p cldnn_topology
+    topology(const cldnn_topology& other) 
+        :_impl(other)
+    {
+        if (_impl == nullptr) throw std::invalid_argument("implementation pointer should not be null");
+    }
+
     /// @brief Releases wrapped C API @ref cldnn_topology.
     ~topology()
     {
@@ -124,11 +131,6 @@ private:
     friend struct network;
     cldnn_topology _impl;
 
-    topology(cldnn_topology impl) :_impl(impl)
-    {
-        if (_impl == nullptr) throw std::invalid_argument("implementation pointer should not be null");
-    }
-
     void retain()
     {
         check_status<void>("retain topology failed", [=](status_t* status) { cldnn_retain_topology(_impl, status); });