dft.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 <cstddef>
20 #include <vector>
21 #include "ngraph/attribute_adapter.hpp"
22 #include "ngraph/op/op.hpp"
23 #include "ngraph/op/util/attr_types.hpp"
24 #include "ngraph/op/util/fft_base.hpp"
25 
26 namespace ngraph
27 {
28  namespace op
29  {
30  namespace v7
31  {
32  /// \brief An operation DFT that computes the discrete Fourier transformation.
33  class NGRAPH_API DFT : public util::FFTBase
34  {
35  public:
36  NGRAPH_RTTI_DECLARATION;
37  DFT() = default;
38 
39  /// \brief Constructs a DFT operation. DFT is performed for full size axes.
40  ///
41  /// \param data Input data
42  /// \param axes Axes to perform DFT
43  DFT(const Output<Node>& data, const Output<Node>& axes);
44 
45  /// \brief Constructs a DFT operation.
46  ///
47  /// \param data Input data
48  /// \param axes Axes to perform DFT
49  /// \param signal_size Signal sizes for 'axes'
50  DFT(const Output<Node>& data,
51  const Output<Node>& axes,
52  const Output<Node>& signal_size);
53 
54  bool visit_attributes(AttributeVisitor& visitor) override;
55 
56  std::shared_ptr<Node>
57  clone_with_new_inputs(const OutputVector& new_args) const override;
58  };
59  } // namespace v7
60  } // namespace op
61 } // 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
Base class for operations DFT and DFT.
Definition: fft_base.hpp:18
An operation DFT that computes the discrete Fourier transformation.
Definition: dft.hpp:34
DFT(const Output< Node > &data, const Output< Node > &axes, const Output< Node > &signal_size)
Constructs a DFT operation.
DFT(const Output< Node > &data, const Output< Node > &axes)
Constructs a DFT operation. DFT is performed for full size axes.
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:16