true.hpp
1 // Copyright (C) 2018-2021 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 
5 #pragma once
6 
7 #include "ngraph/node.hpp"
8 #include "ngraph/pattern/op/pattern.hpp"
9 
10 namespace ngraph
11 {
12  namespace pattern
13  {
14  namespace op
15  {
16  /// \brief The match always succeeds.
17  class NGRAPH_API True : public Pattern
18  {
19  public:
20  static constexpr NodeTypeInfo type_info{"patternTrue", 0};
21  const NodeTypeInfo& get_type_info() const override;
22  /// \brief Always matches, does not add node to match list.
23  True()
24  : Pattern(OutputVector{})
25  {
26  }
27  bool match_value(pattern::Matcher* matcher,
28  const Output<Node>& pattern_value,
29  const Output<Node>& graph_value) override;
30  };
31  } // namespace op
32  } // namespace pattern
33 } // namespace ngraph
A handle for one of a node's outputs.
Definition: node_output.hpp:33
Definition: matcher.hpp:63
Definition: pattern.hpp:73
The match always succeeds.
Definition: true.hpp:18
True()
Always matches, does not add node to match list.
Definition: true.hpp:23
const NodeTypeInfo & get_type_info() const override
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:16
Definition: type.hpp:27