namespace ngraph {
+template <typename T>
+VariantImpl<T>::~VariantImpl() { }
+
+template class INFERENCE_ENGINE_API_CLASS(VariantImpl<InferenceEngine::Parameter>);
+
template <>
class INFERENCE_ENGINE_API_CLASS(VariantWrapper<InferenceEngine::Parameter>) : public VariantImpl<InferenceEngine::Parameter> {
public:
std::vector<std::string> getVectorNames() const;
};
+extern template class TRANSFORMATIONS_API VariantImpl<FusedNames>;
+
template<>
class TRANSFORMATIONS_API VariantWrapper<FusedNames> : public VariantImpl<FusedNames> {
public:
std::string getPrimitivesPriority() const;
};
+extern template class TRANSFORMATIONS_API VariantImpl<PrimitivesPriority>;
+
template<>
class TRANSFORMATIONS_API VariantWrapper<PrimitivesPriority> : public VariantImpl<PrimitivesPriority> {
public:
namespace ngraph {
+template <typename T>
+VariantImpl<T>::~VariantImpl() { }
+
+template class ngraph::VariantImpl<FusedNames>;
+
constexpr VariantTypeInfo VariantWrapper<FusedNames>::type_info;
std::string FusedNames::getNames() const {
namespace ngraph {
+template <typename T>
+VariantImpl<T>::~VariantImpl() { }
+
+template class ngraph::VariantImpl<PrimitivesPriority>;
+
constexpr VariantTypeInfo VariantWrapper<PrimitivesPriority>::type_info;
std::string PrimitivesPriority::getPrimitivesPriority() const {
// Define variant for std::string
constexpr VariantTypeInfo VariantWrapper<std::string>::type_info;
constexpr VariantTypeInfo VariantWrapper<int64_t>::type_info;
+
+Variant::~Variant()
+{
+}
+
+std::shared_ptr<ngraph::Variant> Variant::init(const std::shared_ptr<ngraph::Node>& node)
+{
+ return nullptr;
+}
+
+std::shared_ptr<ngraph::Variant> Variant::merge(const ngraph::NodeVector& nodes)
+{
+ return nullptr;
+}
+
+template <typename T>
+VariantImpl<T>::~VariantImpl()
+{
+}
+
+template class ngraph::VariantImpl<std::string>;
+template class ngraph::VariantImpl<int64_t>;
{
using VariantTypeInfo = DiscreteTypeInfo;
- class Variant
+ class NGRAPH_API Variant
{
public:
- virtual ~Variant() {}
+ virtual ~Variant();
virtual const VariantTypeInfo& get_type_info() const = 0;
- virtual std::shared_ptr<ngraph::Variant> init(const std::shared_ptr<ngraph::Node>& node)
- {
- return nullptr;
- }
-
- virtual std::shared_ptr<ngraph::Variant> merge(const ngraph::NodeVector& nodes)
- {
- return nullptr;
- }
+ virtual std::shared_ptr<ngraph::Variant> init(const std::shared_ptr<ngraph::Node>& node);
+ virtual std::shared_ptr<ngraph::Variant> merge(const ngraph::NodeVector& nodes);
};
template <typename VT>
: m_value(value)
{
}
+
+ ~VariantImpl() override;
+
const value_type& get() const { return m_value; }
value_type& get() { return m_value; }
void set(const value_type& value) { m_value = value; }
value_type m_value;
};
+ extern template class NGRAPH_API VariantImpl<std::string>;
+ extern template class NGRAPH_API VariantImpl<int64_t>;
+
template <typename VT>
class VariantWrapper
{
namespace ngraph
{
+ template <typename T>
+ VariantImpl<T>::~VariantImpl()
+ {
+ }
+
template <>
class VariantWrapper<Ship> : public VariantImpl<Ship>
{