How to use the Intel AVX in Java?

前端 未结 5 917
不思量自难忘°
不思量自难忘° 2021-02-19 07:51

How do I use the Intel AVX vector instruction set from Java? It\'s a simple question but the answer seems to be hard to find.

5条回答
  •  无人共我
    2021-02-19 08:12

    One option is to use Aparapi and install the Intel OpenCL driver. (Your code will be vectorized to work on both CPUs and GPUs, as long as an appropriate OpenCL driver is installed.)

    Another option is to use JNI and call a C++ function that uses AVX intrinsics or was auto-vectorized by a compiler.

提交回复
热议问题