0

I'm working on an Open Source Java imaging system. Most of the heavy lifting and number crunching is done by OpenCL via JavaCL. However, I need to do batch FFTs which doesn't seem to fit the built in JavaCL FFT algorithm.

Can anyone offer advice on:

  • OpenCL FFT library for Java
  • Advice on whether JNA or JNI would be better choice to implement a C++ OpenCL FFT library (most likely clAmdFFT).
Austin
  • 1,018
  • 9
  • 20

1 Answers1

0

However, I need to do batch FFTs which doesn't seem to fit the built in JavaCL FFT algorithm.

What is wrong with JavaCL FFT? Does OpenCL support what you want to do and JavaCL does not? If so, work on getting that functionality into JavaCL. If not, use a different native implementation for your FFT's.

Advice on whether JNA or JNI would be better choice to implement a C++ OpenCL FFT library

First, JNI will perform better than JNA. How much better will depend on the amount and type of data you are working with and how many native function calls you are making. JNA also requires that you stub out all required methods in Java which may require a lot of work depending on the library. I would start by implementing a small function in JNA and see if the performance is adequate and then determine if JNI would be worth it.

There is some more indepth information about JNA here: Use JNI instead of JNA to call native code?

Community
  • 1
  • 1
Alex Barker
  • 4,316
  • 4
  • 28
  • 47