Recent FFTW wrapper in Java
Asked Answered
M

1

14

I'm seeking a minimal Java wrapper for a recent version of FFTW. The wrappers listed on the FFTW website are either out of date (jfftw-1.2.zip) or contain too much extra stuff (Shared Scientific Toolbox). A Google search suggests JFFTW3, which looks promising, but the download link is broken (does anybody have a mirror?)

For those who want a pure Java FFT library, JTransforms looks very good. I'd prefer to use FFTW because it's about twice as fast, and it handles arbitrary dimensions d > 3.

Mummer answered 25/4, 2011 at 4:14 Comment(4)
isn't the wrapper just a JNI of each function on the FFTW libary? if so it shouldn't be too hard to patch up the connections to the functions you need. if not, good luck! (i've had little success getting Java wrappers for things lately)Grapefruit
I ended up using JNAerator to automatically generate JNA bindings based on fftw3.h. I also made a Scala wrapper for a cleaner interface. When I get the chance, I will put this on Github. Leave a message if you want it sooner :-) Here's the exact command I used to generate the bindings: java -jar jnaerator-0.9.7.jar -library FFTW3 /usr/local/include/fftw3.h -o . -v -noJar -noComp -noPrimitiveArrays -noMangling -structsInLibrary -runtime JNA -sizeAsLong -Dfftw_complex=double -Dfftwf_complex=floatMummer
@Kipton .. you should answer your own question. Link to JNAerator code.google.com/p/jnaeratorNarrows
Have you put this on github yet? I'd be interested in using your scala wrapper.Vive
M
10

I ended up using JNAerator to automatically generate JNA bindings from the header file fftw3.h. The result is available as a gist on Github. The gist (at the bottom) also includes a convenient Scala interface for real transforms of arbitrary dimension.

Mummer answered 4/12, 2011 at 0:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.