Skip to content

8389755: VectorAPI Vector Javadoc Implementation notes incorrect - #32414

Open
stooart-mon wants to merge 1 commit into
openjdk:masterfrom
stooart-mon:JDK-8389755
Open

8389755: VectorAPI Vector Javadoc Implementation notes incorrect#32414
stooart-mon wants to merge 1 commit into
openjdk:masterfrom
stooart-mon:JDK-8389755

Conversation

@stooart-mon

@stooart-mon stooart-mon commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

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.



Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Error

 ⚠️ Pull request body is missing required line: - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).

Issue

  • JDK-8389755: VectorAPI Vector Javadoc Implementation notes incorrect (Bug - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/32414/head:pull/32414
$ git checkout pull/32414

Update a local copy of the PR:
$ git checkout pull/32414
$ git pull https://git.openjdk.org/jdk.git pull/32414/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 32414

View PR using the GUI difftool:
$ git pr show -t 32414

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/32414.diff

The jdk.incubator.vector javadoc for jdk.incubator.vector.Vector has
some stale information.
@bridgekeeper

bridgekeeper Bot commented Aug 18, 2026

Copy link
Copy Markdown

👋 Welcome back smonteith! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk

openjdk Bot commented Aug 18, 2026

Copy link
Copy Markdown

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk Bot added the core-libs core-libs-dev@openjdk.org label Aug 18, 2026
@openjdk

openjdk Bot commented Aug 18, 2026

Copy link
Copy Markdown

@stooart-mon The following label will be automatically applied to this pull request:

  • core-libs

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@@ -1886,27 +1886,23 @@
* <ul>
*
* <li> Intel x64 platforms supporting at least AVX2 up to AVX-512.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AVX-10 is also supported isn't it? Or some of it anyway ? Sorry if this imprecise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core-libs core-libs-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

2 participants