With the framework rootbeer is GPU programming for Java possible.
Which Java code should be used for rootbeer and which code should better run in the Java VM self?
Or other: which code produce more overhead and it make no sense?
With the framework rootbeer is GPU programming for Java possible.
Which Java code should be used for rootbeer and which code should better run in the Java VM self?
Or other: which code produce more overhead and it make no sense?
It's a bit of a silly thing to say, but the obvious answer would be "for problems at which a GPU is better than a CPU". Modern GPU's have in excess of a thousand cores, but comparatively little memory, so in general, this means stuff that lends itself well to parallelization and doesn't take too much memory.
G. Bach mentioned brute-force attacks against crypto stuff in the comments, that's a good example. Scientific simulations are another good example, in fact, a few years ago a few research institutions (notably NASA) had clusters of Playstation 3's running simulations. Wikipedia's article on GPGPU computing lists several applications of the technology.
In addition to the other answers: There are also some Java-Features that are not supported to translate by rootbeer jet.
You should avoid code with these features used.
Updates for Rootbeer are in production to provide garbage collection and other missing Java features.
To get speedups with GPUs, you want to have lots of computation per data element because data transfer is so slow. You usually want 2 or 3 nested for loops running on the GPU with at least a 1000 threads.
One of the limitations of current GPU is that it can load one simple method to every core and execute it at once. General purpose CPUs can load more code and data and do them independently.
There is vector style code which might be faster on a GPU and I can see it being an option one day, but most code (by volume if not by processing power) will be on CPUs.