-
Bug
-
Resolution: Fixed
-
P3
-
19, 20, 21, 22
-
b23
-
Verified
Vector access of `MemorySegment`s was added in JDK 19. For heap segments access was restricted to `byte[]`. This was a conservative approach, aligning with that of ByteBuffer support.
As a result it is not possible to uniformly use memory segments for vector access, wrapping say a `float[]` in a segment, then accessing using `Vector<Float>`.
The FFM API allows for more general access to heap segments for any primitive array type if the value layout is appropriately unaligned.
We can update the specification and implementation of the vector access of memory segments methods to operate on any heap array for any given species. The species + byte order is a proxy for an unaligned value layout of the species element type with that byte order.
As a result it is not possible to uniformly use memory segments for vector access, wrapping say a `float[]` in a segment, then accessing using `Vector<Float>`.
The FFM API allows for more general access to heap segments for any primitive array type if the value layout is appropriately unaligned.
We can update the specification and implementation of the vector access of memory segments methods to operate on any heap array for any given species. The species + byte order is a proxy for an unaligned value layout of the species element type with that byte order.
- blocks
-
JDK-8319111 Mismatched MemorySegment heap access is not consistently intrinsified
- Resolved
- csr for
-
JDK-8318956 Vector access on heap MemorySegments only works for byte[]
- Closed
- relates to
-
JDK-8319613 Complier error in benchmark TestLoadSegmentVarious
- Resolved
(1 links to)