[vector] CharVector and unsigned bytes
John Rose
john.r.rose at oracle.com
Sat Dec 7 01:29:34 UTC 2019
On Dec 6, 2019, at 11:38 AM, Richard Startin <richard at openkappa.co.uk> wrote:
>
> I see that there is no CharVector type - is there a plan for something like this or has it been ruled out, where the elements would behave like a Java char, except that operations would wrap rather than promote?
>
> char is Java's only unsigned type, but there are many useful unsigned vector operations operating on 8 bit elements - might these be beyond the scope of the API because there is no such thing as an unsigned byte?
Some of the need for unsigned types can be replaced by specific operations
which perform zero filling on the left instead of sign filling.
Several such operations are in VectorOperations, including
LSHR and ZERO_EXTEND_S2I. What specifically are you missing
in order to use ShortVector as a substitute for CharVector?
Comparisons? Table lookup? Division?
— John
More information about the panama-dev
mailing list