Uses of Class
jdk.incubator.foreign.ValueLayout.OfFloat
Package
Description
Classes to support low-level and efficient foreign memory/function access, directly from Java.
-
Uses of ValueLayout.OfFloat in jdk.incubator.foreign
Modifier and TypeFieldDescriptionstatic final ValueLayout.OfFloat
ValueLayout.JAVA_FLOAT
A value layout constant whose size is the same as that of a Javafloat
, bit alignment set to 8, and byte order set toByteOrder.nativeOrder()
.Modifier and TypeMethodDescriptiondefault MemorySegment
SegmentAllocator.allocate
(ValueLayout.OfFloat layout, float value) Allocate a memory segment with given layout and initialize it with given float value.default MemorySegment
SegmentAllocator.allocateArray
(ValueLayout.OfFloat elementLayout, float[] array) Allocate a memory segment with given layout and initialize it with given float array.float
MemoryAddress.get
(ValueLayout.OfFloat layout, long offset) Reads a float from this address and offset with given layout.default float
MemorySegment.get
(ValueLayout.OfFloat layout, long offset) Reads a float from this segment and offset with given layout.float
MemoryAddress.getAtIndex
(ValueLayout.OfFloat layout, long index) Reads a float from this address and index, scaled by given layout size.default float
MemorySegment.getAtIndex
(ValueLayout.OfFloat layout, long index) Reads a float from this segment and index, scaled by given layout size.void
MemoryAddress.set
(ValueLayout.OfFloat layout, long offset, float value) Writes a float to this address instance and offset with given layout.default void
MemorySegment.set
(ValueLayout.OfFloat layout, long offset, float value) Writes a float to this segment and offset with given layout.void
MemoryAddress.setAtIndex
(ValueLayout.OfFloat layout, long index, float value) Writes a float to this address instance and index, scaled by given layout size.default void
MemorySegment.setAtIndex
(ValueLayout.OfFloat layout, long index, float value) Writes a float to this segment and index, scaled by given layout size.float[]
MemorySegment.toArray
(ValueLayout.OfFloat elementLayout) Copy the contents of this memory segment into a fresh float array.