| Bsoft 1.9 Bernard's software package

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

putils.c
Go to the documentation of this file.
1
2 /*
3 * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 */
20
21 /*
22 * putils.c -- plan utilities shared by planner.c and rplanner.c
23 */
24
25 /* $Id: putils.c,v 1.21 2003/03/16 23:43:46 stevenj Exp $ */
26 #include "fftw-int.h"
27 #include <stdlib.h>
28 #include <stdio.h>
29
30 int fftw_node_cnt = 0;
31 int fftw_plan_cnt = 0;
32
33 /*
34 * These two constants are used for the FFTW_ESTIMATE flag to help
35 * create a heuristic plan. They don't affect FFTW_MEASURE.
36 */
37 #define NOTW_OPTIMAL_SIZE 32
38 #define TWIDDLE_OPTIMAL_SIZE 12
39
40 #define IS_POWER_OF_TWO(n) (((n) & ((n) - 1)) == 0)
41
42 /* constructors --- I wish I had ML */
43 fftw_plan_node *fftw_make_node(void)
44 {
45 fftw_plan_node *p = (fftw_plan_node *)
46 fftw_malloc(sizeof(fftw_plan_node));
47 p->refcnt = 0;
48 fftw_node_cnt++;
49 return p;
50 }
51
52 void fftw_use_node(fftw_plan_node *p)
53 {
54 ++p->refcnt;
55 }
56
57 fftw_plan_node *fftw_make_node_notw(int size, const fftw_codelet_desc *config)
58 {
59 fftw_plan_node *p = fftw_make_node();
60
61 p->type = config->type;
62 p->nodeu.notw.size = size;
63 p->nodeu.notw.codelet = (fftw_notw_codelet *) config->codelet;
64 p->nodeu.notw.codelet_desc = config;
65 return p;
66 }
67
68 fftw_plan_node *fftw_make_node_real2hc(int size,
69 const fftw_codelet_desc *config)
70 {
71 fftw_plan_node *p = fftw_make_node();
72
73 p->type = config->type;
74 p->nodeu.real2hc.size = size;
75 p->nodeu.real2hc.codelet = (fftw_real2hc_codelet *) config->codelet;
76 p->nodeu.real2hc.codelet_desc = config;
77 return p;
78 }
79
80 fftw_plan_node *fftw_make_node_hc2real(int size,
81 const fftw_codelet_desc *config)
82 {
83 fftw_plan_node *p = fftw_make_node();
84
85 p->type = config->type;
86 p->nodeu.hc2real.size = size;
87 p->nodeu.hc2real.codelet = (fftw_hc2real_codelet *) config->codelet;
88 p->nodeu.hc2real.codelet_desc = config;
89 return p;
90 }
91
92 fftw_plan_node *fftw_make_node_twiddle(int n,
93 const fftw_codelet_desc *config,
94 fftw_plan_node *recurse,
95 int flags)
96 {
97 fftw_plan_node *p = fftw_make_node();
98
99 p->type = config->type;
100 p->nodeu.twiddle.size = config->size;
101 p->nodeu.twiddle.codelet = (fftw_twiddle_codelet *) config->codelet;
102 p->nodeu.twiddle.recurse = recurse;
103 p->nodeu.twiddle.codelet_desc = config;
104 fftw_use_node(recurse);
105 if (flags & FFTW_MEASURE)
106 p->nodeu.twiddle.tw = fftw_create_twiddle(n, config);
107 else
108 p->nodeu.twiddle.tw = 0;
109 return p;
110 }
111
112 fftw_plan_node *fftw_make_node_hc2hc(int n, fftw_direction dir,
113 const fftw_codelet_desc *config,
114 fftw_plan_node *recurse,
115 int flags)
116 {
117 fftw_plan_node *p = fftw_make_node();
118
119 p->type = config->type;
120 p->nodeu.hc2hc.size = config->size;
121 p->nodeu.hc2hc.dir = dir;
122 p->nodeu.hc2hc.codelet = (fftw_hc2hc_codelet *) config->codelet;
123 p->nodeu.hc2hc.recurse = recurse;
124 p->nodeu.hc2hc.codelet_desc = config;
125 fftw_use_node(recurse);
126 if (flags & FFTW_MEASURE)
127 p->nodeu.hc2hc.tw = fftw_create_twiddle(n, config);
128 else
129 p->nodeu.hc2hc.tw = 0;
130 return p;
131 }
132
133 fftw_plan_node *fftw_make_node_generic(int n, int size,
134 fftw_generic_codelet *codelet,
135 fftw_plan_node *recurse,
136 int flags)
137 {
138 fftw_plan_node *p = fftw_make_node();
139
140 p->type = FFTW_GENERIC;
141 p->nodeu.generic.size = size;
142 p->nodeu.generic.codelet = codelet;
143 p->nodeu.generic.recurse = recurse;
144 fftw_use_node(recurse);
145
146 if (flags & FFTW_MEASURE)
147 p->nodeu.generic.tw = fftw_create_twiddle(n,
148 (const fftw_codelet_desc *) 0);
149 else
150 p->nodeu.generic.tw = 0;
151 return p;
152 }
153
154 fftw_plan_node *fftw_make_node_rgeneric(int n, int size,
155 fftw_direction dir,
156 fftw_rgeneric_codelet *codelet,
157 fftw_plan_node *recurse,
158 int flags)
159 {
160 fftw_plan_node *p = fftw_make_node();
161
162 if (size % 2 == 0 || (n / size) % 2 == 0)
163 fftw_die("invalid size for rgeneric codelet\n");
164
165 p->type = FFTW_RGENERIC;
166 p->nodeu.rgeneric.size = size;
167 p->nodeu.rgeneric.dir = dir;
168 p->nodeu.rgeneric.codelet = codelet;
169 p->nodeu.rgeneric.recurse = recurse;
170 fftw_use_node(recurse);
171
172 if (flags & FFTW_MEASURE)
173 p->nodeu.rgeneric.tw = fftw_create_twiddle(n,
174 (const fftw_codelet_desc *) 0);
175 else
176 p->nodeu.rgeneric.tw = 0;
177 return p;
178 }
179
180 /*
181 * Note that these two Rader-related things must go here, rather than
182 * in rader.c, in order that putils.c (and rplanner.c) won't depend
183 * upon rader.c.
184 */
185
186 fftw_rader_data *fftw_rader_top = NULL;
187
188 static void fftw_destroy_rader(fftw_rader_data * d)
189 {
190 if (d) {
191 d->refcount--;
192 if (d->refcount <= 0) {
193 fftw_rader_data *cur = fftw_rader_top, *prev = NULL;
194
195 while (cur && cur != d) {
196 prev = cur;
197 cur = cur->next;
198 }
199 if (!cur)
200 fftw_die("invalid Rader data pointer\n");
201
202 if (prev)
203 prev->next = d->next;
204 else
205 fftw_rader_top = d->next;
206
207 fftw_destroy_plan_internal(d->plan);
208 fftw_free(d->omega);
209 fftw_free(d->cdesc);
210 fftw_free(d);
211 }
212 }
213 }
214
215 static void destroy_tree(fftw_plan_node *p)
216 {
217 if (p) {
218 --p->refcnt;
219 if (p->refcnt == 0) {
220 switch (p->type) {
221 case FFTW_NOTW:
222 case FFTW_REAL2HC:
223 case FFTW_HC2REAL:
224 break;
225
226 case FFTW_TWIDDLE:
227 if (p->nodeu.twiddle.tw)
228 fftw_destroy_twiddle(p->nodeu.twiddle.tw);
229 destroy_tree(p->nodeu.twiddle.recurse);
230 break;
231
232 case FFTW_HC2HC:
233 if (p->nodeu.hc2hc.tw)
234 fftw_destroy_twiddle(p->nodeu.hc2hc.tw);
235 destroy_tree(p->nodeu.hc2hc.recurse);
236 break;
237
238 case FFTW_GENERIC:
239 if (p->nodeu.generic.tw)
240 fftw_destroy_twiddle(p->nodeu.generic.tw);
241 destroy_tree(p->nodeu.generic.recurse);
242 break;
243
244 case FFTW_RADER:
245 if (p->nodeu.rader.tw)
246 fftw_destroy_twiddle(p->nodeu.rader.tw);
247 if (p->nodeu.rader.rader_data)
248 fftw_destroy_rader(p->nodeu.rader.rader_data);
249 destroy_tree(p->nodeu.rader.recurse);
250 break;
251
252 case FFTW_RGENERIC:
253 if (p->nodeu.rgeneric.tw)
254 fftw_destroy_twiddle(p->nodeu.rgeneric.tw);
255 destroy_tree(p->nodeu.rgeneric.recurse);
256 break;
257 }
258
259 fftw_free(p);
260 fftw_node_cnt--;
261 }
262 }
263 }
264
265 /* create a plan with twiddle factors, and other bells and whistles */
266 fftw_plan fftw_make_plan(int n, fftw_direction dir,
267 fftw_plan_node *root, int flags,
268 enum fftw_node_type wisdom_type,
269 int wisdom_signature,
270 fftw_recurse_kind recurse_kind, int vector_size)
271 {
272 fftw_plan p = (fftw_plan) fftw_malloc(sizeof(struct fftw_plan_struct));
273
274 p->n = n;
275 p->dir = dir;
276 p->flags = flags;
277 fftw_use_node(root);
278 p->root = root;
279 p->cost = 0.0;
280 p->wisdom_type = wisdom_type;
281 p->wisdom_signature = wisdom_signature;
282 p->recurse_kind = recurse_kind;
283 p->vector_size = vector_size;
284 if (recurse_kind == FFTW_VECTOR_RECURSE && vector_size > 1)
285 fftw_die("invalid vector-recurse plan attempted\n");
286 p->next = (fftw_plan) 0;
287 p->refcnt = 0;
288 fftw_plan_cnt++;
289 return p;
290 }
291
292 /*
293 * complete with twiddle factors (because nodes don't have
294 * them when FFTW_ESTIMATE is set)
295 */
296 void fftw_complete_twiddle(fftw_plan_node *p, int n)
297 {
298 int r;
299 switch (p->type) {
300 case FFTW_NOTW:
301 case FFTW_REAL2HC:
302 case FFTW_HC2REAL:
303 break;
304
305 case FFTW_TWIDDLE:
306 r = p->nodeu.twiddle.size;
307 if (!p->nodeu.twiddle.tw)
308 p->nodeu.twiddle.tw =
309 fftw_create_twiddle(n, p->nodeu.twiddle.codelet_desc);
310 fftw_complete_twiddle(p->nodeu.twiddle.recurse, n / r);
311 break;
312
313 case FFTW_HC2HC:
314 r = p->nodeu.hc2hc.size;
315 if (!p->nodeu.hc2hc.tw)
316 p->nodeu.hc2hc.tw =
317 fftw_create_twiddle(n, p->nodeu.hc2hc.codelet_desc);
318 fftw_complete_twiddle(p->nodeu.hc2hc.recurse, n / r);
319 break;
320
321 case FFTW_GENERIC:
322 r = p->nodeu.generic.size;
323 if (!p->nodeu.generic.tw)
324 p->nodeu.generic.tw =
325 fftw_create_twiddle(n, (const fftw_codelet_desc *) 0);
326 fftw_complete_twiddle(p->nodeu.generic.recurse, n / r);
327 break;
328
329 case FFTW_RADER:
330 r = p->nodeu.rader.size;
331 if (!p->nodeu.rader.tw)
332 p->nodeu.rader.tw =
333 fftw_create_twiddle(n, p->nodeu.rader.rader_data->cdesc);
334 fftw_complete_twiddle(p->nodeu.rader.recurse, n / r);
335 break;
336
337 case FFTW_RGENERIC:
338 r = p->nodeu.rgeneric.size;
339 if (!p->nodeu.rgeneric.tw)
340 p->nodeu.rgeneric.tw =
341 fftw_create_twiddle(n, (const fftw_codelet_desc *) 0);
342 fftw_complete_twiddle(p->nodeu.rgeneric.recurse, n / r);
343 break;
344
345 }
346 }
347
348 void fftw_use_plan(fftw_plan p)
349 {
350 ++p->refcnt;
351 }
352
353 void fftw_destroy_plan_internal(fftw_plan p)
354 {
355 --p->refcnt;
356
357 if (p->refcnt == 0) {
358 destroy_tree(p->root);
359 fftw_plan_cnt--;
360 fftw_free(p);
361 }
362 }
363
364 /* end of constructors */
365
366 /* management of plan tables */
367 void fftw_make_empty_table(fftw_plan *table)
368 {
369 *table = (fftw_plan) 0;
370 }
371
372 void fftw_insert(fftw_plan *table, fftw_plan this_plan)
373 {
374 fftw_use_plan(this_plan);
375 this_plan->next = *table;
376 *table = this_plan;
377 }
378
379 fftw_plan fftw_lookup(fftw_plan *table, int n, int flags, int vector_size)
380 {
381 fftw_plan p;
382
383 for (p = *table; p &&
384 (p->n != n || p->flags != flags || p->vector_size != vector_size);
385 p = p->next);
386
387 return p;
388 }
389
390 void fftw_destroy_table(fftw_plan *table)
391 {
392 fftw_plan p, q;
393
394 for (p = *table; p; p = q) {
395 q = p->next;
396 fftw_destroy_plan_internal(p);
397 }
398 }
399
400 double fftw_estimate_node(fftw_plan_node *p)
401 {
402 int k;
403
404 switch (p->type) {
405 case FFTW_NOTW:
406 k = p->nodeu.notw.size;
407 goto common1;
408
409 case FFTW_REAL2HC:
410 k = p->nodeu.real2hc.size;
411 goto common1;
412
413 case FFTW_HC2REAL:
414 k = p->nodeu.hc2real.size;
415 common1:
416 return 1.0 + 0.1 * (k - NOTW_OPTIMAL_SIZE) *
417 (k - NOTW_OPTIMAL_SIZE);
418
419 case FFTW_TWIDDLE:
420 k = p->nodeu.twiddle.size;
421 return 1.0 + 0.1 * (k - TWIDDLE_OPTIMAL_SIZE) *
422 (k - TWIDDLE_OPTIMAL_SIZE)
423 + fftw_estimate_node(p->nodeu.twiddle.recurse);
424
425 case FFTW_HC2HC:
426 k = p->nodeu.hc2hc.size;
427 return 1.0 + 0.1 * (k - TWIDDLE_OPTIMAL_SIZE) *
428 (k - TWIDDLE_OPTIMAL_SIZE)
429 + fftw_estimate_node(p->nodeu.hc2hc.recurse);
430
431 case FFTW_GENERIC:
432 k = p->nodeu.generic.size;
433 return 10.0 + k * k
434 + fftw_estimate_node(p->nodeu.generic.recurse);
435
436 case FFTW_RADER:
437 k = p->nodeu.rader.size;
438 return 10.0 + 10 * k
439 + fftw_estimate_node(p->nodeu.rader.recurse);
440
441 case FFTW_RGENERIC:
442 k = p->nodeu.rgeneric.size;
443 return 10.0 + k * k
444 + fftw_estimate_node(p->nodeu.rgeneric.recurse);
445 }
446 return 1.0E20;
447 }
448
449 /* pick the better of two plans and destroy the other one. */
450 fftw_plan fftw_pick_better(fftw_plan p1, fftw_plan p2)
451 {
452 if (!p1)
453 return p2;
454
455 if (!p2)
456 return p1;
457
458 if (p1->cost > p2->cost) {
459 fftw_destroy_plan_internal(p1);
460 return p2;
461 } else {
462 fftw_destroy_plan_internal(p2);
463 return p1;
464 }
465 }
466
467 /* find the smallest prime factor of n */
468 int fftw_factor(int n)
469 {
470 int r;
471
472 /* try 2 */
473 if ((n & 1) == 0)
474 return 2;
475
476 /* try odd numbers up to sqrt(n) */
477 for (r = 3; r * r <= n; r += 2)
478 if (n % r == 0)
479 return r;
480
481 /* n is prime */
482 return n;
483 }
484
485 static void print_node(FILE *f, fftw_plan_node *p, int indent)
486 {
487 if (p) {
488 switch (p->type) {
489 case FFTW_NOTW:
490 fprintf(f, "%*sFFTW_NOTW %d\n", indent, "",
491 p->nodeu.notw.size);
492 break;
493 case FFTW_REAL2HC:
494 fprintf(f, "%*sFFTW_REAL2HC %d\n", indent, "",
495 p->nodeu.real2hc.size);
496 break;
497 case FFTW_HC2REAL:
498 fprintf(f, "%*sFFTW_HC2REAL %d\n", indent, "",
499 p->nodeu.hc2real.size);
500 break;
501 case FFTW_TWIDDLE:
502 fprintf(f, "%*sFFTW_TWIDDLE %d\n", indent, "",
503 p->nodeu.twiddle.size);
504 print_node(f, p->nodeu.twiddle.recurse, indent);
505 break;
506 case FFTW_HC2HC:
507 fprintf(f, "%*sFFTW_HC2HC %d\n", indent, "",
508 p->nodeu.hc2hc.size);
509 print_node(f, p->nodeu.hc2hc.recurse, indent);
510 break;
511 case FFTW_GENERIC:
512 fprintf(f, "%*sFFTW_GENERIC %d\n", indent, "",
513 p->nodeu.generic.size);
514 print_node(f, p->nodeu.generic.recurse, indent);
515 break;
516 case FFTW_RADER:
517 fprintf(f, "%*sFFTW_RADER %d\n", indent, "",
518 p->nodeu.rader.size);
519
520 fprintf(f, "%*splan for size %d convolution:\n",
521 indent + 4, "", p->nodeu.rader.size - 1);
522 print_node(f, p->nodeu.rader.rader_data->plan->root,
523 indent + 6);
524
525 print_node(f, p->nodeu.rader.recurse, indent);
526 break;
527 case FFTW_RGENERIC:
528 fprintf(f, "%*sFFTW_RGENERIC %d\n", indent, "",
529 p->nodeu.rgeneric.size);
530 print_node(f, p->nodeu.rgeneric.recurse, indent);
531 break;
532 }
533 }
534 }
535
536 void fftw_fprint_plan(FILE *f, fftw_plan p)
537 {
538
539 fprintf(f, "plan: (cost = %e)\n", p->cost);
540 if (p->recurse_kind == FFTW_VECTOR_RECURSE)
541 fprintf(f, "(vector recursion)\n");
542 else if (p->vector_size > 1)
543 fprintf(f, "(vector-size %d)\n", p->vector_size);
544 print_node(f, p->root, 0);
545 }
546
547 void fftw_print_plan(fftw_plan p)
548 {
549 fftw_fprint_plan(stdout, p);
550 }
551
552 size_t fftw_sizeof_fftw_real(void)
553 {
554 return(sizeof(fftw_real));
555 }
fftw_rader_data_struct::next
struct fftw_rader_data_struct * next
Definition: fftw.h:183
fftw_codelet_desc
Definition: fftw.h:126
fftw_plan_cnt
int fftw_plan_cnt
Definition: putils.c:31
fftw_create_twiddle
fftw_twiddle * fftw_create_twiddle(int n, const fftw_codelet_desc *d)
Definition: twiddle.c:175
fftw_fprint_plan
void fftw_fprint_plan(FILE *f, fftw_plan p)
Definition: putils.c:536
fftw_complete_twiddle
void fftw_complete_twiddle(fftw_plan_node *p, int n)
Definition: putils.c:296
fftw_plan_struct::cost
double cost
Definition: fftw.h:280
fftw_plan_struct
Definition: fftw.h:271
config_s
Definition: deflate.c:117
fftw_rader_data_struct::omega
fftw_complex * omega
Definition: fftw.h:180
fftw-int.h
fftw_plan_node_struct::nodeu
union fftw_plan_node_struct::@0 nodeu
fftw_twiddle_codelet
void( fftw_twiddle_codelet)(fftw_complex *, const fftw_complex *, int, int, int)
Definition: fftw.h:95
FFTW_TWIDDLE
Definition: fftw.h:121
fftw_make_empty_table
void fftw_make_empty_table(fftw_plan *table)
Definition: putils.c:367
fftw_make_node_hc2hc
fftw_plan_node * fftw_make_node_hc2hc(int n, fftw_direction dir, const fftw_codelet_desc *config, fftw_plan_node *recurse, int flags)
Definition: putils.c:112
fftw_plan_node_struct::rader
struct fftw_plan_node_struct::@0::@4 rader
fftw_hc2hc_codelet
void( fftw_hc2hc_codelet)(fftw_real *, const fftw_complex *, int, int, int)
Definition: fftw.h:107
fftw_real2hc_codelet
void( fftw_real2hc_codelet)(const fftw_real *, fftw_real *, fftw_real *, int, int, int)
Definition: fftw.h:101
fftw_sizeof_fftw_real
size_t fftw_sizeof_fftw_real(void)
Definition: putils.c:552
fftw_make_node_hc2real
fftw_plan_node * fftw_make_node_hc2real(int size, const fftw_codelet_desc *config)
Definition: putils.c:80
fftw_plan_struct::next
struct fftw_plan_struct * next
Definition: fftw.h:278
fftw_lookup
fftw_plan fftw_lookup(fftw_plan *table, int n, int flags, int vector_size)
Definition: putils.c:379
fftw_free
void fftw_free(void *p)
Definition: malloc.c:178
fftw_plan_struct::n
int n
Definition: fftw.h:272
FFTW_GENERIC
Definition: fftw.h:121
FFTW_HC2HC
Definition: fftw.h:122
fftw_die
void fftw_die(const char *s)
Definition: malloc.c:192
fftw_use_plan
void fftw_use_plan(fftw_plan p)
Definition: putils.c:348
fftw_plan_struct::recurse_kind
fftw_recurse_kind recurse_kind
Definition: fftw.h:281
fftw_rader_data_struct::plan
struct fftw_plan_struct * plan
Definition: fftw.h:179
fftw_generic_codelet
void( fftw_generic_codelet)(fftw_complex *, const fftw_complex *, int, int, int, int)
Definition: fftw.h:98
fftw_plan_node_struct::size
int size
Definition: fftw.h:198
fftw_rader_data_struct
Definition: fftw.h:178
FFTW_MEASURE
#define FFTW_MEASURE
Definition: fftw.h:289
FFTW_HC2REAL
Definition: fftw.h:122
fftw_plan_node_struct::real2hc
struct fftw_plan_node_struct::@0::@5 real2hc
fftw_plan_struct::root
fftw_plan_node * root
Definition: fftw.h:279
fftw_node_type
fftw_node_type
Definition: fftw.h:120
fftw_plan_node_struct::codelet
fftw_notw_codelet * codelet
Definition: fftw.h:199
fftw_notw_codelet
void( fftw_notw_codelet)(const fftw_complex *, fftw_complex *, int, int)
Definition: fftw.h:93
fftw_hc2real_codelet
void( fftw_hc2real_codelet)(const fftw_real *, const fftw_real *, fftw_real *, int, int, int)
Definition: fftw.h:104
fftw_make_plan
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)
Definition: putils.c:266
fftw_rader_top
fftw_rader_data * fftw_rader_top
Definition: putils.c:186
fftw_malloc
void * fftw_malloc(size_t n)
Definition: malloc.c:160
FFTW_VECTOR_RECURSE
Definition: fftw.h:268
fftw_pick_better
fftw_plan fftw_pick_better(fftw_plan p1, fftw_plan p2)
Definition: putils.c:450
fftw_recurse_kind
fftw_recurse_kind
Definition: fftw.h:266
fftw_rader_data_struct::cdesc
fftw_codelet_desc * cdesc
Definition: fftw.h:184
fftw_plan_node_struct::dir
fftw_direction dir
Definition: fftw.h:246
fftw_codelet_desc::type
enum fftw_node_type type
Definition: fftw.h:131
fftw_plan_node_struct::hc2hc
struct fftw_plan_node_struct::@0::@7 hc2hc
fftw_make_node_notw
fftw_plan_node * fftw_make_node_notw(int size, const fftw_codelet_desc *config)
Definition: putils.c:57
fftw_plan_node_struct::type
enum fftw_node_type type
Definition: fftw.h:193
fftw_print_plan
void fftw_print_plan(fftw_plan p)
Definition: putils.c:547
fftw_plan_node_struct::hc2real
struct fftw_plan_node_struct::@0::@6 hc2real
fftw_make_node
fftw_plan_node * fftw_make_node(void)
Definition: putils.c:43
fftw_destroy_table
void fftw_destroy_table(fftw_plan *table)
Definition: putils.c:390
fftw_codelet_desc::codelet
void(* codelet)()
Definition: fftw.h:128
fftw_plan_node_struct::rgeneric
struct fftw_plan_node_struct::@0::@8 rgeneric
fftw_make_node_rgeneric
fftw_plan_node * fftw_make_node_rgeneric(int n, int size, fftw_direction dir, fftw_rgeneric_codelet *codelet, fftw_plan_node *recurse, int flags)
Definition: putils.c:154
FFTW_RADER
Definition: fftw.h:121
fftw_plan_struct::vector_size
int vector_size
Definition: fftw.h:282
fftw_plan_node_struct::twiddle
struct fftw_plan_node_struct::@0::@2 twiddle
fftw_estimate_node
double fftw_estimate_node(fftw_plan_node *p)
Definition: putils.c:400
fftw_insert
void fftw_insert(fftw_plan *table, fftw_plan this_plan)
Definition: putils.c:372
fftw_plan_node_struct::refcnt
int refcnt
Definition: fftw.h:263
fftw_factor
int fftw_factor(int n)
Definition: putils.c:468
NOTW_OPTIMAL_SIZE
#define NOTW_OPTIMAL_SIZE
Definition: putils.c:37
fftw_rgeneric_codelet
void( fftw_rgeneric_codelet)(fftw_real *, const fftw_complex *, int, int, int, int)
Definition: fftw.h:110
fftw_codelet_desc::size
int size
Definition: fftw.h:129
fftw_plan_struct::dir
fftw_direction dir
Definition: fftw.h:274
fftw_make_node_generic
fftw_plan_node * fftw_make_node_generic(int n, int size, fftw_generic_codelet *codelet, fftw_plan_node *recurse, int flags)
Definition: putils.c:133
TWIDDLE_OPTIMAL_SIZE
#define TWIDDLE_OPTIMAL_SIZE
Definition: putils.c:38
fftw_plan
struct fftw_plan_struct * fftw_plan
Definition: fftw.h:285
FFTW_RGENERIC
Definition: fftw.h:122
fftw_plan_node_struct
Definition: fftw.h:192
fftw_node_cnt
int fftw_node_cnt
Definition: putils.c:30
fftw_destroy_plan_internal
void fftw_destroy_plan_internal(fftw_plan p)
Definition: putils.c:353
fftw_real
float fftw_real
Definition: fftw.h:49
fftw_make_node_real2hc
fftw_plan_node * fftw_make_node_real2hc(int size, const fftw_codelet_desc *config)
Definition: putils.c:68
fftw_plan_node_struct::notw
struct fftw_plan_node_struct::@0::@1 notw
fftw_plan_node_struct::recurse
struct fftw_plan_node_struct * recurse
Definition: fftw.h:208
FFTW_NOTW
Definition: fftw.h:121
fftw_plan_struct::wisdom_type
enum fftw_node_type wisdom_type
Definition: fftw.h:277
FFTW_REAL2HC
Definition: fftw.h:122
fftw_plan_node_struct::generic
struct fftw_plan_node_struct::@0::@3 generic
fftw_direction
fftw_direction
Definition: fftw.h:63
fftw_plan_struct::refcnt
int refcnt
Definition: fftw.h:273
fftw_rader_data_struct::refcount
int refcount
Definition: fftw.h:182
fftw_plan_struct::wisdom_signature
int wisdom_signature
Definition: fftw.h:276
fftw_use_node
void fftw_use_node(fftw_plan_node *p)
Definition: putils.c:52
fftw_plan_struct::flags
int flags
Definition: fftw.h:275
fftw_destroy_twiddle
void fftw_destroy_twiddle(fftw_twiddle *tw)
Definition: twiddle.c:201
fftw_make_node_twiddle
fftw_plan_node * fftw_make_node_twiddle(int n, const fftw_codelet_desc *config, fftw_plan_node *recurse, int flags)
Definition: putils.c:92