Java Enable Preview: Vector API
summary
Vector API runs SIMD on mainstream CPUs (x86 AVX, ARM NEON) via the incubating preview and requires the C2 compiler; demos load arrays in float species size 4 (128-bit) chunks so one CPU clock performs four lane operations, masking fixes the leftover two elements (mask true/false and mask true count), and cross‑lane ops use shuffle/compress/reduce. The presenter implements add/multiply/blend/reduce and a working linear regression with vector API, showing correct results on arrays.
AI-written summary · about
chapters (18)
- 0:00Introduction to Vector API
- 1:25What is Vector API
- 5:43SIMD capabilities in modern CPUs
- 6:24Use cases for Vector API
- 9:36Parallel vs concurrent processing
- 11:43Project Valhalla and Vector API
- 12:47Understanding species in Vector API
- 15:15Vector lanes and components
- 19:51Adding vectors with Vector API
- 26:37Handling non-divisible array sizes
- 29:34Introducing vector masking
- 34:30Implementing masking in code
- 40:30Lanewise vs cross-lane operations
- 42:57Cross-lane operations with compare
- 48:27Reduce vector operations
- 51:38Shuffle vector operations
- 52:19Machine learning with Vector API
- 56:16Summary and Q&A
related talks
44mVector API for Java
44mHotspot JVM Auto Vectorization and Vector API
01h 02mVectors and the Numerics on the JVM
43mJava Vector API
48mSIMD Parallel Programming with the Vector API
56mUsing vectors in Java [...]
12m#BuildPropulsionLab at #DevoxxUK: @jbaruch with @speakjava
43mHow to make your electrons do more in Java?
