19 #include "ngraph/node.hpp"
20 #include "ngraph/pattern/op/pattern.hpp"
40 static constexpr
NodeTypeInfo type_info{
"patternLabel", 0};
57 const ValuePredicate pred,
58 const OutputVector& wrapped_values)
59 :
Pattern(OutputVector{wrap_values(wrapped_values)}, pred)
61 set_output_type(0, type, s);
66 :
Label(type, s, [](const
Output<
Node>&) {
return true; }, OutputVector())
71 : Label(type, s, pred, OutputVector{})
75 Label(
const element::Type& type,
const PartialShape& s, NodePredicate pred)
76 : Label(type, s, as_value_predicate(pred), OutputVector{})
80 Label(
const element::Type& type,
81 const PartialShape& s,
82 const NodePredicate pred,
83 const NodeVector& wrapped_values)
84 : Label(type, s, as_value_predicate(pred), as_output_vector(wrapped_values))
101 const ValuePredicate pred,
102 const OutputVector& wrapped_values)
104 value.get_element_type(), value.get_partial_shape(), pred, wrapped_values)
109 value.get_element_type(), value.get_partial_shape(), pred, OutputVector{})
113 Label(
const Output<Node>& value,
const NodePredicate pred)
114 : Label(value.get_element_type(),
115 value.get_partial_shape(),
116 as_value_predicate(pred),
121 : Label(value.get_element_type(),
122 value.get_partial_shape(),
127 Label(
const Output<Node>& node,
128 const NodePredicate pred,
129 const NodeVector& wrapped_values)
130 : Label(node.get_element_type(),
131 node.get_partial_shape(),
132 as_value_predicate(pred),
133 as_output_vector(wrapped_values))
137 bool match_value(Matcher* matcher,
138 const Output<Node>& pattern_value,
139 const Output<Node>& graph_value)
override;
142 static Output<Node> wrap_values(
const OutputVector& wrapped_values);
147 std::shared_ptr<Node> any_input();
150 std::shared_ptr<Node> any_input(
const pattern::op::ValuePredicate& pred);
A handle for one of a node's outputs.
Definition: node_output.hpp:42
Definition: node_output.hpp:36
Class representing a shape that may be partially or totally dynamic.
Definition: partial_shape.hpp:46
static PartialShape dynamic(Rank r=Rank::dynamic())
Construct a PartialShape with the given rank and all dimensions (if any) dynamic.
Definition: element_type.hpp:61
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:55
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:100
const NodeTypeInfo & get_type_info() const override
Definition: pattern.hpp:82
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:28