less_eq.hpp
1 //*****************************************************************************
2 // Copyright 2017-2020 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/op/util/binary_elementwise_comparison.hpp"
20 
21 namespace ngraph
22 {
23  namespace op
24  {
25  namespace v1
26  {
27  /// \brief Elementwise less-than-or-equal operation.
28  class NGRAPH_API LessEqual : public util::BinaryElementwiseComparison
29  {
30  public:
31  NGRAPH_RTTI_DECLARATION;
32  /// \brief Constructs a less-than-or-equal operation.
34  : util::BinaryElementwiseComparison(AutoBroadcastSpec::NUMPY)
35  {
36  }
37 
38  /// \brief Constructs a less-than-or-equal operation.
39  ///
40  /// \param arg0 Node that produces the first input tensor.
41  /// \param arg1 Node that produces the second input tensor.
42  /// \param auto_broadcast Auto broadcast specification
43  LessEqual(const Output<Node>& arg0,
44  const Output<Node>& arg1,
45  const AutoBroadcastSpec& auto_broadcast =
46  AutoBroadcastSpec(AutoBroadcastType::NUMPY));
47 
48  virtual std::shared_ptr<Node>
49  clone_with_new_inputs(const OutputVector& new_args) const override;
50  bool evaluate(const HostTensorVector& outputs,
51  const HostTensorVector& inputs) const override;
52  };
53  } // namespace v1
54 
55  namespace v0
56  {
57  /// \brief Elementwise less-than-or-equal operation.
58  class NGRAPH_DEPRECATED(
59  "This operation is deprecated and will be removed soon. "
60  "Use v1::LessEqual instead of it.") NGRAPH_API LessEq
62  {
63  NGRAPH_SUPPRESS_DEPRECATED_START
64  public:
65  static constexpr NodeTypeInfo type_info{"LessEq", 0};
66  const NodeTypeInfo& get_type_info() const override { return type_info; }
67  /// \brief Constructs a less-than-or-equal operation.
68  LessEq()
69  : util::BinaryElementwiseComparison(AutoBroadcastSpec::NONE)
70  {
71  }
72  /// \brief Constructs a less-than-or-equal operation.
73  ///
74  /// \param arg0 Node that produces the first input tensor.
75  /// \param arg1 Node that produces the second input tensor.
76  /// \param auto_broadcast Auto broadcast specification
77  LessEq(const Output<Node>& arg0,
78  const Output<Node>& arg1,
79  const AutoBroadcastSpec& auto_broadcast = AutoBroadcastSpec());
80 
81  virtual std::shared_ptr<Node>
82  clone_with_new_inputs(const OutputVector& new_args) const override;
83  bool evaluate(const HostTensorVector& outputs,
84  const HostTensorVector& inputs) const override;
85  NGRAPH_SUPPRESS_DEPRECATED_END
86  };
87  } // namespace v0
88 
89  NGRAPH_SUPPRESS_DEPRECATED_START
90  using v0::LessEq;
91  NGRAPH_SUPPRESS_DEPRECATED_END
92  } // namespace op
93 } // namespace ngraph
ngraph::op::util::BinaryElementwiseComparison
Abstract base class for elementwise binary comparison operations, i.e., operations where the same sca...
Definition: binary_elementwise_comparison.hpp:55
ngraph::op::AutoBroadcastSpec
Implicit broadcast specification.
Definition: attr_types.hpp:321
ngraph::op::v1::LessEqual::LessEqual
LessEqual(const Output< Node > &arg0, const Output< Node > &arg1, const AutoBroadcastSpec &auto_broadcast=AutoBroadcastSpec(AutoBroadcastType::NUMPY))
Constructs a less-than-or-equal operation.
ngraph::op::v1::LessEqual
Elementwise less-than-or-equal operation.
Definition: less_eq.hpp:29
ngraph::op::v1::LessEqual::LessEqual
LessEqual()
Constructs a less-than-or-equal operation.
Definition: less_eq.hpp:33
ngraph
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:28