ComplexFFT.h

Go to the documentation of this file.
00001 /*
00002 *  Copyright (C) 2007 Duncan Brown, Jolien Creighton
00003 *
00004 *  This program is free software; you can redistribute it and/or modify
00005 *  it under the terms of the GNU General Public License as published by
00006 *  the Free Software Foundation; either version 2 of the License, or
00007 *  (at your option) any later version.
00008 *
00009 *  This program is distributed in the hope that it will be useful,
00010 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 *  GNU General Public License for more details.
00013 *
00014 *  You should have received a copy of the GNU General Public License
00015 *  along with with program; see the file COPYING. If not, write to the
00016 *  Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
00017 *  MA  02111-1307  USA
00018 */
00019 
00020 /**** <lalVerbatim file="ComplexFFTHV">
00021  * $Id: ComplexFFT.h,v 1.13 2007/06/08 14:41:44 bema Exp $
00022  **** </lalVerbatim> */
00023 
00024 /**** <lalLaTeX>
00025  * 
00026  * \section{Header \texttt{ComplexFFT.h}}
00027  * \label{s:ComplexFFT.h}
00028  * 
00029  * Performs complex-to-complex FFTs.
00030  * 
00031  * \subsection*{Synopsis}
00032  * \begin{verbatim}
00033  * #include <lal/ComplexFFT.h>
00034  * \end{verbatim}
00035  * 
00036  * Perform complex-to-complex fast Fourier transforms of vectors using the
00037  * package FFTW~\cite{fj:1998}.
00038  * 
00039  **** </lalLaTeX> */
00040 
00041 #ifndef _COMPLEXFFT_H
00042 #define _COMPLEXFFT_H
00043 
00044 #include <lal/LALDatatypes.h>
00045 
00046 #ifdef  __cplusplus
00047 extern "C" {
00048 #pragma }
00049 #endif
00050 
00051 NRCSID( COMPLEXFFTH, "$Id: ComplexFFT.h,v 1.13 2007/06/08 14:41:44 bema Exp $" );
00052 
00053 /**** <lalLaTeX>
00054  * \subsection*{Error conditions}
00055  **** </lalLaTeX> */
00056 /**** <lalErrTable> */
00057 
00058 #define COMPLEXFFTH_ENULL 1
00059 #define COMPLEXFFTH_ENNUL 2
00060 #define COMPLEXFFTH_ESIZE 4
00061 #define COMPLEXFFTH_ESZMM 8
00062 #define COMPLEXFFTH_ESLEN 16
00063 #define COMPLEXFFTH_ESAME 32
00064 #define COMPLEXFFTH_EALOC 64
00065 #define COMPLEXFFTH_EFFTW 128
00066 #define COMPLEXFFTH_ESNGL 256
00067 #define COMPLEXFFTH_EINTL 512
00068 #define COMPLEXFFTH_ESIGN 1024
00069 
00070 #define COMPLEXFFTH_MSGENULL "Null pointer"
00071 #define COMPLEXFFTH_MSGENNUL "Non-null pointer"
00072 #define COMPLEXFFTH_MSGESIZE "Invalid input size"
00073 #define COMPLEXFFTH_MSGESZMM "Size mismatch"
00074 #define COMPLEXFFTH_MSGESLEN "Invalid/mismatched sequence lengths"
00075 #define COMPLEXFFTH_MSGESAME "Input/Output data vectors are the same"
00076 #define COMPLEXFFTH_MSGEFFTW "Error in FFTW"
00077 #define COMPLEXFFTH_MSGEALOC "Memory allocation failed"
00078 #define COMPLEXFFTH_MSGESNGL "FFTW library is not single-precision"
00079 #define COMPLEXFFTH_MSGEINTL "Error in Intel FFT library"
00080 #define COMPLEXFFTH_MSGESIGN "Unknown sign of transform in plan"
00081 
00082 /**** </lalErrTable> */
00083 /**** <lalLaTeX>
00084  * 
00085  * \subsection*{Structures}
00086  * 
00087  **** </lalLaTeX> */
00088 /**** <lalVerbatim> */
00089 typedef struct tagCOMPLEX8FFTPlan COMPLEX8FFTPlan;
00090 typedef struct tagCOMPLEX16FFTPlan COMPLEX16FFTPlan;
00091 #define tagComplexFFTPlan tagCOMPLEX8FFTPlan
00092 #define ComplexFFTPlan COMPLEX8FFTPlan
00093 /**** </lalVerbatim> */
00094 /**** <lalLaTeX>
00095  * 
00096  * This structure contains the parameters necessary for performing an FFT of a
00097  * given size and direction.  The contents should not be manually adjusted.
00098  * 
00099  * \newpage\input{ComplexFFTC}
00100  * \newpage\input{ComplexFFTTestC}
00101  **** </lalLaTeX> */
00102 
00103 /*
00104  *
00105  * XLAL COMPLEX8 functions
00106  *
00107  */
00108 
00109 COMPLEX8FFTPlan * XLALCreateCOMPLEX8FFTPlan( UINT4 size, int fwdflg, int measurelvl );
00110 COMPLEX8FFTPlan * XLALCreateForwardCOMPLEX8FFTPlan( UINT4 size, int measurelvl );
00111 COMPLEX8FFTPlan * XLALCreateReverseCOMPLEX8FFTPlan( UINT4 size, int measurelvl );
00112 void XLALDestroyCOMPLEX8FFTPlan( COMPLEX8FFTPlan *plan );
00113 int XLALCOMPLEX8VectorFFT( COMPLEX8Vector *output, COMPLEX8Vector *input,
00114     COMPLEX8FFTPlan *plan );
00115 
00116 /*
00117  *
00118  * XLAL COMPLEX16 functions
00119  *
00120  */
00121 
00122 COMPLEX16FFTPlan * XLALCreateCOMPLEX16FFTPlan( UINT4 size, int fwdflg, int measurelvl );
00123 COMPLEX16FFTPlan * XLALCreateForwardCOMPLEX16FFTPlan( UINT4 size, int measurelvl );
00124 COMPLEX16FFTPlan * XLALCreateReverseCOMPLEX16FFTPlan( UINT4 size, int measurelvl );
00125 void XLALDestroyCOMPLEX16FFTPlan( COMPLEX16FFTPlan *plan );
00126 int XLALCOMPLEX16VectorFFT( COMPLEX16Vector *output, COMPLEX16Vector *input,
00127     COMPLEX16FFTPlan *plan );
00128 
00129 /*
00130  *
00131  * LAL COMPLEX8 functions
00132  *
00133  */
00134 
00135 void
00136 LALCreateForwardCOMPLEX8FFTPlan(
00137     LALStatus       *status,
00138     COMPLEX8FFTPlan **plan,
00139     UINT4            size,
00140     INT4             measure
00141     );
00142 #define LALCreateForwardComplexFFTPlan LALCreateForwardCOMPLEX8FFTPlan
00143 
00144 void
00145 LALCreateReverseCOMPLEX8FFTPlan(
00146     LALStatus       *status,
00147     COMPLEX8FFTPlan **plan,
00148     UINT4            size,
00149     INT4             measure
00150     );
00151 #define LALCreateReverseComplexFFTPlan LALCreateReverseCOMPLEX8FFTPlan
00152 
00153 void
00154 LALDestroyCOMPLEX8FFTPlan (
00155     LALStatus       *status,
00156     COMPLEX8FFTPlan **plan
00157     );
00158 #define LALDestroyComplexFFTPlan LALDestroyCOMPLEX8FFTPlan
00159 
00160 void
00161 LALCOMPLEX8VectorFFT (
00162     LALStatus      *status,
00163     COMPLEX8Vector *output,
00164     COMPLEX8Vector *input,
00165     COMPLEX8FFTPlan *plan
00166     );
00167 
00168 /*
00169  *
00170  * LAL COMPLEX8 functions
00171  *
00172  */
00173 
00174 void
00175 LALCreateForwardCOMPLEX16FFTPlan(
00176     LALStatus       *status,
00177     COMPLEX16FFTPlan **plan,
00178     UINT4            size,
00179     INT4             measure
00180     );
00181 
00182 void
00183 LALCreateReverseCOMPLEX16FFTPlan(
00184     LALStatus       *status,
00185     COMPLEX16FFTPlan **plan,
00186     UINT4            size,
00187     INT4             measure
00188     );
00189 
00190 void
00191 LALDestroyCOMPLEX16FFTPlan (
00192     LALStatus       *status,
00193     COMPLEX16FFTPlan **plan
00194     );
00195 
00196 void
00197 LALCOMPLEX16VectorFFT (
00198     LALStatus      *status,
00199     COMPLEX16Vector *output,
00200     COMPLEX16Vector *input,
00201     COMPLEX16FFTPlan *plan
00202     );
00203 
00204 
00205 #ifdef  __cplusplus
00206 #pragma {
00207 }
00208 #endif
00209 
00210 #endif /* _COMPLEXFFT_H */

Generated on Sat Sep 6 03:06:43 2008 for LAL by  doxygen 1.5.2