Loading [MathJax]/extensions/TeX/AMSmath.js
LAL 7.7.0.1-5e288d3
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
IntelComplexFFT.c
Go to the documentation of this file.
1/*
2* Copyright (C) 2007 Jolien Creighton, Josh Willis
3*
4* This program is free software; you can redistribute it and/or modify
5* it under the terms of the GNU General Public License as published by
6* the Free Software Foundation; either version 2 of the License, or
7* (at your option) any later version.
8*
9* This program is distributed in the hope that it will be useful,
10* but WITHOUT ANY WARRANTY; without even the implied warranty of
11* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12* GNU General Public License for more details.
13*
14* You should have received a copy of the GNU General Public License
15* along with with program; see the file COPYING. If not, write to the
16* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17* MA 02110-1301 USA
18*/
19
20#include <config.h>
21
22#include <complex.h>
23#include <mkl_dfti.h>
24
25#include <lal/SeqFactories.h>
26#include <lal/ComplexFFT.h>
27#include <lal/LALMalloc.h>
28#include <lal/XLALError.h>
29
30/** \cond DONT_DOXYGEN */
31
32
33#define CHECKINTELFFTSTATUS( fstat ) \
34 if ( (fstat) != DFTI_NO_ERROR ) \
35 { \
36 char *errmsg = DftiErrorMessage( fftStat ); \
37 XLAL_ERROR( COMPLEXFFTH_EINTL, "%s", errmsg ); \
38 } \
39 else (void)(0)
40
41#define CHECKINTELFFTSTATUS_NULL( fstat ) \
42 if ( (fstat) != DFTI_NO_ERROR ) \
43 { \
44 char *errmsg = DftiErrorMessage( fftStat ); \
45 XLAL_ERROR_NULL( COMPLEXFFTH_EINTL, "%s", errmsg ); \
46 } \
47 else (void)(0)
48
49#define CHECKINTELFFTSTATUS_VOID( fstat ) \
50 if ( (fstat) != DFTI_NO_ERROR ) \
51 { \
52 char *errmsg = DftiErrorMessage( fftStat ); \
53 XLAL_ERROR_VOID( COMPLEXFFTH_EINTL, "%s", errmsg ); \
54 } \
55 else (void)(0)
56
57
58/*
59 * Plan to perform FFT of COMPLEX8 data.
60 */
61struct
63{
64 INT4 sign; /* sign in transform exponential, -1 for forward, +1 for reverse */
65 UINT4 size; /* length of the real data vector for this plan */
66 DFTI_DESCRIPTOR *plan; /* the MKL plan */
67};
68
69/*
70 * Plan to perform FFT of COMPLEX16 data.
71 */
72struct
74{
75 INT4 sign; /* sign in transform exponential, -1 for forward, +1 for reverse */
76 UINT4 size; /* length of the real data vector for this plan */
77 DFTI_DESCRIPTOR *plan; /* the MKL plan */
78};
79
80/* single- and double-precision routines */
81
82#define SINGLE_PRECISION
83#include "IntelComplexFFT_source.c"
84#undef SINGLE_PRECISION
85#include "IntelComplexFFT_source.c"
86
87
88/** \endcond */
static int sign(int s)
Definition: LALStringTest.c:27
uint32_t UINT4
Four-byte unsigned integer.
int32_t INT4
Four-byte signed integer.
Plan to perform an FFT of COMPLEX16 data.
Definition: ComplexFFT.c:137
Plan to perform an FFT of COMPLEX8 data.
Definition: ComplexFFT.c:126