Cuda in Java via JNI

Is there a guide or a simple example code to demonstrate calling CUDA functions from java via JNI? Any help I can get would be much appreciated. A sample code is preferred.

thanks

Google for JCuda its a package for CUDA in Java.

eyal

I am also very interested in seeing an example or tutorial of using CUDA from jni. I can’t use JCUDA because of the license. It seems like someone would have done this but I have looked almost everywhere with no luck. What I currently have is some basic CUDA code is using OpenGL for display and is basically an image viewer that does a fair amount of image processing on extremely large images (images > than 100GB compressed). I need to change the code to work with JOGL. Does anyone have any suggestions, tips or even a small example of how I might be able to take my CUDA and OpenGL code and replace that with a JOGL window? It seems the JCUDA developer has some integration with JOGL but I don’t believe it is right (Nor do I know if it is right) to look at his source for JCUDA and the source for his example to get an idea of what to do. With all of these intelligent people on this forum surely one of you guys can help. I would really appreciate it. I have been pulling my hair out trying to figure out a solution and it seems that I am not completely alone.

Thanks,

Jim