public class Bfloat16RawIndexer extends Bfloat16Indexer
ShortPointer
using the Raw
instance, treated as bfloat16.Modifier and Type | Field and Description |
---|---|
(package private) long |
base
Base address and number of elements accessible.
|
protected ShortPointer |
pointer
The backing pointer.
|
protected static Raw |
RAW
The instance for the raw memory interface.
|
(package private) long |
size
Base address and number of elements accessible.
|
VALUE_BYTES
indexable, ONE_STRIDE, sizes, strides
Constructor and Description |
---|
Bfloat16RawIndexer(ShortPointer pointer)
Calls
Bfloat16RawIndexer(pointer, { pointer.limit() - pointer.position() }, { 1 }) . |
Bfloat16RawIndexer(ShortPointer pointer,
long... sizes)
Calls
Bfloat16RawIndexer(pointer, sizes, strides(sizes)) . |
Bfloat16RawIndexer(ShortPointer pointer,
long[] sizes,
long[] strides)
|
Modifier and Type | Method and Description |
---|---|
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] |
Pointer |
pointer()
Returns the backing pointer, or
null if none |
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
protected static final Raw RAW
protected ShortPointer pointer
final long base
final long size
public Bfloat16RawIndexer(ShortPointer pointer)
Bfloat16RawIndexer(pointer, { pointer.limit() - pointer.position() }, { 1 })
.public Bfloat16RawIndexer(ShortPointer pointer, long... sizes)
Bfloat16RawIndexer(pointer, sizes, strides(sizes))
.public Bfloat16RawIndexer(ShortPointer pointer, long[] sizes, long[] strides)
public Pointer pointer()
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.