Commit 405b08f5 authored by Scott Cyphers's avatar Scott Cyphers

Convert pattern ops to type_name

parent e57c0f0f
......@@ -34,7 +34,7 @@ namespace ngraph
const PartialShape& s,
Predicate pred,
const NodeVector& wrapped_nodes)
: Pattern("Any", wrapped_nodes, pred)
: Pattern(wrapped_nodes, pred)
{
if (!pred)
{
......@@ -51,6 +51,12 @@ namespace ngraph
wrapped_nodes)
{
}
const std::string& description() const override
{
static std::string desc = "Any";
return desc;
}
};
}
}
......
......@@ -40,7 +40,7 @@ namespace ngraph
const PartialShape& s,
Predicate pred,
const NodeVector& wrapped_nodes)
: Pattern("AnyOf", wrapped_nodes, pred)
: Pattern(wrapped_nodes, pred)
{
if (!pred)
{
......@@ -62,6 +62,12 @@ namespace ngraph
wrapped_nodes)
{
}
const std::string& description() const override
{
static std::string desc = "AnyOf";
return desc;
}
};
}
}
......
......@@ -44,7 +44,7 @@ namespace ngraph
const PartialShape& s,
Predicate pred = nullptr,
const NodeVector& wrapped_nodes = NodeVector{})
: Pattern("Label", wrapped_nodes, pred)
: Pattern(wrapped_nodes, pred)
{
set_output_type(0, type, s);
}
......@@ -67,6 +67,12 @@ namespace ngraph
wrapped_nodes)
{
}
const std::string& description() const override
{
static std::string desc = "Label";
return desc;
}
};
}
}
......
......@@ -33,8 +33,8 @@ namespace ngraph
public:
/// \brief \p a base class for \sa Skip and \sa Label
///
Pattern(const std::string& type_name, const NodeVector& nodes, Predicate pred)
: Node(type_name, nodes)
Pattern(const NodeVector& nodes, Predicate pred)
: Node(nodes)
, m_predicate(pred)
{
}
......
......@@ -32,10 +32,16 @@ namespace ngraph
{
public:
Skip(const std::shared_ptr<Node>& arg, Predicate predicate = nullptr)
: Pattern("Skip", NodeVector{arg}, predicate)
: Pattern(NodeVector{arg}, predicate)
{
set_output_type(0, arg->get_element_type(), arg->get_output_partial_shape(0));
}
const std::string& description() const override
{
static std::string desc = "Skip";
return desc;
}
};
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment