7 #include "ngraph/node.hpp"
8 #include "ngraph/pattern/op/pattern.hpp"
28 static constexpr
NodeTypeInfo type_info{
"patternLabel", 0};
45 const ValuePredicate pred,
46 const OutputVector& wrapped_values)
47 :
Pattern(OutputVector{wrap_values(wrapped_values)}, pred)
49 set_output_type(0, type, s);
55 type, s, [](const
Output<
Node>&) {
return true; }, OutputVector())
60 : Label(type, s, pred, OutputVector{})
64 Label(
const element::Type& type,
const PartialShape& s, NodePredicate pred)
65 : Label(type, s, as_value_predicate(pred), OutputVector{})
69 Label(
const element::Type& type,
70 const PartialShape& s,
71 const NodePredicate pred,
72 const NodeVector& wrapped_values)
73 : Label(type, s, as_value_predicate(pred), as_output_vector(wrapped_values))
90 const ValuePredicate pred,
91 const OutputVector& wrapped_values)
93 value.get_element_type(), value.get_partial_shape(), pred, wrapped_values)
98 value.get_element_type(), value.get_partial_shape(), pred, OutputVector{})
102 Label(
const Output<Node>& value,
const NodePredicate pred)
103 : Label(value.get_element_type(),
104 value.get_partial_shape(),
105 as_value_predicate(pred),
111 value.get_element_type(),
112 value.get_partial_shape(),
117 Label(
const Output<Node>& node,
118 const NodePredicate pred,
119 const NodeVector& wrapped_values)
120 : Label(node.get_element_type(),
121 node.get_partial_shape(),
122 as_value_predicate(pred),
123 as_output_vector(wrapped_values))
127 bool match_value(Matcher* matcher,
128 const Output<Node>& pattern_value,
129 const Output<Node>& graph_value)
override;
132 static Output<Node> wrap_values(
const OutputVector& wrapped_values);
137 std::shared_ptr<Node> any_input();
140 std::shared_ptr<Node> any_input(
const pattern::op::ValuePredicate& pred);
A handle for one of a node's outputs.
Definition: node_output.hpp:33
Definition: node_output.hpp:25
Class representing a shape that may be partially or totally dynamic.
Definition: partial_shape.hpp:34
static PartialShape dynamic(Rank r=Rank::dynamic())
Construct a PartialShape with the given rank and all dimensions (if any) dynamic.
Definition: element_type.hpp:51
Label(const element::Type &type, const PartialShape &s, const ValuePredicate pred, const OutputVector &wrapped_values)
creates a Label node containing a sub-pattern described by
Definition: label.hpp:43
Label(const Output< Node > &value, const ValuePredicate pred, const OutputVector &wrapped_values)
creates a Label node containing a sub-pattern described by the type and shape of
Definition: label.hpp:89
const NodeTypeInfo & get_type_info() const override
Definition: pattern.hpp:73
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:16