Line data Source code
1 : /** \file fftT.cpp
2 : * \brief The fast Fourier transform interface
3 : * \ingroup fft_files
4 : * \author Jared R. Males (jaredmales@gmail.com)
5 : *
6 : */
7 : //***********************************************************************//
8 : // Copyright 2015-2025 Jared R. Males (jaredmales@gmail.com)
9 : //
10 : // This file is part of mxlib.
11 : //
12 : // mxlib is free software: you can redistribute it and/or modify
13 : // it under the terms of the GNU General Public License as published by
14 : // the Free Software Foundation, either version 3 of the License, or
15 : // (at your option) any later version.
16 : //
17 : // mxlib is distributed in the hope that it will be useful,
18 : // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 : // GNU General Public License for more details.
21 : //
22 : // You should have received a copy of the GNU General Public License
23 : // along with mxlib. If not, see <http://www.gnu.org/licenses/>.
24 : //***********************************************************************//
25 :
26 : #include "math/ft/fftT.hpp"
27 :
28 : namespace mx
29 : {
30 : namespace math
31 : {
32 : namespace ft
33 : {
34 :
35 : template <>
36 19 : std::vector<int> fftwDimVec<1>( int szX, int szY, int szZ )
37 : {
38 : static_cast<void>( szY );
39 : static_cast<void>( szZ );
40 :
41 19 : std::vector<int> v( { szX } );
42 19 : return v;
43 : }
44 :
45 : template <>
46 44 : std::vector<int> fftwDimVec<2>( int szX, int szY, int szZ )
47 : {
48 : static_cast<void>( szZ );
49 :
50 44 : std::vector<int> v( { szX, szY } );
51 44 : return v;
52 : }
53 :
54 : template <>
55 10 : std::vector<int> fftwDimVec<3>( int szX, int szY, int szZ )
56 : {
57 10 : std::vector<int> v( { szX, szY, szZ } );
58 10 : return v;
59 : }
60 :
61 : } // namespace ft
62 : } // namespace math
63 : } // namespace mx
|