VectorAPI VectorInsert Intrinsic
Paul Sandoz
paul.sandoz at oracle.com
Mon Jun 4 20:37:57 UTC 2018
Hi Shravya,
I think we need to improve the test, but i may not be aware of certain compiler constraints you wanna ensure apply. Please consider the following as a follow on if you want to commit sooner.
Currently the with index and value are constant. I think we can take the values of the input array and insert then into a vector, which is then stored the resulting array, so the two arrays should be equal. Something like:
$abstractvectortype$<Shapes.S$bits$Bit> av = SPECIES.zero();
for (int i = 0; i < a.length; i+= SPECIES.length()) {
for (int j = 0; j < SPECIES.length(); j++) {
av = av.with(j, a[i + j])
}
av.intoArray(r, i);
}
There can be a similar test for get:
for (int i = 0; i < a.length; i+= SPECIES.length()) {
$abstractvectortype$<Shapes.S$bits$Bit> av = SPECIES.fromArray(a, i);
for (int j = 0; j < SPECIES.length(); j++) {
r[i + j] = av.get(j])
}
}
Paul.
> On Jun 4, 2018, at 11:34 AM, Rukmannagari, Shravya <shravya.rukmannagari at intel.com> wrote:
>
> Hi All,
>
> I would like to contribute a patch for vector insert (with) intrinsic. Could you please review the patch here:
>
> http://cr.openjdk.java.net/~srukmannagar/VectorAPI_vectorInsert/webrev.00/
>
>
>
> Thanks,
> Shravya.
More information about the panama-dev
mailing list