Aparapi Java Vectorization
Java is still at the early stages of supporting SIMD instructions. The only documentation claiming Java supports SIMD instructions is in bug reports, and in practice the Hotspot JIT compiler never vectorized anything beyond a simple test program with a single sequential loop containing an array addition. Anytime threads were involved or the loop became more complicated the Hotspot JIT compiled to non SIMD instructions. Because of this, a special vector library is needed in order to enable SIMD operations in Java. Below you will find a link to a C++ vector library accessible to Java through JNI function calls as well as 10 Aparapi benchmarks comparing the performance of running Aparapi Java in the Java thread pool, with the vector library implemented, in a reduced looped kernel implementation, as well as on the GPU. README files with instructions on how to compile and run the benchmarks are included as well.
- Curt Albert, Alastair Murray and Binoy Ravindran, "Applying Source Level Auto-Vectorization to Aparapi Java". International Conference on Principles and Practices of Programming on Java Platform: Virtual Machines, Programming Languages, and Tools (PPPJ '14), September 2014, Cracow, Poland
- Curt Albert, "Applying Source Level Auto-Vectorization to Aparapi Java", May 2014
Binoy Ravindran, Virginia Tech: This email address is being protected from spambots. You need JavaScript enabled to view it.
This is an open-source project of the Systems Software Research Group at Virginia Tech.
This work was supported in part by ONR under grant N00014-12-1-0880. Any opinions, findings, and conclusions or recommendations expressed in this site are those of the author(s) and do not necessarily reflect the views of ONR.