RFR: 8318678: Vector access on heap MemorySegments only works for byte[]

Quan Anh Mai qamai at openjdk.org
Wed Oct 25 16:51:36 UTC 2023


On Wed, 25 Oct 2023 13:08:06 GMT, Per Minborg <pminborg at openjdk.org> wrote:

> This PR proposes removing the restriction that only heap `MemorySegment` wrapping a `byte` array can be accessed by Vectors. Now any array type can be used provided the element alignment constraints are respected.

Vector loads and stores are always unaligned, so I don't see the value in forcing the alignment of accesses.

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

PR Comment: https://git.openjdk.org/jdk/pull/16360#issuecomment-1779674689


More information about the core-libs-dev mailing list