48 int rank,
const int *n,
51 int rank,
const int *n,
75 int istride,
int ostride,
81 int istride,
int ostride,
117 int wisdom_signature,
151 #if defined(FFTW_ENABLE_UNSAFE_MULMOD) 152 # define MULMOD(x,y,p) (((x) * (y)) % (p)) 153 #elif defined(LONGLONG_IS_TWOINTS) 154 # define MULMOD(x,y,p) ((int) ((((long long) (x)) * ((long long) (y))) \ 155 % ((long long) (p)))) 157 # define USE_FFTW_SAFE_MULMOD 158 # define MULMOD(x,y,p) fftw_safe_mulmod(x,y,p) 159 extern int fftw_safe_mulmod(
int x,
int y,
int p);
178 #define FFTW_KONST(x) ((fftw_real) x) 185 #define FFTW_TRIG_SIN sin 186 #define FFTW_TRIG_COS cos 189 #define FFTW_K2PI FFTW_KONST(6.2831853071795864769252867665590057683943388) 203 # ifdef FFTW_ENABLE_I386_HACKS 204 # ifndef FFTW_GCC_ALIGNS_STACK 205 # ifndef FFTW_ENABLE_FLOAT 206 # define FFTW_USING_I386_HACKS 207 # define HACK_ALIGN_STACK_EVEN { \ 208 if ((((long) (__builtin_alloca(0))) & 0x7)) __builtin_alloca(4); \ 211 # define HACK_ALIGN_STACK_ODD { \ 212 if (!(((long) (__builtin_alloca(0))) & 0x7)) __builtin_alloca(4); \ 219 # ifdef FFTW_DEBUG_ALIGNMENT 220 # define ASSERT_ALIGNED_DOUBLE { \ 222 if ((((long) &__foo) & 0x7)) abort(); \ 229 #ifndef HACK_ALIGN_STACK_EVEN 230 # define HACK_ALIGN_STACK_EVEN {} 232 #ifndef HACK_ALIGN_STACK_ODD 233 # define HACK_ALIGN_STACK_ODD {} 235 #ifndef ASSERT_ALIGNED_DOUBLE 236 # define ASSERT_ALIGNED_DOUBLE {} 286 #define FFTW_HAS_TIME_DIFF 291 #if defined(HAVE_GETHRTIME) && defined(HAVE_HRTIME_T) 294 #ifdef HAVE_SYS_TIME_H 295 #include <sys/time.h> 300 #define fftw_get_time() gethrtime() 301 #define fftw_time_diff(t1,t2) ((t1) - (t2)) 302 #define fftw_time_to_sec(t) ((double) t / 1.0e9) 308 #define FFTW_TIME_MIN (1.0e-4) 309 #define FFTW_TIME_REPEAT 8 314 #elif defined(__GNUC__) && defined(__i386__) && defined(FFTW_ENABLE_PENTIUM_TIMER) 322 #ifndef FFTW_CYCLES_PER_SEC 323 #error "Must define FFTW_CYCLES_PER_SEC in fftw/config.h to use the Pentium cycle counter" 328 static __inline__ fftw_time read_tsc()
332 __asm__ __volatile__(
"rdtsc":
"=A" (ret));
337 #define fftw_get_time() read_tsc() 338 #define fftw_time_diff(t1,t2) ((t1) - (t2)) 339 #define fftw_time_to_sec(t) (((double) (t)) / FFTW_CYCLES_PER_SEC) 340 #define FFTW_TIME_MIN (1.0e-4) 343 #elif defined(HAVE_GETTIMEOFDAY) || defined(HAVE_BSDGETTIMEOFDAY) 344 #ifdef HAVE_SYS_TIME_H 345 #include <sys/time.h> 350 #define FFTW_USE_GETTIMEOFDAY 352 typedef struct timeval fftw_time;
356 #define fftw_get_time() fftw_gettimeofday_get_time() 357 #define fftw_time_diff(t1, t2) fftw_gettimeofday_time_diff(t1, t2) 358 #define fftw_time_to_sec(t) ((double)(t).tv_sec + (double)(t).tv_usec * 1.0E-6) 360 #ifndef FFTW_TIME_MIN 362 #define FFTW_TIME_MIN (1.0e-2) 368 #elif defined(HAVE_MAC_TIMER) 377 #ifndef HAVE_MAC_PCI_TIMER 383 typedef struct fftw_time_struct {
384 unsigned long hi, lo;
387 extern fftw_time get_Mac_microseconds(
void);
389 #define fftw_get_time() get_Mac_microseconds() 394 #define fftw_time_to_sec(t) ((t).lo * 1.0e-6 + 4294967295.0e-6 * (t).hi) 398 #define FFTW_TIME_MIN (5.0e-2) 404 #include <DriverServices.h> 407 #define fftw_get_time() UpTime() 408 #define fftw_time_diff(t1,t2) SubAbsoluteFromAbsolute(t1,t2) 409 #define fftw_time_to_sec(t) (AbsoluteToNanoseconds(t).lo * 1.0e-9) 413 #define FFTW_TIME_MIN (5.0e-3) 420 #elif defined(HAVE_WIN32_TIMER) 425 extern unsigned long GetPerfTime(
void);
426 extern double GetPerfSec(
double ticks);
428 #define fftw_get_time() GetPerfTime() 429 #define fftw_time_diff(t1,t2) ((t1) - (t2)) 430 #define fftw_time_to_sec(t) GetPerfSec(t) 432 #define FFTW_TIME_MIN (5.0e-2) 437 #elif defined(_CRAYMPP) 439 double SECONDR(
void);
445 #define fftw_get_time() SECONDR() 446 #define fftw_time_diff(t1,t2) ((t1) - (t2)) 447 #define fftw_time_to_sec(t) (t) 449 #define FFTW_TIME_MIN (1.0e-1) 461 #ifndef CLOCKS_PER_SEC 464 #define CLOCKS_PER_SEC 1000000 465 extern long clock(
void);
467 #error Please define CLOCKS_PER_SEC 471 #define fftw_get_time() clock() 472 #define fftw_time_diff(t1,t2) ((t1) - (t2)) 473 #define fftw_time_to_sec(t) (((double) (t)) / CLOCKS_PER_SEC) 481 #define FFTW_TIME_MIN (2.0e-1) 486 #ifndef FFTW_TIME_REPEAT 487 #define FFTW_TIME_REPEAT 4 491 #ifndef FFTW_TIME_LIMIT 492 #define FFTW_TIME_LIMIT 2.0
fftw_twiddle * fftw_create_twiddle(int n, const fftw_codelet_desc *d)
fftw_plan * fftwnd_create_plans_specific(fftw_plan *plans, int rank, const int *n, const int *n_after, fftw_direction dir, int flags, fftw_complex *in, int istride, fftw_complex *out, int ostride)
void fftwnd_aux(fftwnd_plan p, int cur_dim, fftw_complex *in, int istride, fftw_complex *out, int ostride, fftw_complex *work)
fftw_plan_node * fftw_make_node_twiddle(int n, const fftw_codelet_desc *config, fftw_plan_node *recurse, int flags)
fftw_plan fftw_lookup(fftw_plan *table, int n, int flags, int vector_size)
void fftw_use_node(fftw_plan_node *p)
void fftw_strided_copy(int, fftw_complex *, int, fftw_complex *)
fftw_plan_node * fftw_make_node_hc2real(int size, const fftw_codelet_desc *config)
fftw_plan * fftwnd_create_plans_generic(fftw_plan *plans, int rank, const int *n, fftw_direction dir, int flags)
void fftw_use_plan(fftw_plan p)
fftw_plan fftw_pick_better(fftw_plan p1, fftw_plan p2)
fftw_plan_node * fftw_make_node(void)
void( fftw_generic_codelet)(fftw_complex *, const fftw_complex *, int, int, int, int)
void(* fftw_plan_hook_ptr)(fftw_plan plan)
fftw_plan_node * fftw_make_node_rgeneric(int n, int size, fftw_direction dir, fftw_rgeneric_codelet *codelet, fftw_plan_node *recurse, int flags)
fftw_plan_node * fftw_make_node_hc2hc(int n, fftw_direction dir, const fftw_codelet_desc *config, fftw_plan_node *recurse, int flags)
fftw_time fftw_gettimeofday_get_time(void)
fftw_plan_node * fftw_make_node_generic(int n, int size, fftw_generic_codelet *codelet, fftw_plan_node *recurse, int flags)
fftw_plan_hook_ptr fftw_plan_hook
fftw_plan fftw_make_plan(int n, fftw_direction dir, fftw_plan_node *root, int flags, enum fftw_node_type wisdom_type, int wisdom_signature, fftw_recurse_kind recurse_kind, int vector_size)
void fftw_insert(fftw_plan *table, fftw_plan this_plan)
void fftw_executor_simple(int, const fftw_complex *, fftw_complex *, fftw_plan_node *, int, int, fftw_recurse_kind recurse_kind)
int fftwnd_work_size(int rank, const int *n, int flags, int ncopies)
void fftw_wisdom_add(int n, int flags, fftw_direction dir, enum fftw_wisdom_category cat, int istride, int ostride, enum fftw_node_type type, int signature, fftw_recurse_kind recurse_kind)
double fftw_estimate_node(fftw_plan_node *p)
void fftwnd_aux_howmany(fftwnd_plan p, int cur_dim, int howmany, fftw_complex *in, int istride, int idist, fftw_complex *out, int ostride, int odist, fftw_complex *work)
fftw_plan_node * fftw_make_node_rader(int n, int size, fftw_direction dir, fftw_plan_node *recurse, int flags)
fftwnd_plan fftwnd_create_plan_aux(int rank, const int *n, fftw_direction dir, int flags)
#define fftw_time_diff(t1, t2)
fftw_rader_data * fftw_rader_top
int fftw_wisdom_lookup(int n, int flags, fftw_direction dir, enum fftw_wisdom_category category, int istride, int ostride, enum fftw_node_type *type, int *signature, fftw_recurse_kind *recurse_kind, int replace_p)
fftw_plan_node * fftw_make_node_notw(int size, const fftw_codelet_desc *config)
void fftw_destroy_plan_internal(fftw_plan p)
fftw_plan * fftwnd_new_plan_array(int rank)
void( fftw_rgeneric_codelet)(fftw_real *, const fftw_complex *, int, int, int, int)
fftw_plan_node * fftw_make_node_real2hc(int size, const fftw_codelet_desc *config)
void fftw_complete_twiddle(fftw_plan_node *p, int n)
DL_IMPORT(fftw_plan_hook_ptr) fftw_plan_hook
void fftw_make_empty_table(fftw_plan *table)
fftw_time fftw_gettimeofday_time_diff(fftw_time t1, fftw_time t2)
void fftw_destroy_twiddle(fftw_twiddle *tw)
void fftw_destroy_table(fftw_plan *table)