public final class Bfloat16Layout extends Object implements FloatDataLayout<ShortDataBuffer>
| Constructor and Description |
|---|
Bfloat16Layout() |
| Modifier and Type | Method and Description |
|---|---|
float |
readFloat(ShortDataBuffer buffer,
long index)
Reads
n = scale() values from the buffer at the given index and return them as a float. |
void |
writeFloat(ShortDataBuffer buffer,
float value,
long index)
Writes a float into the buffer at the given index after converting it to the buffer type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplyTo, readObject, writeObjectscalepublic void writeFloat(ShortDataBuffer buffer, float value, long index)
FloatDataLayoutwriteFloat in interface FloatDataLayout<ShortDataBuffer>buffer - the buffer to write tovalue - the float to convert and writeindex - index in the buffer where the converted value should be writtenFloatDataLayout.writeObject(DataBuffer, Float, long)public float readFloat(ShortDataBuffer buffer, long index)
FloatDataLayoutn = scale() values from the buffer at the given index and return them as a float.readFloat in interface FloatDataLayout<ShortDataBuffer>buffer - the buffer to read fromindex - position of the buffer to read in the bufferFloatDataLayout.readObject(DataBuffer, long)Copyright © 2015–2020. All rights reserved.