maximum.hpp
1 // Copyright (C) 2018-2021 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 
5 #pragma once
6 
7 #include "ngraph/op/util/binary_elementwise_arithmetic.hpp"
8 
9 namespace ngraph
10 {
11  namespace op
12  {
13  namespace v1
14  {
15  /// \brief Elementwise maximum operation.
16  class NGRAPH_API Maximum : public util::BinaryElementwiseArithmetic
17  {
18  public:
19  static constexpr NodeTypeInfo type_info{"Maximum", 1};
20  const NodeTypeInfo& get_type_info() const override { return type_info; }
21  /// \brief Constructs a maximum operation.
23  : util::BinaryElementwiseArithmetic(AutoBroadcastSpec::NUMPY)
24  {
25  }
26 
27  /// \brief Constructs a maximum operation.
28  ///
29  /// \param arg0 Node that produces the first input tensor.
30  /// \param arg1 Node that produces the second input tensor.
31  /// \param auto_broadcast Auto broadcast specification
32  Maximum(const Output<Node>& arg0,
33  const Output<Node>& arg1,
34  const AutoBroadcastSpec& auto_broadcast =
35  AutoBroadcastSpec(AutoBroadcastType::NUMPY));
36 
37  virtual std::shared_ptr<Node>
38  clone_with_new_inputs(const OutputVector& new_args) const override;
39 
40  bool evaluate(const HostTensorVector& outputs,
41  const HostTensorVector& inputs) const override;
42  bool has_evaluate() const override;
43  };
44  } // namespace v1
45  } // namespace op
46 } // namespace ngraph
A handle for one of a node's outputs.
Definition: node_output.hpp:33
Abstract base class for elementwise binary arithmetic operations, i.e., operations where the same sca...
Definition: binary_elementwise_arithmetic.hpp:43
Elementwise maximum operation.
Definition: maximum.hpp:17
const NodeTypeInfo & get_type_info() const override
Definition: maximum.hpp:20
Maximum()
Constructs a maximum operation.
Definition: maximum.hpp:22
bool evaluate(const HostTensorVector &outputs, const HostTensorVector &inputs) const override
Evaluates the op on input_values putting results in output_values.
bool has_evaluate() const override
Allows to get information about availability of evaluate method for the current operation.
Maximum(const Output< Node > &arg0, const Output< Node > &arg1, const AutoBroadcastSpec &auto_broadcast=AutoBroadcastSpec(AutoBroadcastType::NUMPY))
Constructs a maximum operation.
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:16
Definition: type.hpp:27
Implicit broadcast specification.
Definition: attr_types.hpp:311