views:

175

answers:

4

I'm looking for some way of using the number-crunching ability of a GPU (with Java perhaps?) in addition to using the multiple cores that the target machine has. I will be working on implementing (at present) the A* Algorithm but in the future I hope to replace it with a Genetic Algorithm of sorts. I've looked at Project Fortress but as I'm building my GUI in JavaFX, I'd prefer not to stray too far from a JVM.

Of course, should no feasible solution be available, I will migrate to the easiest solution to implement.

+4  A: 

If you're interested in HPC with GPUs then perhaps you can look jCuda. This provides Java bindings for CUDA, along with access to CUDA FFT, CUDA BLAS and CUDA DPP. I haven't seen any performance reports on this library so I can't guarantee it will be very good.

Beyond that, I'm not really sure. If you're interested in doing this type of stuff as an educational exercise then Java should be good enough, but if you have a serious need for HPC then you're probably going to want to implement in C and use the Java Native Interface to communicate with it.

Il-Bhima
Cheers! I'll take a look at the link ASAP.
Insectatorious
+4  A: 

Morten Nobel Joergensen has a blog post showing how to create a Mandelbrot Set using JOGL - Java Bindings for OpenGL

However if you want generic computing, rather than graphics, then you'd be after the Java bindings for OpenCL, from which you can chose from JOCL, or JOCL or JavaCL.

Wikipedia's page shows how OpenCL can be used to compute a fast fourier transform.

Stephen Denne
Sweet. In this example he is rendering a 3D image as 2D using a camera with no perspective. Would it be possible to achive raw processing 'umph!' using JOGL then? I ask because I have never used OpenGL before and I don't want to take the plunge unless it will serve my needs.
Insectatorious
Would you have any recommendations on which OpenCL binding to use?
Thorbjørn Ravn Andersen
@Insectatorious - No, so I updated my answer to be more useful.
Stephen Denne
@Thorbjørn - No, I've only recently started looking at them myself
Stephen Denne
@Stephen Denne - Much appreciated.
Insectatorious
+2  A: 

Parallel Colt might be of interest.

Mark
Does it take implicit parallelism? I'm reading the concurrency section but there doesn't seem to be anything about hardware specific advantages.
Insectatorious
The web page suggests that it will automatically make use of multiple CPU cores where possible. I have not used this version of Colt myself only the original library on which this is based.
Mark
+1  A: 

Have a look at JPPF, it is a very nice and mature open source Java grid computing environment

John Channing