fftw3.h | fftw3.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 2003, 2006 Matteo Frigo | * Copyright (c) 2003, 2007-8 Matteo Frigo | |||
* Copyright (c) 2003, 2006 Massachusetts Institute of Technology | * Copyright (c) 2003, 2007-8 Massachusetts Institute of Technology | |||
* | * | |||
* The following statement of license applies *only* to this header file, | * The following statement of license applies *only* to this header file, | |||
* and *not* to the other files distributed with FFTW or derived therefrom: | * and *not* to the other files distributed with FFTW or derived therefrom: | |||
* | * | |||
* Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | |||
* modification, are permitted provided that the following conditions | * modification, are permitted provided that the following conditions | |||
* are met: | * are met: | |||
* | * | |||
* 1. Redistributions of source code must retain the above copyright | * 1. Redistributions of source code must retain the above copyright | |||
* notice, this list of conditions and the following disclaimer. | * notice, this list of conditions and the following disclaimer. | |||
skipping to change at line 47 | skipping to change at line 47 | |||
* online at http://www.fftw.org/doc/ and also included with FFTW. | * online at http://www.fftw.org/doc/ and also included with FFTW. | |||
* For a quick start, see the manual's tutorial section. | * For a quick start, see the manual's tutorial section. | |||
* | * | |||
* (Reading header files to learn how to use a library is a habit | * (Reading header files to learn how to use a library is a habit | |||
* stemming from code lacking a proper manual. Arguably, it's a | * stemming from code lacking a proper manual. Arguably, it's a | |||
* *bad* habit in most cases, because header files can contain | * *bad* habit in most cases, because header files can contain | |||
* interfaces that are not part of the public, stable API.) | * interfaces that are not part of the public, stable API.) | |||
* | * | |||
************************************************************************** **/ | ************************************************************************** **/ | |||
/* header file for fftw3 */ | ||||
/* (The following is the CVS ID for this file, *not* the version | ||||
number of FFTW:) */ | ||||
/* $Id: fftw3.h,v 1.90 2006-01-17 04:03:33 stevenj Exp $ */ | ||||
#ifndef FFTW3_H | #ifndef FFTW3_H | |||
#define FFTW3_H | #define FFTW3_H | |||
#include <stdio.h> | #include <stdio.h> | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
extern "C" | extern "C" | |||
{ | { | |||
#endif /* __cplusplus */ | #endif /* __cplusplus */ | |||
skipping to change at line 105 | skipping to change at line 100 | |||
FFTW_REDFT00=3, FFTW_REDFT01=4, FFTW_REDFT10=5, FFTW_REDFT11=6, | FFTW_REDFT00=3, FFTW_REDFT01=4, FFTW_REDFT10=5, FFTW_REDFT11=6, | |||
FFTW_RODFT00=7, FFTW_RODFT01=8, FFTW_RODFT10=9, FFTW_RODFT11=10 | FFTW_RODFT00=7, FFTW_RODFT01=8, FFTW_RODFT10=9, FFTW_RODFT11=10 | |||
}; | }; | |||
struct fftw_iodim_do_not_use_me { | struct fftw_iodim_do_not_use_me { | |||
int n; /* dimension size */ | int n; /* dimension size */ | |||
int is; /* input stride */ | int is; /* input stride */ | |||
int os; /* output stride */ | int os; /* output stride */ | |||
}; | }; | |||
#include <stddef.h> /* for ptrdiff_t */ | ||||
struct fftw_iodim64_do_not_use_me { | ||||
ptrdiff_t n; /* dimension size */ | ||||
ptrdiff_t is; /* input stride */ | ||||
ptrdiff_t os; /* output stride */ | ||||
}; | ||||
/* | /* | |||
huge second-order macro that defines prototypes for all API | huge second-order macro that defines prototypes for all API | |||
functions. We expand this macro for each supported precision | functions. We expand this macro for each supported precision | |||
X: name-mangling macro | X: name-mangling macro | |||
R: real data type | R: real data type | |||
C: complex data type | C: complex data type | |||
*/ | */ | |||
#define FFTW_DEFINE_API(X, R, C) \ | #define FFTW_DEFINE_API(X, R, C) \ | |||
\ | \ | |||
FFTW_DEFINE_COMPLEX(R, C); \ | FFTW_DEFINE_COMPLEX(R, C); \ | |||
\ | \ | |||
typedef struct X(plan_s) *X(plan); \ | typedef struct X(plan_s) *X(plan); \ | |||
\ | \ | |||
typedef struct fftw_iodim_do_not_use_me X(iodim); \ | typedef struct fftw_iodim_do_not_use_me X(iodim); \ | |||
typedef struct fftw_iodim64_do_not_use_me X(iodim64); \ | ||||
\ | \ | |||
typedef enum fftw_r2r_kind_do_not_use_me X(r2r_kind); \ | typedef enum fftw_r2r_kind_do_not_use_me X(r2r_kind); \ | |||
\ | \ | |||
FFTW_EXTERN void X(execute)(const X(plan) p); \ | FFTW_EXTERN void X(execute)(const X(plan) p); \ | |||
\ | \ | |||
FFTW_EXTERN X(plan) X(plan_dft)(int rank, const int *n, \ | FFTW_EXTERN X(plan) X(plan_dft)(int rank, const int *n, \ | |||
C *in, C *out, int sign, unsigned flags); \ | C *in, C *out, int sign, unsigned flags); \ | |||
\ | \ | |||
FFTW_EXTERN X(plan) X(plan_dft_1d)(int n, C *in, C *out, int sign, \ | FFTW_EXTERN X(plan) X(plan_dft_1d)(int n, C *in, C *out, int sign, \ | |||
unsigned flags); \ | unsigned flags); \ | |||
FFTW_EXTERN X(plan) X(plan_dft_2d)(int nx, int ny, \ | FFTW_EXTERN X(plan) X(plan_dft_2d)(int n0, int n1, \ | |||
C *in, C *out, int sign, unsigned flags); \ | C *in, C *out, int sign, unsigned flags); \ | |||
FFTW_EXTERN X(plan) X(plan_dft_3d)(int nx, int ny, int nz, \ | FFTW_EXTERN X(plan) X(plan_dft_3d)(int n0, int n1, int n2, \ | |||
C *in, C *out, int sign, unsigned flags); \ | C *in, C *out, int sign, unsigned flags); \ | |||
\ | \ | |||
FFTW_EXTERN X(plan) X(plan_many_dft)(int rank, const int *n, \ | FFTW_EXTERN X(plan) X(plan_many_dft)(int rank, const int *n, \ | |||
int howmany, \ | int howmany, \ | |||
C *in, const int *inembed, \ | C *in, const int *inembed, \ | |||
int istride, int idist, \ | int istride, int idist, \ | |||
C *out, const int *onembed, \ | C *out, const int *onembed, \ | |||
int ostride, int odist, \ | int ostride, int odist, \ | |||
int sign, unsigned flags); \ | int sign, unsigned flags); \ | |||
\ | \ | |||
skipping to change at line 155 | skipping to change at line 158 | |||
int howmany_rank, \ | int howmany_rank, \ | |||
const X(iodim) *howmany_dims, \ | const X(iodim) *howmany_dims, \ | |||
C *in, C *out, \ | C *in, C *out, \ | |||
int sign, unsigned flags); \ | int sign, unsigned flags); \ | |||
FFTW_EXTERN X(plan) X(plan_guru_split_dft)(int rank, const X(iodim) *dims, \ | FFTW_EXTERN X(plan) X(plan_guru_split_dft)(int rank, const X(iodim) *dims, \ | |||
int howmany_rank, \ | int howmany_rank, \ | |||
const X(iodim) *howmany_dims, \ | const X(iodim) *howmany_dims, \ | |||
R *ri, R *ii, R *ro, R *io, \ | R *ri, R *ii, R *ro, R *io, \ | |||
unsigned flags); \ | unsigned flags); \ | |||
\ | \ | |||
FFTW_EXTERN X(plan) X(plan_guru64_dft)(int rank, \ | ||||
const X(iodim64) *dims, \ | ||||
int howmany_rank, \ | ||||
const X(iodim64) *howmany_dims, \ | ||||
C *in, C *out, \ | ||||
int sign, unsigned flags); \ | ||||
FFTW_EXTERN X(plan) X(plan_guru64_split_dft)(int rank, \ | ||||
const X(iodim64) *dims, \ | ||||
int howmany_rank, \ | ||||
const X(iodim64) *howmany_dims, \ | ||||
R *ri, R *ii, R *ro, R *io, \ | ||||
unsigned flags); \ | ||||
\ | ||||
FFTW_EXTERN void X(execute_dft)(const X(plan) p, C *in, C *out); \ | FFTW_EXTERN void X(execute_dft)(const X(plan) p, C *in, C *out); \ | |||
FFTW_EXTERN void X(execute_split_dft)(const X(plan) p, R *ri, R *ii, \ | FFTW_EXTERN void X(execute_split_dft)(const X(plan) p, R *ri, R *ii, \ | |||
R *ro, R *io); \ | R *ro, R *io); \ | |||
\ | \ | |||
FFTW_EXTERN X(plan) X(plan_many_dft_r2c)(int rank, const int *n, \ | FFTW_EXTERN X(plan) X(plan_many_dft_r2c)(int rank, const int *n, \ | |||
int howmany, \ | int howmany, \ | |||
R *in, const int *inembed, \ | R *in, const int *inembed, \ | |||
int istride, int idist, \ | int istride, int idist, \ | |||
C *out, const int *onembed, \ | C *out, const int *onembed, \ | |||
int ostride, int odist, \ | int ostride, int odist, \ | |||
unsigned flags); \ | unsigned flags); \ | |||
\ | \ | |||
FFTW_EXTERN X(plan) X(plan_dft_r2c)(int rank, const int *n, \ | FFTW_EXTERN X(plan) X(plan_dft_r2c)(int rank, const int *n, \ | |||
R *in, C *out, unsigned flags); \ | R *in, C *out, unsigned flags); \ | |||
\ | \ | |||
FFTW_EXTERN X(plan) X(plan_dft_r2c_1d)(int n,R *in,C *out,unsigned flags); \ | FFTW_EXTERN X(plan) X(plan_dft_r2c_1d)(int n,R *in,C *out,unsigned flags); \ | |||
FFTW_EXTERN X(plan) X(plan_dft_r2c_2d)(int nx, int ny, \ | FFTW_EXTERN X(plan) X(plan_dft_r2c_2d)(int n0, int n1, \ | |||
R *in, C *out, unsigned flags); \ | R *in, C *out, unsigned flags); \ | |||
FFTW_EXTERN X(plan) X(plan_dft_r2c_3d)(int nx, int ny, \ | FFTW_EXTERN X(plan) X(plan_dft_r2c_3d)(int n0, int n1, \ | |||
int nz, \ | int n2, \ | |||
R *in, C *out, unsigned flags); \ | R *in, C *out, unsigned flags); \ | |||
\ | \ | |||
\ | \ | |||
FFTW_EXTERN X(plan) X(plan_many_dft_c2r)(int rank, const int *n, \ | FFTW_EXTERN X(plan) X(plan_many_dft_c2r)(int rank, const int *n, \ | |||
int howmany, \ | int howmany, \ | |||
C *in, const int *inembed, \ | C *in, const int *inembed, \ | |||
int istride, int idist, \ | int istride, int idist, \ | |||
R *out, const int *onembed, \ | R *out, const int *onembed, \ | |||
int ostride, int odist, \ | int ostride, int odist, \ | |||
unsigned flags); \ | unsigned flags); \ | |||
\ | \ | |||
FFTW_EXTERN X(plan) X(plan_dft_c2r)(int rank, const int *n, \ | FFTW_EXTERN X(plan) X(plan_dft_c2r)(int rank, const int *n, \ | |||
C *in, R *out, unsigned flags); \ | C *in, R *out, unsigned flags); \ | |||
\ | \ | |||
FFTW_EXTERN X(plan) X(plan_dft_c2r_1d)(int n,C *in,R *out,unsigned flags); \ | FFTW_EXTERN X(plan) X(plan_dft_c2r_1d)(int n,C *in,R *out,unsigned flags); \ | |||
FFTW_EXTERN X(plan) X(plan_dft_c2r_2d)(int nx, int ny, \ | FFTW_EXTERN X(plan) X(plan_dft_c2r_2d)(int n0, int n1, \ | |||
C *in, R *out, unsigned flags); \ | C *in, R *out, unsigned flags); \ | |||
FFTW_EXTERN X(plan) X(plan_dft_c2r_3d)(int nx, int ny, \ | FFTW_EXTERN X(plan) X(plan_dft_c2r_3d)(int n0, int n1, \ | |||
int nz, \ | int n2, \ | |||
C *in, R *out, unsigned flags); \ | C *in, R *out, unsigned flags); \ | |||
\ | \ | |||
FFTW_EXTERN X(plan) X(plan_guru_dft_r2c)(int rank, const X(iodim) *dims, \ | FFTW_EXTERN X(plan) X(plan_guru_dft_r2c)(int rank, const X(iodim) *dims, \ | |||
int howmany_rank, \ | int howmany_rank, \ | |||
const X(iodim) *howmany_dims, \ | const X(iodim) *howmany_dims, \ | |||
R *in, C *out, \ | R *in, C *out, \ | |||
unsigned flags); \ | unsigned flags); \ | |||
FFTW_EXTERN X(plan) X(plan_guru_dft_c2r)(int rank, const X(iodim) *dims, \ | FFTW_EXTERN X(plan) X(plan_guru_dft_c2r)(int rank, const X(iodim) *dims, \ | |||
int howmany_rank, \ | int howmany_rank, \ | |||
const X(iodim) *howmany_dims, \ | const X(iodim) *howmany_dims, \ | |||
skipping to change at line 220 | skipping to change at line 236 | |||
const X(iodim) *howmany_dims, \ | const X(iodim) *howmany_dims, \ | |||
R *in, R *ro, R *io, \ | R *in, R *ro, R *io, \ | |||
unsigned flags); \ | unsigned flags); \ | |||
FFTW_EXTERN X(plan) X(plan_guru_split_dft_c2r)( \ | FFTW_EXTERN X(plan) X(plan_guru_split_dft_c2r)( \ | |||
int rank, const X(iodim) *dims, \ | int rank, const X(iodim) *dims, \ | |||
int howmany_rank, \ | int howmany_rank, \ | |||
const X(iodim) *howmany_dims, \ | const X(iodim) *howmany_dims, \ | |||
R *ri, R *ii, R *out, \ | R *ri, R *ii, R *out, \ | |||
unsigned flags); \ | unsigned flags); \ | |||
\ | \ | |||
FFTW_EXTERN X(plan) X(plan_guru64_dft_r2c)(int rank, \ | ||||
const X(iodim64) *dims, \ | ||||
int howmany_rank, \ | ||||
const X(iodim64) *howmany_dims, \ | ||||
R *in, C *out, \ | ||||
unsigned flags); \ | ||||
FFTW_EXTERN X(plan) X(plan_guru64_dft_c2r)(int rank, \ | ||||
const X(iodim64) *dims, \ | ||||
int howmany_rank, \ | ||||
const X(iodim64) *howmany_dims, \ | ||||
C *in, R *out, \ | ||||
unsigned flags); \ | ||||
\ | ||||
FFTW_EXTERN X(plan) X(plan_guru64_split_dft_r2c)( \ | ||||
int rank, const X(iodim64) *dims, \ | ||||
int howmany_rank, \ | ||||
const X(iodim64) *howmany_dims, \ | ||||
R *in, R *ro, R *io, \ | ||||
unsigned flags); \ | ||||
FFTW_EXTERN X(plan) X(plan_guru64_split_dft_c2r)( \ | ||||
int rank, const X(iodim64) *dims, \ | ||||
int howmany_rank, \ | ||||
const X(iodim64) *howmany_dims, \ | ||||
R *ri, R *ii, R *out, \ | ||||
unsigned flags); \ | ||||
\ | ||||
FFTW_EXTERN void X(execute_dft_r2c)(const X(plan) p, R *in, C *out); \ | FFTW_EXTERN void X(execute_dft_r2c)(const X(plan) p, R *in, C *out); \ | |||
FFTW_EXTERN void X(execute_dft_c2r)(const X(plan) p, C *in, R *out); \ | FFTW_EXTERN void X(execute_dft_c2r)(const X(plan) p, C *in, R *out); \ | |||
\ | \ | |||
FFTW_EXTERN void X(execute_split_dft_r2c)(const X(plan) p, \ | FFTW_EXTERN void X(execute_split_dft_r2c)(const X(plan) p, \ | |||
R *in, R *ro, R *io); \ | R *in, R *ro, R *io); \ | |||
FFTW_EXTERN void X(execute_split_dft_c2r)(const X(plan) p, \ | FFTW_EXTERN void X(execute_split_dft_c2r)(const X(plan) p, \ | |||
R *ri, R *ii, R *out); \ | R *ri, R *ii, R *out); \ | |||
\ | \ | |||
FFTW_EXTERN X(plan) X(plan_many_r2r)(int rank, const int *n, \ | FFTW_EXTERN X(plan) X(plan_many_r2r)(int rank, const int *n, \ | |||
int howmany, \ | int howmany, \ | |||
R *in, const int *inembed, \ | R *in, const int *inembed, \ | |||
int istride, int idist, \ | int istride, int idist, \ | |||
R *out, const int *onembed, \ | R *out, const int *onembed, \ | |||
int ostride, int odist, \ | int ostride, int odist, \ | |||
const X(r2r_kind) *kind, unsigned flags); \ | const X(r2r_kind) *kind, unsigned flags); \ | |||
\ | \ | |||
FFTW_EXTERN X(plan) X(plan_r2r)(int rank, const int *n, R *in, R *out, \ | FFTW_EXTERN X(plan) X(plan_r2r)(int rank, const int *n, R *in, R *out, \ | |||
const X(r2r_kind) *kind, unsigned flags); \ | const X(r2r_kind) *kind, unsigned flags); \ | |||
\ | \ | |||
FFTW_EXTERN X(plan) X(plan_r2r_1d)(int n, R *in, R *out, \ | FFTW_EXTERN X(plan) X(plan_r2r_1d)(int n, R *in, R *out, \ | |||
X(r2r_kind) kind, unsigned flags); \ | X(r2r_kind) kind, unsigned flags); \ | |||
FFTW_EXTERN X(plan) X(plan_r2r_2d)(int nx, int ny, R *in, R *out, \ | FFTW_EXTERN X(plan) X(plan_r2r_2d)(int n0, int n1, R *in, R *out, \ | |||
X(r2r_kind) kindx, X(r2r_kind) kindy, \ | X(r2r_kind) kind0, X(r2r_kind) kind1, \ | |||
unsigned flags); \ | unsigned flags); \ | |||
FFTW_EXTERN X(plan) X(plan_r2r_3d)(int nx, int ny, int nz, \ | FFTW_EXTERN X(plan) X(plan_r2r_3d)(int n0, int n1, int n2, \ | |||
R *in, R *out, X(r2r_kind) kindx, \ | R *in, R *out, X(r2r_kind) kind0, \ | |||
X(r2r_kind) kindy, X(r2r_kind) kindz, \ | X(r2r_kind) kind1, X(r2r_kind) kind2, \ | |||
unsigned flags); \ | unsigned flags); \ | |||
\ | \ | |||
FFTW_EXTERN X(plan) X(plan_guru_r2r)(int rank, const X(iodim) *dims, \ | FFTW_EXTERN X(plan) X(plan_guru_r2r)(int rank, const X(iodim) *dims, \ | |||
int howmany_rank, \ | int howmany_rank, \ | |||
const X(iodim) *howmany_dims, \ | const X(iodim) *howmany_dims, \ | |||
R *in, R *out, \ | R *in, R *out, \ | |||
const X(r2r_kind) *kind, unsigned flags); \ | const X(r2r_kind) *kind, unsigned flags); \ | |||
\ | ||||
FFTW_EXTERN X(plan) X(plan_guru64_r2r)(int rank, const X(iodim64) *dims, | ||||
\ | ||||
int howmany_rank, \ | ||||
const X(iodim64) *howmany_dims, \ | ||||
R *in, R *out, | ||||
\ | ||||
const X(r2r_kind) *kind, unsigned flags); \ | ||||
\ | ||||
FFTW_EXTERN void X(execute_r2r)(const X(plan) p, R *in, R *out); \ | FFTW_EXTERN void X(execute_r2r)(const X(plan) p, R *in, R *out); \ | |||
\ | \ | |||
FFTW_EXTERN void X(destroy_plan)(X(plan) p); \ | FFTW_EXTERN void X(destroy_plan)(X(plan) p); \ | |||
FFTW_EXTERN void X(forget_wisdom)(void); \ | FFTW_EXTERN void X(forget_wisdom)(void); \ | |||
FFTW_EXTERN void X(cleanup)(void); \ | FFTW_EXTERN void X(cleanup)(void); \ | |||
\ | \ | |||
FFTW_EXTERN void X(set_timelimit)(double); \ | FFTW_EXTERN void X(set_timelimit)(double); \ | |||
\ | \ | |||
FFTW_EXTERN void X(plan_with_nthreads)(int nthreads); \ | FFTW_EXTERN void X(plan_with_nthreads)(int nthreads); \ | |||
FFTW_EXTERN int X(init_threads)(void); \ | FFTW_EXTERN int X(init_threads)(void); \ | |||
skipping to change at line 325 | skipping to change at line 374 | |||
#define FFTW_NO_BUFFERING (1U << 11) | #define FFTW_NO_BUFFERING (1U << 11) | |||
#define FFTW_NO_INDIRECT_OP (1U << 12) | #define FFTW_NO_INDIRECT_OP (1U << 12) | |||
#define FFTW_ALLOW_LARGE_GENERIC (1U << 13) /* NO_LARGE_GENERIC is default */ | #define FFTW_ALLOW_LARGE_GENERIC (1U << 13) /* NO_LARGE_GENERIC is default */ | |||
#define FFTW_NO_RANK_SPLITS (1U << 14) | #define FFTW_NO_RANK_SPLITS (1U << 14) | |||
#define FFTW_NO_VRANK_SPLITS (1U << 15) | #define FFTW_NO_VRANK_SPLITS (1U << 15) | |||
#define FFTW_NO_VRECURSE (1U << 16) | #define FFTW_NO_VRECURSE (1U << 16) | |||
#define FFTW_NO_SIMD (1U << 17) | #define FFTW_NO_SIMD (1U << 17) | |||
#define FFTW_NO_SLOW (1U << 18) | #define FFTW_NO_SLOW (1U << 18) | |||
#define FFTW_NO_FIXED_RADIX_LARGE_N (1U << 19) | #define FFTW_NO_FIXED_RADIX_LARGE_N (1U << 19) | |||
#define FFTW_ALLOW_PRUNING (1U << 20) | #define FFTW_ALLOW_PRUNING (1U << 20) | |||
#define FFTW_WISDOM_ONLY (1U << 21) | ||||
#ifdef __cplusplus | #ifdef __cplusplus | |||
} /* extern "C" */ | } /* extern "C" */ | |||
#endif /* __cplusplus */ | #endif /* __cplusplus */ | |||
#endif /* FFTW3_H */ | #endif /* FFTW3_H */ | |||
End of changes. 17 change blocks. | ||||
21 lines changed or deleted | 73 lines changed or added | |||