[vector] RFR 8221816: IndexOutOfBoundsException for fromArray/intoArray with unset mask lanes - was: RE: IndexOutOfBoundsException with unset mask lanes

John Rose john.r.rose at oracle.com
Sat Jun 1 03:17:40 UTC 2019


On May 31, 2019, at 3:13 PM, Vladimir Ivanov <vladimir.x.ivanov at oracle.com> wrote:
> 
> Also, it seems beneficial to migrate away from getElements() & array accessors to XxxVector.get() since it is already intrinsified.

I was wondering about this!  Taking advantage of it would
require lots of Java code changes, and the array-based
formalism is pretty nice.  Could the JIT be trained to
deliver a vector base array as a multiple value packet
without committing it to memory, just long enough to
loop over it?  Seems to me the virtual array would be
not too different from just another view on the same
vector.

> (XxxVector.with() looks attractive as well, but it may cause too much churn if used in default implementation. So should be used with caution.)

Yes, that's not so nice…  But as long as the transition is
mainly from vector computation to scalar computation
at the end of a loop, maybe it's OK that there's no
quick way to load stuff back into the VPU, except
via a load from a real Java array.

— John


More information about the panama-dev mailing list