[vector] Intrinsics for fromByteArray, fromByteBuffer, intoByteArray, intoByteBuffer

Lupusoru, Razvan A razvan.a.lupusoru at intel.com
Fri May 4 18:54:34 UTC 2018


Paul and John,

I just merged the patch with the following changes which stemmed from your discussion:

-          No longer allow writing to a read only buffer

-          No longer intrinsify if bytebuffer endianness does not match native order

o   There is no silent conversion taking place.

Thanks for your reviews in finding the various issues. I agree that a worthy improvement would be to allow writing to buffers that do not have backing array by using the Unsafe mechanism you recommended.

Thanks!

--Razvan

From: Paul Sandoz [mailto:paul.sandoz at oracle.com]
Sent: Thursday, May 03, 2018 8:52 AM
To: John Rose <john.r.rose at oracle.com>
Cc: Lupusoru, Razvan A <razvan.a.lupusoru at intel.com>; panama-dev at openjdk.java.net
Subject: Re: [vector] Intrinsics for fromByteArray, fromByteBuffer, intoByteArray, intoByteBuffer




On May 3, 2018, at 8:48 AM, John Rose <john.r.rose at oracle.com<mailto:john.r.rose at oracle.com>> wrote:

On May 3, 2018, at 8:40 AM, Paul Sandoz <paul.sandoz at oracle.com<mailto:paul.sandoz at oracle.com>> wrote:

stick to native endianness for the moment to keep things simpler initially

I suggest throwing an exception if the buffer is in the wrong endianness.
We have regretted silently converting to native on other occasions.

A good point, it will remind us to fix it and revisit the specification. I will add placeholder in the load/store tests.

Paul.


More information about the panama-dev mailing list