-
Notifications
You must be signed in to change notification settings - Fork 731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FFTW preset, how to define fftw_iodim for guru interface? #466
Comments
It's just a simple struct:
http://www.fftw.org/fftw3_doc/Guru-vector-and-transform-sizes.html
Call "array = new fftw_iodim(n)" and "array.position(i)" instead of "fftw_iodim
array[n]" and "array[i]", and that's pretty much it. What doesn't work when
doing that?
|
Thanks for the quick answer. <groupId>org.bytedeco.javacpp-presets</groupId>
<artifactId>fftw-platform</artifactId>
<version>3.3.5-1.3</version> There seems to be no such constructor Also, suppose I would not use the |
Alright I figured it out, I guess. It seems like you have to use the static void execSplit2D(int width, int height, double[] inR, double[] outR, double[] outI){
try(
fftw_iodim_do_not_use_me d0 = new fftw_iodim_do_not_use_me();
fftw_iodim_do_not_use_me d1 = new fftw_iodim_do_not_use_me();
fftw_iodim_do_not_use_me d2 = new fftw_iodim_do_not_use_me();
fftw_iodim_do_not_use_me array = new fftw_iodim_do_not_use_me(3);
fftw_iodim dims = new fftw_iodim(array);
){
d0.n(width).is(1).os(1);
d1.n(height).is(width).os(width);
d2.n(1).is(width*height).os(width*height);
array.position(0).put(d0).position(1).put(d1).position(2).put(d2);
fftw_plan plan = fftw3.fftw_plan_guru_split_dft_r2c(
3, dims,
0, null,
inR, outR, outI,
(int)fftw3.FFTW_ESTIMATE);
fftw3.fftw_execute_split_dft_r2c(plan, inR, outR, outI);
}
} |
I see, the definition of fftw_iodim is missing. We'll need to locate it and add it. |
Fixed in the commit above! Thanks for reporting. |
Hey, so I' trying to figure out on how to create the iodims parameter for the guru interface planner method:
This is the oficial fftw documentation on this method: http://www.fftw.org/fftw3_doc/Guru-Real_002ddata-DFTs.html#Guru-Real_002ddata-DFTs
So in cpp the dims argument could be generated like so:
In java however I cannot figure out on how to create the ioDims array due to the crazy pointering.
I've been trying the following (used do_not_use_me because its the only iodim class that lets me set its parameters in an easy way):
but this gives me
fftw: alloc.c:269: assertion failed: p
How am I supposed to do this correctly?
The text was updated successfully, but these errors were encountered: