Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.0.2 - Português

Change language to:
English - Français - 日本語 - Русский

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Ajuda do Scilab >> FFTW > fftw_flags

fftw_flags

set method for fft planner algorithm selection

Syntax

[a,[S]]=fftw_flags(flag)

Arguments

flag

a string or an integer. Specifies the planner algorithm. See below.

a

an integer. The planner code. See below.

S

a character string. The planner name.

Description

This function enables the selection of the algorithm used to determine the fftw planner algorithm. The planner is used to determine an efficient way to compute the fft.

Warning: the default value "FFTW_ESTIMATE" gives generally quite efficient plans. Try to change it only if the fft efficiency is really important and you have a lot of similar calls to do.

Accepted entries are :

  • {FFTW_ESTIMATE} or 64. Specifies that, instead of actual measurements of different algorithms, a simple heuristic is used to pick a (probably sub-optimal) plan quickly. With this flag, the input/output arrays are not overwritten during planning. It is the default value

  • FFTW_MEASURE or 0. tells FFTW to find an optimized plan by actually computing several FFTs and measuring their execution time. Depending on your machine, this can take some time (often a few seconds).

  • FFTW_PATIENT or 32. It is like "FFTW_MEASURE", but considers a wider range of algorithms and often produces a “more optimal” plan (especially for large transforms), but at the expense of several times longer planning time (especially for large transforms).

  • FFTW_EXHAUSTIVE or 8. It is like "FFTW_PATIENT", but considers an even wider range of algorithms, including many that we think are unlikely to be fast, to produce the most optimal plan but with a substantially increased planning time.

Remark : when using FFTW_MEASURE/FFTW_PATIENT/FFTW_EXHAUSTIVE you must call fftw twice. (first call for initialization, second and others calls for computation)

Examples

A=rand(1, 2^9 + 2^15);
fftw_forget_wisdom();
fftw_flags("FFTW_ESTIMATE");
timer(); y=fft(A); timer()//first call determines the plan
timer(); y=fft(A); timer() //subsequent similar calls
fftw_flags("FFTW_MEASURE");
fftw_forget_wisdom();
timer(); y=fft(A); timer()//first call determines the plan, this takes about 5min
timer(); y=fft(A); timer() //subsequent similar calls

See also

Report an issue
<< FFTW FFTW fftw_forget_wisdom >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Feb 14 15:00:44 CET 2019