Module tornado.api

Class HalfFloatArray

java.lang.Object
uk.ac.manchester.tornado.api.types.arrays.TornadoNativeArray
uk.ac.manchester.tornado.api.types.arrays.HalfFloatArray

public final class HalfFloatArray extends TornadoNativeArray
HalfFloatArray relies on preview features of the Java platform:
  • HalfFloatArray refers to one or more preview APIs: MemorySegment.
Programs can only use HalfFloatArray when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
This class represents an array of half floats (float16 types) stored in native memory. The half float data is stored in a MemorySegmentPREVIEW, which represents a contiguous region of off-heap memory. The class also encapsulates methods for setting and getting half float values, for initializing the half float array, and for converting the array to and from different representations.