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


get_fftw_wisdom

return fftw wisdom

Syntax

[txt]=get_fftw_wisdom()

Arguments

txt

String matrix that contains fftw wisdom.

Caveat

This function is not implemented in Scilab versions which use the MKL intel library (Scilab official versions for windows in particular).

Description

This function return the fftw wisdom in a string matrix. Using get_fftw_wisdom and set_fftw_wisdom allows to optimize fft efficiency if many calls have to be done on with same data sizes and same options for the fft function.

Examples

sample_rate=1000;
t = 0:1/sample_rate:40;
N=size(t,'*'); //number of samples
s=sin(2*%pi*50*t)+sin(2*%pi*70*t+%pi/4)+grand(1,N,'nor',0,1);
fftw_forget_wisdom();
timer();y=fft(s);t1=timer() //first call
timer();y=fft(s);t2=timer()  //second call uses preserved wisdom
t1/t2
wisdom1=get_fftw_wisdom(); //preserve current wisdom
//realize a different fft
A = zeros(256,256);
A(5:24,13:17) = 1;
X = fft(A);

//Create a new signal with same size as s
s1=sin(2*%pi*10*t)+sin(2*%pi*7*t+%pi/4)+5*grand(1,N,'nor',0,1);
//restore preserved wisdom
set_fftw_wisdom(wisdom1);
timer();y=fft(s);t3=timer()
t3/t2

See also

Report an issue
<< fftw_forget_wisdom FFTW set_fftw_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 Oct 24 11:16:52 CEST 2024