multiply.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 multiplication operation.
16  class NGRAPH_API Multiply : public util::BinaryElementwiseArithmetic
17  {
18  public:
19  NGRAPH_RTTI_DECLARATION;
20 
21  /// \brief Constructs a multiplication operation.
23  : util::BinaryElementwiseArithmetic(AutoBroadcastSpec::NUMPY)
24  {
25  }
26 
27  /// \brief Constructs a multiplication 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  Multiply(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 multiplication operation.
Definition: multiply.hpp:17
bool evaluate(const HostTensorVector &outputs, const HostTensorVector &inputs) const override
Evaluates the op on input_values putting results in output_values.
Multiply()
Constructs a multiplication operation.
Definition: multiply.hpp:22
bool has_evaluate() const override
Allows to get information about availability of evaluate method for the current operation.
Multiply(const Output< Node > &arg0, const Output< Node > &arg1, const AutoBroadcastSpec &auto_broadcast=AutoBroadcastSpec(AutoBroadcastType::NUMPY))
Constructs a multiplication operation.
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:16
Implicit broadcast specification.
Definition: attr_types.hpp:311