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