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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With