mgcpp
A C++ Math Library Based on CUDA
fft.hpp
Go to the documentation of this file.
1 
2 // Copyright RedPortal, mujjingun 2017 - 2018.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6 
7 #ifndef _MGCPP_OPERATIONS_FFT_HPP_
8 #define _MGCPP_OPERATIONS_FFT_HPP_
9 
10 #include <mgcpp/global/complex.hpp>
14 
15 namespace mgcpp {
17 enum class fft_direction {
19  forward,
21  inverse
22 };
23 
24 namespace strict {
30 template <typename DeviceVec, typename Type>
31 inline decltype(auto) rfft(dense_vector<DeviceVec, Type> const& vec);
32 
39 template <typename DeviceVec, typename Type>
40 inline decltype(auto) irfft(dense_vector<DeviceVec, complex<Type>> const& vec,
41  int n = -1);
42 
49 template <typename DeviceVec, typename Type>
50 inline decltype(auto) cfft(dense_vector<DeviceVec, complex<Type>> const& vec,
51  fft_direction direction);
52 
58 template <typename DeviceMat, typename Type>
59 inline decltype(auto) rfft(dense_matrix<DeviceMat, Type> const& mat);
60 
67 template <typename DeviceMat, typename Type>
68 inline decltype(auto) irfft(dense_matrix<DeviceMat, complex<Type>> const& mat,
69  int n = -1);
70 
77 template <typename DeviceMat, typename Type>
78 inline decltype(auto) cfft(dense_matrix<DeviceMat, complex<Type>> const& mat,
79  fft_direction direction);
80 } // namespace strict
81 } // namespace mgcpp
82 
83 #include <mgcpp/operations/fft.tpp>
84 
85 #endif
Definition: adapter_base.hpp:12
std::complex< Type > complex
Definition: complex.hpp:15
Definition: dense_vector.hpp:15
fft_direction
FFT direction.
Definition: fft.hpp:17
decltype(auto) irfft(dense_matrix< DeviceMat, complex< Type >> const &mat, int n=-1)
Definition: dense_matrix.hpp:15
decltype(auto) cfft(dense_matrix< DeviceMat, complex< Type >> const &mat, fft_direction direction)
decltype(auto) rfft(dense_matrix< DeviceMat, Type > const &mat)