[vector] Partial intrinsification support for with and get

Lupusoru, Razvan A razvan.a.lupusoru at intel.com
Mon May 21 20:38:52 UTC 2018


Thanks for your feedback. Yes, I have update dit to no longer access vec directly and use getElements since it is the documented approach.

I have also made another change related to index - now IllegalArgumentException is thrown if index is invalid. I updated documentation to reflect this as well.
http://cr.openjdk.java.net/~rlupusoru/panama/webrev_getwith_02/index.html

The tests are not part of this patch but instead will be part of subsequent patch from Shravya.

Thanks,
Razvan

From: Paul Sandoz [mailto:paul.sandoz at oracle.com]
Sent: Friday, May 18, 2018 3:19 PM
To: Lupusoru, Razvan A <razvan.a.lupusoru at intel.com>
Cc: panama-dev at openjdk.java.net
Subject: Re: [vector] Partial intrinsification support for with and get




On May 18, 2018, at 1:38 PM, Lupusoru, Razvan A <razvan.a.lupusoru at intel.com<mailto:razvan.a.lupusoru at intel.com>> wrote:

Hello,

I'd like to contribute the infrastructure to be able to intrinsify 'with' (insert) and 'get' (extract). The actual implementation with x86 instructions is coming in a follow up patch from my teammates.
http://cr.openjdk.java.net/~rlupusoru/panama/webrev_getwith_01/index.html

One change I will need to make is make the base class methods as abstract to match Paul's recent changes. I will make sure to do that before merging. In meantime, please take a look to see if you identify any other issues.

Ok.

1114     public $vectortype$ with(int i, $type$ e) {

1115         return VectorIntrinsics.insert(

1116                                 $vectortype$.class, $type$.class, LENGTH,

1117                                 this, i, (long)e,

1118                                 (v, ix, bits) -> {

1119                                     $type$[] res = v.vec.clone();

1120                                     res[ix] = ($type$)bits;

1121                                     return new $vectortype$(res);

1122                                 });
Should you do v.getElements().clone() ? perhaps it does not matter in this case...

Paul.


More information about the panama-dev mailing list