RFR: 8310691: [REDO] [vectorapi] Refactor VectorShuffle implementation [v8]
Jatin Bhateja
jbhateja at openjdk.org
Tue Dec 10 08:44:42 UTC 2024
On Tue, 10 Dec 2024 08:17:22 GMT, Quan Anh Mai <qamai at openjdk.org> 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
More information about the core-libs-dev
mailing list