5#ifndef GKO_PUBLIC_CORE_MATRIX_FFT_HPP_
6#define GKO_PUBLIC_CORE_MATRIX_FFT_HPP_
9#include <ginkgo/core/base/array.hpp>
10#include <ginkgo/core/base/lin_op.hpp>
57 using value_type = std::complex<double>;
58 using index_type =
int64;
73 dim<1> get_fft_size()
const;
75 bool is_inverse()
const;
84 static std::unique_ptr<Fft>
create(std::shared_ptr<const Executor> exec);
94 static std::unique_ptr<Fft>
create(std::shared_ptr<const Executor> exec,
99 Fft(std::shared_ptr<const Executor> exec,
size_type size = 0,
102 void apply_impl(
const LinOp* b,
LinOp* x)
const override;
105 LinOp* x)
const override;
155 using value_type = std::complex<double>;
156 using index_type =
int64;
171 dim<2> get_fft_size()
const;
173 bool is_inverse()
const;
182 static std::unique_ptr<Fft2>
create(std::shared_ptr<const Executor> exec);
191 static std::unique_ptr<Fft2>
create(std::shared_ptr<const Executor> exec,
203 static std::unique_ptr<Fft2>
create(std::shared_ptr<const Executor> exec,
208 Fft2(std::shared_ptr<const Executor> exec,
size_type size1 = 0,
211 void apply_impl(
const LinOp* b,
LinOp* x)
const override;
214 LinOp* x)
const override;
267 using value_type = std::complex<double>;
268 using index_type =
int64;
283 dim<3> get_fft_size()
const;
285 bool is_inverse()
const;
294 static std::unique_ptr<Fft3>
create(std::shared_ptr<const Executor> exec);
303 static std::unique_ptr<Fft3>
create(std::shared_ptr<const Executor> exec,
316 static std::unique_ptr<Fft3>
create(std::shared_ptr<const Executor> exec,
321 Fft3(std::shared_ptr<const Executor> exec,
size_type size1 = 0,
324 void apply_impl(
const LinOp* b,
LinOp* x)
const override;
327 LinOp* x)
const override;
The EnableLinOp mixin can be used to provide sensible default implementations of the majority of the ...
Definition lin_op.hpp:879
This mixin inherits from (a subclass of) PolymorphicObject and provides a base implementation of a ne...
Definition polymorphic_object.hpp:662
Definition lin_op.hpp:117
Linear operators which support transposition should implement the Transposable interface.
Definition lin_op.hpp:433
A LinOp implementing this interface can write its data to a matrix_data structure.
Definition lin_op.hpp:660
An array is a container which encapsulates fixed-sized arrays, stored on the Executor tied to the arr...
Definition logger.hpp:25
This LinOp implements a 2D Fourier matrix using the FFT algorithm.
Definition fft.hpp:148
static std::unique_ptr< Fft2 > create(std::shared_ptr< const Executor > exec)
Creates an empty Fourier matrix.
static std::unique_ptr< Fft2 > create(std::shared_ptr< const Executor > exec, size_type size1, size_type size2, bool inverse=false)
Creates an Fourier matrix with the given dimensions.
static std::unique_ptr< Fft2 > create(std::shared_ptr< const Executor > exec, size_type size)
Creates an Fourier matrix with the given dimensions.
std::unique_ptr< LinOp > conj_transpose() const override
Returns a LinOp representing the conjugate transpose of the Transposable object.
std::unique_ptr< LinOp > transpose() const override
Returns a LinOp representing the transpose of the Transposable object.
This LinOp implements a 3D Fourier matrix using the FFT algorithm.
Definition fft.hpp:260
static std::unique_ptr< Fft3 > create(std::shared_ptr< const Executor > exec, size_type size1, size_type size2, size_type size3, bool inverse=false)
Creates an Fourier matrix with the given dimensions.
std::unique_ptr< LinOp > conj_transpose() const override
Returns a LinOp representing the conjugate transpose of the Transposable object.
static std::unique_ptr< Fft3 > create(std::shared_ptr< const Executor > exec, size_type size)
Creates an Fourier matrix with the given dimensions.
std::unique_ptr< LinOp > transpose() const override
Returns a LinOp representing the transpose of the Transposable object.
static std::unique_ptr< Fft3 > create(std::shared_ptr< const Executor > exec)
Creates an empty Fourier matrix.
This LinOp implements a 1D Fourier matrix using the FFT algorithm.
Definition fft.hpp:50
std::unique_ptr< LinOp > transpose() const override
Returns a LinOp representing the transpose of the Transposable object.
std::unique_ptr< LinOp > conj_transpose() const override
Returns a LinOp representing the conjugate transpose of the Transposable object.
static std::unique_ptr< Fft > create(std::shared_ptr< const Executor > exec)
Creates an empty Fourier matrix.
static std::unique_ptr< Fft > create(std::shared_ptr< const Executor > exec, size_type size=0, bool inverse=false)
Creates an Fourier matrix with the given dimensions.
@ inverse
The permutation will be inverted before being applied.
The Ginkgo namespace.
Definition abstract_factory.hpp:20
std::int32_t int32
32-bit signed integral type.
Definition types.hpp:106
std::int64_t int64
64-bit signed integral type.
Definition types.hpp:112
std::size_t size_type
Integral type used for allocation quantities.
Definition types.hpp:89
A type representing the dimensions of a multidimensional object.
Definition dim.hpp:26
This structure is used as an intermediate data type to store a sparse matrix.
Definition matrix_data.hpp:126