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.

Kipton Barros
  • 21,002
  • 4
  • 67
  • 80
  • 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) –  May 12 '11 at 05:46
  • 1
    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=float – Kipton Barros Jun 27 '11 at 05:37
  • 1
    @Kipton .. you should answer your own question. Link to JNAerator http://code.google.com/p/jnaerator/ – David J. Liszewski Nov 09 '11 at 15:22
  • Have you put this on github yet? I'd be interested in using your scala wrapper. – Angus Forbes Nov 27 '11 at 01:35

1 Answers1

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.

Kipton Barros
  • 21,002
  • 4
  • 67
  • 80