public class Bfloat16BufferIndexer extends Bfloat16Indexer
ShortBuffer, treated as bfloat16.| Modifier and Type | Field and Description |
|---|---|
protected ShortBuffer |
buffer
The backing buffer.
|
VALUE_BYTESindexable, ONE_STRIDE, sizes, strides| Constructor and Description |
|---|
Bfloat16BufferIndexer(ShortBuffer buffer)
Calls
Bfloat16BufferIndexer(buffer, { buffer.limit() }, { 1 }). |
Bfloat16BufferIndexer(ShortBuffer buffer,
long[] sizes,
long[] strides)
|
| Modifier and Type | Method and Description |
|---|---|
Buffer |
buffer()
Returns the backing buffer, or
null if none |
float |
get(long... indices)
Returns
array/buffer[index(indices)] |
float |
get(long i)
Returns
array/buffer[i] |
Bfloat16Indexer |
get(long[] indices,
float[] h,
int offset,
int length)
Returns
this where s[offset:offset + length] = array/buffer[index(indices)] |
Bfloat16Indexer |
get(long i,
float[] h,
int offset,
int length)
Returns
this where s[offset:offset + length] = array/buffer[i] |
float |
get(long i,
long j)
Returns
array/buffer[i * strides[0] + j] |
Bfloat16Indexer |
get(long i,
long j,
float[] h,
int offset,
int length)
Returns
this where s[offset:offset + length] = array/buffer[i * strides[0] + j] |
float |
get(long i,
long j,
long k)
Returns
array/buffer[i * strides[0] + j * strides[1] + k] |
Bfloat16Indexer |
put(long[] indices,
float h)
Returns
this where array/buffer[index(indices)] = s |
Bfloat16Indexer |
put(long[] indices,
float[] h,
int offset,
int length)
Returns
this where array/buffer[index(indices)] = s[offset:offset + length] |
Bfloat16Indexer |
put(long i,
float h)
Returns
this where array/buffer[i] = s |
Bfloat16Indexer |
put(long i,
float[] h,
int offset,
int length)
Returns
this where array/buffer[i] = s[offset:offset + length] |
Bfloat16Indexer |
put(long i,
long j,
float h)
Returns
this where array/buffer[i * strides[0] + j] = s |
Bfloat16Indexer |
put(long i,
long j,
float[] h,
int offset,
int length)
Returns
this where array/buffer[i * strides[0] + j] = s[offset:offset + length] |
Bfloat16Indexer |
put(long i,
long j,
long k,
float h)
Returns
this where array/buffer[i * strides[0] + j * strides[1] + k] = s |
void |
release()
Makes sure changes are reflected onto the backing memory and clears any references.
|
create, create, create, create, create, create, create, fromFloat, get, get, get, getDouble, put, put, put, putDouble, toFloatprotected ShortBuffer buffer
public Bfloat16BufferIndexer(ShortBuffer buffer)
Bfloat16BufferIndexer(buffer, { buffer.limit() }, { 1 }).public Bfloat16BufferIndexer(ShortBuffer buffer, long[] sizes, long[] strides)
public Buffer buffer()
Indexernull if nonepublic float get(long i)
Bfloat16Indexerarray/buffer[i]get in class Bfloat16Indexerpublic Bfloat16Indexer get(long i, float[] h, int offset, int length)
Bfloat16Indexerthis where s[offset:offset + length] = array/buffer[i]get in class Bfloat16Indexerpublic float get(long i,
long j)
Bfloat16Indexerarray/buffer[i * strides[0] + j]get in class Bfloat16Indexerpublic Bfloat16Indexer get(long i, long j, float[] h, int offset, int length)
Bfloat16Indexerthis where s[offset:offset + length] = array/buffer[i * strides[0] + j]get in class Bfloat16Indexerpublic float get(long i,
long j,
long k)
Bfloat16Indexerarray/buffer[i * strides[0] + j * strides[1] + k]get in class Bfloat16Indexerpublic float get(long... indices)
Bfloat16Indexerarray/buffer[index(indices)]get in class Bfloat16Indexerpublic Bfloat16Indexer get(long[] indices, float[] h, int offset, int length)
Bfloat16Indexerthis where s[offset:offset + length] = array/buffer[index(indices)]get in class Bfloat16Indexerpublic Bfloat16Indexer put(long i, float h)
Bfloat16Indexerthis where array/buffer[i] = sput in class Bfloat16Indexerpublic Bfloat16Indexer put(long i, float[] h, int offset, int length)
Bfloat16Indexerthis where array/buffer[i] = s[offset:offset + length]put in class Bfloat16Indexerpublic Bfloat16Indexer put(long i, long j, float h)
Bfloat16Indexerthis where array/buffer[i * strides[0] + j] = sput in class Bfloat16Indexerpublic Bfloat16Indexer put(long i, long j, float[] h, int offset, int length)
Bfloat16Indexerthis where array/buffer[i * strides[0] + j] = s[offset:offset + length]put in class Bfloat16Indexerpublic Bfloat16Indexer put(long i, long j, long k, float h)
Bfloat16Indexerthis where array/buffer[i * strides[0] + j * strides[1] + k] = sput in class Bfloat16Indexerpublic Bfloat16Indexer put(long[] indices, float h)
Bfloat16Indexerthis where array/buffer[index(indices)] = sput in class Bfloat16Indexerpublic Bfloat16Indexer put(long[] indices, float[] h, int offset, int length)
Bfloat16Indexerthis where array/buffer[index(indices)] = s[offset:offset + length]put in class Bfloat16IndexerCopyright © 2019. All rights reserved.