On Tue, 10 Dec 2024 08:17:22 GMT, Quan Anh Mai <[email protected]> wrote:
>> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Double128Vector.java
>> line 859:
>>
>>> 857: .reinterpretAsInts()
>>> 858: .intoArray(a, offset);
>>> 859: default -> {
>>
>> These cases for length() = 4, 8, and 16 looks redundant for 128-bit
>> DeoubleVector.
>
> You are right, but this switch is needed for `DoubleMaxVector`, and using it
> for the other species simplifies the template. The compiler will eliminate
> all wrong cases so there should be no runtime concern.
I see, so you want to avoid special handling in template files at the expense
of redundant Java code.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21042#discussion_r1877599127