public class HalfArrayIndexer extends HalfIndexer
short[] array, treated as half-precision float.Indexer.Index| Modifier and Type | Field and Description |
|---|---|
protected short[] |
array
The backing array.
|
VALUE_BYTES| Constructor and Description |
|---|
HalfArrayIndexer(short[] array)
Calls
HalfArrayIndexer(array, { array.length }, { 1 }). |
HalfArrayIndexer(short[] array,
long... sizes)
Calls
HalfArrayIndexer(array, sizes, strides(sizes)). |
HalfArrayIndexer(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)] |
HalfIndexer |
get(long[] indices,
float[] h,
int offset,
int length)
Returns
this where h[offset:offset + length] = array/buffer[index(indices)] |
HalfIndexer |
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)] |
HalfIndexer |
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)] |
HalfIndexer |
put(long[] indices,
float h)
Returns
this where array/buffer[index(indices)] = h |
HalfIndexer |
put(long[] indices,
float[] h,
int offset,
int length)
Returns
this where array/buffer[index(indices)] = h[offset:offset + length] |
HalfIndexer |
put(long i,
float h)
Returns
this where array/buffer[index(i)] = h |
HalfIndexer |
put(long i,
float[] h,
int offset,
int length)
Returns
this where array/buffer[index(i)] = h[offset:offset + length] |
HalfIndexer |
put(long i,
long j,
float h)
Returns
this where array/buffer[index(i, j)] = h |
HalfIndexer |
put(long i,
long j,
float[] h,
int offset,
int length)
Returns
this where array/buffer[index(i, j)] = h[offset:offset + length] |
HalfIndexer |
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 HalfArrayIndexer(short[] array)
HalfArrayIndexer(array, { array.length }, { 1 }).public HalfArrayIndexer(short[] array,
long... sizes)
HalfArrayIndexer(array, sizes, strides(sizes)).public HalfArrayIndexer(short[] array,
long[] sizes,
long[] strides)
public short[] array()
Indexernull if nonepublic float get(long i)
HalfIndexerarray/buffer[index(i)]get in class HalfIndexerpublic HalfIndexer get(long i, float[] h, int offset, int length)
HalfIndexerthis where h[offset:offset + length] = array/buffer[index(i)]get in class HalfIndexerpublic float get(long i,
long j)
HalfIndexerarray/buffer[index(i, j)]get in class HalfIndexerpublic HalfIndexer get(long i, long j, float[] h, int offset, int length)
HalfIndexerthis where h[offset:offset + length] = array/buffer[index(i, j)]get in class HalfIndexerpublic float get(long i,
long j,
long k)
HalfIndexerarray/buffer[index(i, j, k)]get in class HalfIndexerpublic float get(long... indices)
HalfIndexerarray/buffer[index(indices)]get in class HalfIndexerpublic HalfIndexer get(long[] indices, float[] h, int offset, int length)
HalfIndexerthis where h[offset:offset + length] = array/buffer[index(indices)]get in class HalfIndexerpublic HalfIndexer put(long i, float h)
HalfIndexerthis where array/buffer[index(i)] = hput in class HalfIndexerpublic HalfIndexer put(long i, float[] h, int offset, int length)
HalfIndexerthis where array/buffer[index(i)] = h[offset:offset + length]put in class HalfIndexerpublic HalfIndexer put(long i, long j, float h)
HalfIndexerthis where array/buffer[index(i, j)] = hput in class HalfIndexerpublic HalfIndexer put(long i, long j, float[] h, int offset, int length)
HalfIndexerthis where array/buffer[index(i, j)] = h[offset:offset + length]put in class HalfIndexerpublic HalfIndexer put(long i, long j, long k, float h)
HalfIndexerthis where array/buffer[index(i, j, k)] = hput in class HalfIndexerpublic HalfIndexer put(long[] indices, float h)
HalfIndexerthis where array/buffer[index(indices)] = hput in class HalfIndexerpublic HalfIndexer put(long[] indices, float[] h, int offset, int length)
HalfIndexerthis where array/buffer[index(indices)] = h[offset:offset + length]put in class HalfIndexer