public class Bfloat16ArrayIndexer extends Bfloat16Indexer
short[] array, treated as bfloat16.| Modifier and Type | Field and Description |
|---|---|
protected short[] |
array
The backing array.
|
VALUE_BYTES| Constructor and Description |
|---|
Bfloat16ArrayIndexer(short[] array)
Calls
Bfloat16ArrayIndexer(array, Index.create(array.length)). |
Bfloat16ArrayIndexer(short[] array,
Index index)
Constructor to set the
array and Indexer.index. |
Bfloat16ArrayIndexer(short[] array,
long... sizes)
Calls
Bfloat16ArrayIndexer(array, Index.create(sizes)). |
Bfloat16ArrayIndexer(short[] array,
long[] sizes,
long[] strides)
Calls
Bfloat16ArrayIndexer(array, Index.create(sizes, 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 |
Bfloat16Indexer |
reindex(Index index)
Returns a new Indexer using the same data, but with a different Index.
|
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, create, create, create, create, fromFloat, get, get, get, getDouble, put, put, put, putDouble, toFloatpublic Bfloat16ArrayIndexer(short[] array)
Bfloat16ArrayIndexer(array, Index.create(array.length)).public Bfloat16ArrayIndexer(short[] array,
long... sizes)
Bfloat16ArrayIndexer(array, Index.create(sizes)).public Bfloat16ArrayIndexer(short[] array,
long[] sizes,
long[] strides)
Bfloat16ArrayIndexer(array, Index.create(sizes, strides)).public Bfloat16ArrayIndexer(short[] array,
Index index)
array and Indexer.index.public short[] array()
Indexernull if nonepublic Bfloat16Indexer reindex(Index index)
Indexerpublic 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 Bfloat16IndexerCopyright © 2020. All rights reserved.