3 ms·
It's possibly worth mentioning that Java is getting a vector API which explicitly abstracts over some of the details of SIMD, including width. You have a type V
by twic 2y ago
It's possibly worth mentioning that Java is getting a vector API which explicitly abstracts over some of the details of SIMD, including width. You have a type Vector<T> which represents enough of some type T to fill a vector register (eg eight 32-bit numbers in a 256-bit register), operations on Vector<T> which produce another Vector<T>, and some way to break arrays up into Vectors of the right size for the platform. The API is a bit clunky, but you write code with it, the compiler performs a miracle, and efficient platform-specific vector code comes out.
https://docs.oracle.com/en/java/javase/23/docs/api/jdk.incubator.vector/jdk/incubator/vector/package-summary.html https://docs.oracle.com/en/java/javase/23/docs/api/jdk.incub...
https://docs.oracle.com/en/java/javase/23/docs/api/jdk.incubator.vector/jdk/incubator/vector/Vector.html https://docs.oracle.com/en/java/javase/23/docs/api/jdk.incub...
- thfuran 2y agoThough it's pretty much incubating forever, or until Valhalla, whichever comes first.