[foreign-memaccess+abi] RFR: 8270376: Finalize API for memory copy [v14]

Paul Sandoz psandoz at openjdk.java.net
Tue Aug 10 20:00:53 UTC 2021


On Tue, 10 Aug 2021 19:17:39 GMT, Radoslaw Smogura <github.com+7535718+rsmogura at openjdk.org> wrote:

> That said, if, one day, we'd like to rewrite those routines in Java, using memory access API + vector API, using an opaque object carrier can definitively be an issue (the vector API also likes to be sharp in its carrier type).

I am not too concerned about this. For memory copying it is important to choose the largest shape (i.e. largest vector register) so we could choose to use Vector<Byte> or Vector<Integer> etc. even when copying arrays of floats or doubles. That is sort of how vectorized mistmatch is implemented. It will become easier to do this when we enhance the Vector API to load/store from segments, which could be backed by primitive arrays or native regions.

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

PR: https://git.openjdk.java.net/panama-foreign/pull/568


More information about the panama-dev mailing list