public class HalfRawIndexer extends HalfIndexer
ShortPointer
using the Raw
instance, treated as half-precision float.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
Constructor and Description |
---|
HalfRawIndexer(ShortPointer pointer)
Calls
HalfRawIndexer(pointer, Index.create(pointer.limit() - pointer.position())) . |
HalfRawIndexer(ShortPointer pointer,
Index index)
Constructor to set the
pointer and Indexer.index . |
HalfRawIndexer(ShortPointer pointer,
long... sizes)
Calls
HalfRawIndexer(pointer, Index.create(sizes)) . |
HalfRawIndexer(ShortPointer pointer,
long[] sizes,
long[] strides)
Calls
HalfRawIndexer(pointer, Index.create(sizes, strides)) . |
Modifier and Type | Method and Description |
---|---|
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)] |
float |
getRaw(long i) |
Pointer |
pointer()
Returns the backing pointer, or
null if none |
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 |
HalfIndexer |
putRaw(long i,
float h) |
HalfIndexer |
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, toFloat
protected static final Raw RAW
protected ShortPointer pointer
final long base
final long size
public HalfRawIndexer(ShortPointer pointer)
HalfRawIndexer(pointer, Index.create(pointer.limit() - pointer.position()))
.public HalfRawIndexer(ShortPointer pointer, long... sizes)
HalfRawIndexer(pointer, Index.create(sizes))
.public HalfRawIndexer(ShortPointer pointer, long[] sizes, long[] strides)
HalfRawIndexer(pointer, Index.create(sizes, strides))
.public HalfRawIndexer(ShortPointer pointer, Index index)
pointer
and Indexer.index
.public Pointer pointer()
Indexer
null
if nonepublic HalfIndexer reindex(Index index)
Indexer
public float getRaw(long i)
public float get(long i)
HalfIndexer
array/buffer[index(i)]
get
in class HalfIndexer
public HalfIndexer get(long i, float[] h, int offset, int length)
HalfIndexer
this
where h[offset:offset + length] = array/buffer[index(i)]
get
in class HalfIndexer
public float get(long i, long j)
HalfIndexer
array/buffer[index(i, j)]
get
in class HalfIndexer
public HalfIndexer get(long i, long j, float[] h, int offset, int length)
HalfIndexer
this
where h[offset:offset + length] = array/buffer[index(i, j)]
get
in class HalfIndexer
public float get(long i, long j, long k)
HalfIndexer
array/buffer[index(i, j, k)]
get
in class HalfIndexer
public float get(long... indices)
HalfIndexer
array/buffer[index(indices)]
get
in class HalfIndexer
public HalfIndexer get(long[] indices, float[] h, int offset, int length)
HalfIndexer
this
where h[offset:offset + length] = array/buffer[index(indices)]
get
in class HalfIndexer
public HalfIndexer putRaw(long i, float h)
public HalfIndexer put(long i, float h)
HalfIndexer
this
where array/buffer[index(i)] = h
put
in class HalfIndexer
public HalfIndexer put(long i, float[] h, int offset, int length)
HalfIndexer
this
where array/buffer[index(i)] = h[offset:offset + length]
put
in class HalfIndexer
public HalfIndexer put(long i, long j, float h)
HalfIndexer
this
where array/buffer[index(i, j)] = h
put
in class HalfIndexer
public HalfIndexer put(long i, long j, float[] h, int offset, int length)
HalfIndexer
this
where array/buffer[index(i, j)] = h[offset:offset + length]
put
in class HalfIndexer
public HalfIndexer put(long i, long j, long k, float h)
HalfIndexer
this
where array/buffer[index(i, j, k)] = h
put
in class HalfIndexer
public HalfIndexer put(long[] indices, float h)
HalfIndexer
this
where array/buffer[index(indices)] = h
put
in class HalfIndexer
public HalfIndexer put(long[] indices, float[] h, int offset, int length)
HalfIndexer
this
where array/buffer[index(indices)] = h[offset:offset + length]
put
in class HalfIndexer
Copyright © 2024. All rights reserved.