33#ifndef GKO_PUBLIC_CORE_MATRIX_FFT_HPP_
34#define GKO_PUBLIC_CORE_MATRIX_FFT_HPP_
37#include <ginkgo/core/base/array.hpp>
38#include <ginkgo/core/base/lin_op.hpp>
87 using value_type = std::complex<double>;
88 using index_type =
int64;
103 dim<1> get_fft_size()
const;
105 bool is_inverse()
const;
113 explicit Fft(std::shared_ptr<const Executor> exec)
123 Fft(std::shared_ptr<const Executor> exec,
size_type size,
128 void apply_impl(
const LinOp* b, LinOp* x)
const override;
130 void apply_impl(
const LinOp* alpha,
const LinOp* b,
const LinOp* beta,
131 LinOp* x)
const override;
134 mutable array<char> buffer_;
183 using value_type = std::complex<double>;
184 using index_type =
int64;
199 dim<2> get_fft_size()
const;
201 bool is_inverse()
const;
209 explicit Fft2(std::shared_ptr<const Executor> exec)
219 :
Fft2{exec, size, size}
237 void apply_impl(
const LinOp* b, LinOp* x)
const override;
239 void apply_impl(
const LinOp* alpha,
const LinOp* b,
const LinOp* beta,
240 LinOp* x)
const override;
243 mutable array<char> buffer_;
295 using value_type = std::complex<double>;
296 using index_type =
int64;
311 dim<3> get_fft_size()
const;
313 bool is_inverse()
const;
321 explicit Fft3(std::shared_ptr<const Executor> exec)
331 :
Fft3{exec, size, size, size}
350 void apply_impl(
const LinOp* b, LinOp* x)
const override;
352 void apply_impl(
const LinOp* alpha,
const LinOp* b,
const LinOp* beta,
353 LinOp* x)
const override;
356 mutable array<char> buffer_;
This mixin implements a static create() method on ConcreteType that dynamically allocates the memory,...
Definition polymorphic_object.hpp:776
The EnableLinOp mixin can be used to provide sensible default implementations of the majority of the ...
Definition lin_op.hpp:908
void move_to(result_type *result) override
Converts the implementer to an object of type result_type by moving data from this object.
Definition polymorphic_object.hpp:760
void convert_to(result_type *result) const override
Converts the implementer to an object of type result_type.
Definition polymorphic_object.hpp:758
This mixin inherits from (a subclass of) PolymorphicObject and provides a base implementation of a ne...
Definition polymorphic_object.hpp:691
Definition lin_op.hpp:146
Linear operators which support transposition should implement the Transposable interface.
Definition lin_op.hpp:462
A LinOp implementing this interface can write its data to a matrix_data structure.
Definition lin_op.hpp:689
This LinOp implements a 2D Fourier matrix using the FFT algorithm.
Definition fft.hpp:175
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:287
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 1D Fourier matrix using the FFT algorithm.
Definition fft.hpp:79
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.
@ inverse
The permutation will be inverted before being applied.
The Ginkgo namespace.
Definition abstract_factory.hpp:48
constexpr T one()
Returns the multiplicative identity for T.
Definition math.hpp:803
std::int32_t int32
32-bit signed integral type.
Definition types.hpp:137
std::int64_t int64
64-bit signed integral type.
Definition types.hpp:143
std::size_t size_type
Integral type used for allocation quantities.
Definition types.hpp:120
A type representing the dimensions of a multidimensional object.
Definition dim.hpp:55
This structure is used as an intermediate data type to store a sparse matrix.
Definition matrix_data.hpp:155