[vector] Partial intrinsification support for with and get

Paul Sandoz paul.sandoz at oracle.com
Fri May 18 22:18:53 UTC 2018



> On May 18, 2018, at 1:38 PM, Lupusoru, Razvan A <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