RFR: 8262096: Vector API fails to work due to VectorShape initialization exception [v4]
Jie Fu
jiefu at openjdk.java.net
Sat Feb 27 03:26:41 UTC 2021
On Fri, 26 Feb 2021 15:48:18 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
> > I'd like to keep DoubleVector.SPECIES_PREFERRED.length() <= VectorSupport.getMaxLaneCount(double.class) for Java programmers since the VectorSupport_GetMaxLaneCount is used to implement a Java API.
>
> It doesn't make much sense to me. `VectorSupport` is an internal API for `jdk.incubator.vector` to consume.
> It's `jdk.incubator.vector` job to interpret the result and adapt accordingly.
Okay, I'm fine to fix it in jdk/incubator/vector/VectorShape.java if we don't keep something like that.
For the updated fix, the {max/preferred} shape will be initialized as shape-64-bit if hotspot doesn't support vectorization.
Testing:
- jdk/incubator/vector with MaxVectorSize=default/8/4 on Linux/x64
- jdk/incubator/vector without C2 on Linux/x64
Any comments?
Thanks.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2722
More information about the core-libs-dev
mailing list