exp.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/unary_elementwise_arithmetic.hpp"
8 
9 namespace ngraph
10 {
11  namespace op
12  {
13  namespace v0
14  {
15  /// \brief Elementwise natural exponential (exp) operation.
16  class NGRAPH_API Exp : public util::UnaryElementwiseArithmetic
17  {
18  public:
19  NGRAPH_RTTI_DECLARATION;
20 
21  /// \brief Constructs an exponential operation.
22  Exp() = default;
23  /// \brief Constructs an exponential operation.
24  ///
25  /// \param arg Node that produces the input tensor.
26  Exp(const Output<Node>& arg);
27 
28  bool visit_attributes(AttributeVisitor& visitor) override;
29  virtual std::shared_ptr<Node>
30  clone_with_new_inputs(const OutputVector& new_args) const override;
31 
32  bool evaluate(const HostTensorVector& outputs,
33  const HostTensorVector& inputs) const override;
34  bool has_evaluate() const override;
35  };
36  } // namespace v0
37  using v0::Exp;
38  } // namespace op
39 } // namespace ngraph
Visits the attributes of a node, primarily for serialization-like tasks.
Definition: attribute_visitor.hpp:59
A handle for one of a node's outputs.
Definition: node_output.hpp:33
Abstract base class for elementwise unary arithmetic operations, i.e., operations where the same scal...
Definition: unary_elementwise_arithmetic.hpp:37
Elementwise natural exponential (exp) operation.
Definition: exp.hpp:17
Exp()=default
Constructs an exponential operation.
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.
Exp(const Output< Node > &arg)
Constructs an exponential operation.
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:16