19 #include "ngraph/node.hpp"
20 #include "ngraph/pattern/op/pattern.hpp"
38 static constexpr
NodeTypeInfo type_info{
"patternAnyOf", 0};
45 const OutputVector& wrapped_values)
48 if (wrapped_values.size() != 1)
50 throw ngraph_error(
"AnyOf expects exactly one argument");
52 set_output_type(0, type, s);
57 const NodeVector& wrapped_values)
61 return pred(value.get_node_shared_ptr());
63 as_output_vector(wrapped_values))
71 const OutputVector& wrapped_values)
72 :
AnyOf(node.get_element_type(), node.get_partial_shape(), pred, wrapped_values)
75 AnyOf(std::shared_ptr<Node> node,
77 const NodeVector& wrapped_values)
78 :
AnyOf(node, as_value_predicate(pred), as_output_vector(wrapped_values))
81 bool match_value(
Matcher* matcher,
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
Definition: element_type.hpp:61
Base error for ngraph runtime errors.
Definition: except.hpp:28
Definition: matcher.hpp:75
Definition: any_of.hpp:36
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:69
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:42
Definition: pattern.hpp:82
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:28