On Wed, 23 Jun 2021 19:10:41 GMT, Paul Sandoz <psan...@openjdk.org> wrote:
> The Foreign Memory API supports viewing a `MemorySegment` as a `ByteBuffer`, > an instance of which can then be passed to the vector load/store access > methods. > > Such `ByteBuffer` access requires accesses are scoped (a method annotated > with `ScopedMemoryAccess.Scoped`) and the `ByteBuffer`'s scope (instance of > `ScopedMemoryAccess.Scope`) checked for validity. Thereby ensuring > exceptional failure if the underlying segment is shared and is closed. > > All Vector tests pass on linux-x64, linux-aarch64, macosx-x64, and > windows-x64. Changes look good - thanks for taking the time to centralize the various vector operations inside ScopedMemoryAccess. ------------- Marked as reviewed by mcimadamore (Reviewer). PR: https://git.openjdk.java.net/jdk17/pull/129