Closed W-Wuxian closed 3 years ago
dims[3].n = 2;
dims[3].is = 4;
dims[3].os = 4;
This should be dims[2]
.
For example, here is a package that calls FFTW to perform a FWHT in Julia, with various orderings: https://github.com/JuliaMath/Hadamard.jl
Ty so much (was tired myb). I I ran hadamardize() form Hadamard.jl and dims_howmany() from FFTW.jl to compute the correct initial values for dims and howmany_dims in the previous c code. I understand how dims is compute, but I am missing something for howmany_rank and homany_dims. It 's look like that
p = fftw_plan_guru_r2r(rank, dims, howmany_rank, howmany_dims, in, out, tkind, FFTW_ESTIMATE);
is the same as
p = fftw_plan_guru_r2r(rank, dims, 0, NULL, in, out, tkind, FFTW_ESTIMATE);
In both cases, p is: (rdft-rank>=2/1 (rdft-vrank>=1-x2/1 (rdft-rank>=2/1 (rdft-r2hc-direct-r2c-2-x2 "r2cf_2") (rdft-r2hc-direct-r2c-2-x2 "r2cf_2"))) (rdft-r2hc-direct-r2c-2-x4 "r2cf_2"))
Why howmany_dims doesn't count in the Plan computation?
Hi, is there a way to compute the Fast Walsh-Hadamard transform of a vector or matrix using FFTW? I tried (see code below) to compute the example from wikipedia with the fftw_plan_guru_r2r() function, but I got a segmentation fault with the fftw_execute(). I probably didn't understand how to fill dims and howmany_dims.