1 /*
2  * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology
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 this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  *
18  */
19 
20 /* rfftw.h -- system-wide definitions for rfftw */
21 #ifndef RFFTW_H
22 #define RFFTW_H
23 
24 #include "fftw.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif				/* __cplusplus */
29 
30 /****************************************************************************/
31 
32 #define RFFTW_V2
33 
34 typedef fftw_plan rfftw_plan;
35 typedef fftwnd_plan rfftwnd_plan;
36 
37 #define FFTW_REAL_TO_COMPLEX FFTW_FORWARD
38 #define FFTW_COMPLEX_TO_REAL FFTW_BACKWARD
39 
40 extern void rfftw(rfftw_plan plan, int howmany, fftw_real *in, int istride,
41 		  int idist, fftw_real *out, int ostride, int odist);
42 extern void rfftw_one(rfftw_plan plan, fftw_real *in, fftw_real *out);
43 
44 extern rfftw_plan rfftw_create_plan_specific(int n, fftw_direction dir,
45 					    int flags,
46 					    fftw_real *in, int istride,
47 					    fftw_real *out, int ostride);
48 
49 extern rfftw_plan rfftw_create_plan(int n, fftw_direction dir, int flags);
50 extern void rfftw_destroy_plan(rfftw_plan plan);
51 
52 extern void rfftw_fprint_plan(FILE *f, rfftw_plan p);
53 extern void rfftw_print_plan(rfftw_plan p);
54 
55 extern void rfftw_executor_simple(int n, fftw_real *in,
56 				  fftw_real *out,
57 				  fftw_plan_node *p,
58 				  int istride,
59 				  int ostride,
60 				  fftw_recurse_kind recurse_kind);
61 
62 extern rfftwnd_plan rfftwnd_create_plan_specific(int rank, const int *n,
63 						fftw_direction dir, int flags,
64 						fftw_real *in, int istride,
65 						fftw_real *out, int ostride);
66 extern rfftwnd_plan rfftw2d_create_plan_specific(int nx, int ny,
67 					   fftw_direction dir, int flags,
68 					      fftw_real *in, int istride,
69 					    fftw_real *out, int ostride);
70 extern rfftwnd_plan rfftw3d_create_plan_specific(int nx, int ny, int nz,
71 					   fftw_direction dir, int flags,
72 					      fftw_real *in, int istride,
73 					    fftw_real *out, int ostride);
74 extern rfftwnd_plan rfftwnd_create_plan(int rank, const int *n,
75 					  fftw_direction dir, int flags);
76 extern rfftwnd_plan rfftw2d_create_plan(int nx, int ny,
77 					  fftw_direction dir, int flags);
78 extern rfftwnd_plan rfftw3d_create_plan(int nx, int ny, int nz,
79 					  fftw_direction dir, int flags);
80 extern void rfftwnd_destroy_plan(rfftwnd_plan plan);
81 extern void rfftwnd_fprint_plan(FILE *f, rfftwnd_plan plan);
82 extern void rfftwnd_print_plan(rfftwnd_plan plan);
83 extern void rfftwnd_real_to_complex(rfftwnd_plan p, int howmany,
84 				   fftw_real *in, int istride, int idist,
85 			      fftw_complex *out, int ostride, int odist);
86 extern void rfftwnd_complex_to_real(rfftwnd_plan p, int howmany,
87 				fftw_complex *in, int istride, int idist,
88 				 fftw_real *out, int ostride, int odist);
89 extern void rfftwnd_one_real_to_complex(rfftwnd_plan p,
90 					fftw_real *in, fftw_complex *out);
91 extern void rfftwnd_one_complex_to_real(rfftwnd_plan p,
92 					fftw_complex *in, fftw_real *out);
93 
94 /****************************************************************************/
95 
96 #ifdef __cplusplus
97 }                               /* extern "C" */
98 #endif                          /* __cplusplus */
99 #endif                          /* RFFTW_H */
100