true.hpp
1 //*****************************************************************************
2 // Copyright 2017-2021 Intel Corporation
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //*****************************************************************************
16 
17 #pragma once
18 
19 #include "ngraph/node.hpp"
20 #include "ngraph/pattern/op/pattern.hpp"
21 
22 namespace ngraph
23 {
24  namespace pattern
25  {
26  namespace op
27  {
28  /// \brief The match always succeeds.
29  class NGRAPH_API True : public Pattern
30  {
31  public:
32  static constexpr NodeTypeInfo type_info{"patternTrue", 0};
33  const NodeTypeInfo& get_type_info() const override;
34  /// \brief Always matches, does not add node to match list.
35  True()
36  : Pattern(OutputVector{})
37  {
38  }
39  bool match_value(pattern::Matcher* matcher,
40  const Output<Node>& pattern_value,
41  const Output<Node>& graph_value) override;
42  };
43  }
44  }
45 }
A handle for one of a node's outputs.
Definition: node_output.hpp:42
Definition: matcher.hpp:75
Definition: pattern.hpp:82
The match always succeeds.
Definition: true.hpp:30
True()
Always matches, does not add node to match list.
Definition: true.hpp:35
const NodeTypeInfo & get_type_info() const override
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:28
Definition: type.hpp:39