[vector] RFR: Gather/scatter cleanups

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Fri Dec 14 02:19:13 UTC 2018


http://cr.openjdk.java.net/~vlivanov/panama/vector/gather/webrev.00

Some minor cleanups in gather/scatter implementation, tests, and benchmarks.

I added explicit index vector types for VectorIntrinsics [1], but it has 
interesting consequences for Max shapes: there's no way to reference 
proper shape in some cases (when index vector width is half of Max).

Left Max cases as is for now [2], but IMO it demonstrates a weakness of 
Max shapes as they are now: no way to statically reference dependent 
shapes of different width.

Best regards,
Vladimir Ivanov

[1]
src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Double128Vector.java:
-        VectorIntrinsics.storeWithMap(Double128Vector.class, 
double.class, LENGTH,
-                               a, Unsafe.ARRAY_DOUBLE_BASE_OFFSET, 
vecInd, vecInd.getClass(),
+        VectorIntrinsics.storeWithMap(Double128Vector.class, 
double.class, LENGTH, Int64Vector.class,
+                               a, Unsafe.ARRAY_DOUBLE_BASE_OFFSET, vix,

[2]
-        VectorIntrinsics.storeWithMap(DoubleMaxVector.class, 
double.class, LENGTH,
-                               a, Unsafe.ARRAY_DOUBLE_BASE_OFFSET, 
vecInd, vecInd.getClass(),
+        VectorIntrinsics.storeWithMap(DoubleMaxVector.class, 
double.class, LENGTH, vix.getClass(),
+                               a, Unsafe.ARRAY_DOUBLE_BASE_OFFSET, vix,


More information about the panama-dev mailing list