On Fri, 26 Feb 2021 13:55:15 GMT, Vladimir Ivanov <vliva...@openjdk.org> wrote:

> IMO the fix should be in 
> `src/jdk.incubator.vector/share/classes/jdk/incubator/vector/VectorShape.java`.
> 
> JVM does the right job when it signals vector support is absent (by returning 
> `-1`).
> 
> `jdk.incubator.vector` implementation should take that into account and 
> choose a preferred shape for pure Java execution mode.

Hi @iwanowww ,

Thanks for your review.

>From the view of C2 compiler, you are right.

But the Java programmer may be confused if we got something like 
DoubleVector.SPECIES_PREFERRED.length() > 
VectorSupport.getMaxLaneCount(double.class).
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.

What do you think?
Thanks.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2722

Reply via email to