public class Bfloat16ArrayIndexer extends Bfloat16Indexer
short[] array, treated as bfloat16.Indexer.Index| Modifier and Type | Field and Description |
|---|---|
protected short[] |
array
The backing array.
|
VALUE_BYTES| Constructor and Description |
|---|
Bfloat16ArrayIndexer(short[] array)
Calls
Bfloat16ArrayIndexer(array, { array.length }, { 1 }). |
Bfloat16ArrayIndexer(short[] array,
long... sizes)
Calls
Bfloat16ArrayIndexer(array, sizes, strides(sizes)). |
Bfloat16ArrayIndexer(short[] array,
long[] sizes,
long[] strides)
|
| Modifier and Type | Method and Description |
|---|---|
short[] |
array()
Returns the backing array, or
null if none |
float |
get(long... indices)
Returns
array/buffer[index(indices)] |
float |
get(long i)
Returns
array/buffer[index(i)] |
Bfloat16Indexer |
get(long[] indices,
float[] h,
int offset,
int length)
Returns
this where h[offset:offset + length] = array/buffer[index(indices)] |
Bfloat16Indexer |
get(long i,
float[] h,
int offset,
int length)
Returns
this where h[offset:offset + length] = array/buffer[index(i)] |
float |
get(long i,
long j)
Returns
array/buffer[index(i, j)] |
Bfloat16Indexer |
get(long i,
long j,
float[] h,
int offset,
int length)
Returns
this where h[offset:offset + length] = array/buffer[index(i, j)] |
float |
get(long i,
long j,
long k)
Returns
array/buffer[index(i, j, k)] |
Bfloat16Indexer |
put(long[] indices,
float h)
Returns
this where array/buffer[index(indices)] = h |
Bfloat16Indexer |
put(long[] indices,
float[] h,
int offset,
int length)
Returns
this where array/buffer[index(indices)] = h[offset:offset + length] |
Bfloat16Indexer |
put(long i,
float h)
Returns
this where array/buffer[index(i)] = h |
Bfloat16Indexer |
put(long i,
float[] h,
int offset,
int length)
Returns
this where array/buffer[index(i)] = h[offset:offset + length] |
Bfloat16Indexer |
put(long i,
long j,
float h)
Returns
this where array/buffer[index(i, j)] = h |
Bfloat16Indexer |
put(long i,
long j,
float[] h,
int offset,
int length)
Returns
this where array/buffer[index(i, j)] = h[offset:offset + length] |
Bfloat16Indexer |
put(long i,
long j,
long k,
float h)
Returns
this where array/buffer[index(i, j, k)] = h |
void |
release()
Makes sure changes are reflected onto the backing memory and clears any references.
|
create, create, create, create, create, create, create, create, create, create, fromFloat, get, get, get, getDouble, put, put, put, putDouble, toFloatpublic Bfloat16ArrayIndexer(short[] array)
Bfloat16ArrayIndexer(array, { array.length }, { 1 }).public Bfloat16ArrayIndexer(short[] array,
long... sizes)
Bfloat16ArrayIndexer(array, sizes, strides(sizes)).public Bfloat16ArrayIndexer(short[] array,
long[] sizes,
long[] strides)
public short[] array()
Indexernull if nonepublic float get(long i)
Bfloat16Indexerarray/buffer[index(i)]get in class Bfloat16Indexerpublic Bfloat16Indexer get(long i, float[] h, int offset, int length)
Bfloat16Indexerthis where h[offset:offset + length] = array/buffer[index(i)]get in class Bfloat16Indexerpublic float get(long i,
long j)
Bfloat16Indexerarray/buffer[index(i, j)]get in class Bfloat16Indexerpublic Bfloat16Indexer get(long i, long j, float[] h, int offset, int length)
Bfloat16Indexerthis where h[offset:offset + length] = array/buffer[index(i, j)]get in class Bfloat16Indexerpublic float get(long i,
long j,
long k)
Bfloat16Indexerarray/buffer[index(i, j, 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 h[offset:offset + length] = array/buffer[index(indices)]get in class Bfloat16Indexerpublic Bfloat16Indexer put(long i, float h)
Bfloat16Indexerthis where array/buffer[index(i)] = hput in class Bfloat16Indexerpublic Bfloat16Indexer put(long i, float[] h, int offset, int length)
Bfloat16Indexerthis where array/buffer[index(i)] = h[offset:offset + length]put in class Bfloat16Indexerpublic Bfloat16Indexer put(long i, long j, float h)
Bfloat16Indexerthis where array/buffer[index(i, j)] = hput in class Bfloat16Indexerpublic Bfloat16Indexer put(long i, long j, float[] h, int offset, int length)
Bfloat16Indexerthis where array/buffer[index(i, j)] = h[offset:offset + length]put in class Bfloat16Indexerpublic Bfloat16Indexer put(long i, long j, long k, float h)
Bfloat16Indexerthis where array/buffer[index(i, j, k)] = hput in class Bfloat16Indexerpublic Bfloat16Indexer put(long[] indices, float h)
Bfloat16Indexerthis where array/buffer[index(indices)] = hput in class Bfloat16Indexerpublic Bfloat16Indexer put(long[] indices, float[] h, int offset, int length)
Bfloat16Indexerthis where array/buffer[index(indices)] = h[offset:offset + length]put in class Bfloat16Indexer