forked from SvenDeSmet/ESTL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFFT_MKL.h
38 lines (31 loc) · 879 Bytes
/
FFT_MKL.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* The information in this file is
* Copyright (C) 2011, Sven De Smet <[email protected]>
* and is subject to the terms and conditions of the
* GNU Lesser General Public License Version 2.1
* The license text is available from
* http://www.gnu.org/licenses/lgpl.html
*/
#ifndef FFT_MKL_H
#define FFT_MKL_H
#ifdef USE_MKL
#include "FFT.h"
template <class D> class FFT_MKL : public FFT<D> {
private:
DFTI_DESCRIPTOR_HANDLE h;
public:
FFT_MKL(int n) {
in = new D[2*n];
out = new D[2*n];
DftiCreateDescriptor(&h, DFTI_SINGLE, DFTI_COMPLEX, 1, n);
DftiSetValue(h, DFTI_PLACEMENT, DFTI_NOT_INPLACE);
DftiCommitDescriptor(h);
}
virtual void execute() { fftwf_execute(plan); }
virtual ~FFT_MKL() {
delete [] in;
delete [] out;
fftwf_destroy_plan(p1);
}
};
#endif
#endif // FFT_MKL_H