[vector] RFR: Gather/scatter cleanups

Halimi, Jean-Philippe jean-philippe.halimi at intel.com
Fri Dec 14 23:32:15 UTC 2018


Changes look great, thanks Vladimir for the effort.
I think the local variables are a good idea as well.

-Jp

-----Original Message-----
From: panama-dev [mailto:panama-dev-bounces at openjdk.java.net] On Behalf Of Yang Zhang (Arm Technology China)
Sent: Friday, December 14, 2018 12:51 AM
To: Vladimir Ivanov <vladimir.x.ivanov at oracle.com>; panama-dev at openjdk.java.net
Subject: RE: [vector] RFR: Gather/scatter cleanups

Hi Vladimir

Recently I also work on jmh build failures. I find here
http://hg.openjdk.java.net/panama/dev/file/0d924a4c4087/test/jdk/jdk/incubator/vector/gen-template.sh#l101
perf_scalar_output is a local variable, but its name conflicts with global variable "perf_scalar_tests.template". How about adding "local" keyword to local variables to avoid name conflict?

Regards
Yang


-----Original Message-----
From: panama-dev <panama-dev-bounces at openjdk.java.net> On Behalf Of Vladimir Ivanov
Sent: Friday, December 14, 2018 10:19 AM
To: panama-dev at openjdk.java.net
Subject: [vector] RFR: Gather/scatter cleanups

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,
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


More information about the panama-dev mailing list