7 #include "ngraph/node.hpp"
8 #include "ngraph/pattern/op/pattern.hpp"
26 static constexpr
NodeTypeInfo type_info{
"patternAnyOf", 0};
33 const OutputVector& wrapped_values)
36 if (wrapped_values.size() != 1)
38 throw ngraph_error(
"AnyOf expects exactly one argument");
40 set_output_type(0, type, s);
45 const NodeVector& wrapped_values)
50 return pred(value.get_node_shared_ptr());
52 as_output_vector(wrapped_values))
60 const OutputVector& wrapped_values)
61 :
AnyOf(node.get_element_type(), node.get_partial_shape(), pred, wrapped_values)
64 AnyOf(std::shared_ptr<Node> node,
66 const NodeVector& wrapped_values)
67 :
AnyOf(node, as_value_predicate(pred), as_output_vector(wrapped_values))
70 bool match_value(
Matcher* matcher,
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
Definition: element_type.hpp:51
Base error for ngraph runtime errors.
Definition: except.hpp:16
Definition: matcher.hpp:63
Definition: any_of.hpp:24
const NodeTypeInfo & get_type_info() const override
AnyOf(const Output< Node > &node, ValuePredicate pred, const OutputVector &wrapped_values)
creates a AnyOf node containing a sub-pattern described by the type and shape of
Definition: any_of.hpp:58
AnyOf(const element::Type &type, const PartialShape &s, ValuePredicate pred, const OutputVector &wrapped_values)
creates a AnyOf node containing a sub-pattern described by
Definition: any_of.hpp:30
Definition: pattern.hpp:73
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:16