The jdk.incubator.vector javadoc for jdk.incubator.vector.Vector has some stale information.
Under "Implementation Note: Hardware platform dependencies and limitations" there is the following text: > The Vector API is to accelerate computations in style of Single Instruction > Multiple Data (SIMD), using available hardware resources such as vector > hardware registers and vector hardware instructions. The API is designed to > make effective use of multiple SIMD hardware platforms. > > This API will also work correctly even on Java platforms which do not > include specialized hardware support for SIMD computations. The Vector API is > not likely to provide any special performance benefit on such platforms. > > Currently the implementation is optimized to work best on: > > Intel x64 platforms supporting at least AVX2 up to AVX-512. Masking using > mask registers and mask accepting hardware instructions on AVX-512 are not > currently supported. > ARM AArch64 platforms supporting NEON. Although the API has been designed to > ensure ARM SVE instructions can be supported (vector sizes between 128 and > 2048 bits) there is currently no implementation of such instructions and the > general masking capability. > > The implementation currently supports masked lane-wise operations in a > cross-platform manner by composing the unmasked lane-wise operation with > blend as in the expression a.blend(a.lanewise(op, b), m), where a and b are > vectors, op is the vector operation, and m is the mask. > > The implementation does not currently support optimal vectorized > instructions for floating point transcendental functions (such as operators > SIN and LOG). > As I understand it: 1. The AVX-512 support now includes support for masks. 2. The Arm AArch64 platform support now include SVE/SVE2 support and masking (predicate register support). 3. As well as the fall-back for masked lane-wise operations using blend, there is support for masks where the hardware allows. 4. There is now support for transcendental functions thanks to the SVML and SLEEF libraries. Also, "ARM" is styled as "Arm", and "NEON" as "Neon". This should be updated to reflect the implementation as it exists. --------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - 8389755: VectorAPI Vector Javadoc Implementation notes incorrect Changes: https://git.openjdk.org/jdk/pull/32414/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=32414&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8389755 Stats: 19 lines in 1 file changed: 4 ins; 8 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/32414.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/32414/head:pull/32414 PR: https://git.openjdk.org/jdk/pull/32414
