public class Bfloat16ArrayIndexer extends Bfloat16Indexer
short[]
array, treated as bfloat16.Modifier and Type | Field and Description |
---|---|
protected short[] |
array
The backing array.
|
VALUE_BYTES
indexable, ONE_STRIDE, sizes, strides
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[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, create, create, create, fromFloat, get, get, get, getDouble, put, put, put, putDouble, toFloat
public 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()
Indexer
null
if nonepublic float get(long i)
Bfloat16Indexer
array/buffer[i]
get
in class Bfloat16Indexer
public Bfloat16Indexer get(long i, float[] h, int offset, int length)
Bfloat16Indexer
this
where s[offset:offset + length] = array/buffer[i]
get
in class Bfloat16Indexer
public float get(long i, long j)
Bfloat16Indexer
array/buffer[i * strides[0] + j]
get
in class Bfloat16Indexer
public Bfloat16Indexer get(long i, long j, float[] h, int offset, int length)
Bfloat16Indexer
this
where s[offset:offset + length] = array/buffer[i * strides[0] + j]
get
in class Bfloat16Indexer
public float get(long i, long j, long k)
Bfloat16Indexer
array/buffer[i * strides[0] + j * strides[1] + k]
get
in class Bfloat16Indexer
public float get(long... indices)
Bfloat16Indexer
array/buffer[index(indices)]
get
in class Bfloat16Indexer
public Bfloat16Indexer get(long[] indices, float[] h, int offset, int length)
Bfloat16Indexer
this
where s[offset:offset + length] = array/buffer[index(indices)]
get
in class Bfloat16Indexer
public Bfloat16Indexer put(long i, float h)
Bfloat16Indexer
this
where array/buffer[i] = s
put
in class Bfloat16Indexer
public Bfloat16Indexer put(long i, float[] h, int offset, int length)
Bfloat16Indexer
this
where array/buffer[i] = s[offset:offset + length]
put
in class Bfloat16Indexer
public Bfloat16Indexer put(long i, long j, float h)
Bfloat16Indexer
this
where array/buffer[i * strides[0] + j] = s
put
in class Bfloat16Indexer
public Bfloat16Indexer put(long i, long j, float[] h, int offset, int length)
Bfloat16Indexer
this
where array/buffer[i * strides[0] + j] = s[offset:offset + length]
put
in class Bfloat16Indexer
public Bfloat16Indexer put(long i, long j, long k, float h)
Bfloat16Indexer
this
where array/buffer[i * strides[0] + j * strides[1] + k] = s
put
in class Bfloat16Indexer
public Bfloat16Indexer put(long[] indices, float h)
Bfloat16Indexer
this
where array/buffer[index(indices)] = s
put
in class Bfloat16Indexer
public Bfloat16Indexer put(long[] indices, float[] h, int offset, int length)
Bfloat16Indexer
this
where array/buffer[index(indices)] = s[offset:offset + length]
put
in class Bfloat16Indexer
Copyright © 2020. All rights reserved.