[vectorIntrinsics] RFR: Load/store short vectors from/to char[]

Ludovic Henry luhenry at openjdk.java.net
Mon Nov 16 21:40:10 UTC 2020


On Mon, 16 Nov 2020 17:35:36 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

> Methods to load/store a `ShortVector` from/to `char[]`. These methods may be useful for encoding/decoding characters.
> 
> Unclear if aliasing of `char[]` and `short[]` causes issues for the intrinsic or for Hotspot code gen.
> 
> Testing-wise, it was easier to explicitly clone and reify the relevant tests rather than trying to generalize the template and its template arguments to distinguish between the vector type and the array type.

Hey @PaulSandoz, thank you for doing that! It works for https://gist.github.com/luhenry/dc84c661997d5bc1cd51c2088d234727 so far. However, as I'm looking at expanding for CharBuffer as well, I'm seeing that there is a `fromByteBuffer`/`intoByteBuffer` method, but not a `fromCharBuffer`/`intoCharBuffer`.

-------------

PR: https://git.openjdk.java.net/panama-vector/pull/22


More information about the panama-dev mailing list