Class HalfRawIndexer
java.lang.Object
org.bytedeco.javacpp.indexer.Indexer
org.bytedeco.javacpp.indexer.HalfIndexer
org.bytedeco.javacpp.indexer.HalfRawIndexer
- All Implemented Interfaces:
AutoCloseable
An indexer for a
ShortPointer using the Raw instance, treated as half-precision float.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final longBase address and number of elements accessible.protected ShortPointerThe backing pointer.protected static final RawThe instance for the raw memory interface.(package private) final longBase address and number of elements accessible.Fields inherited from class HalfIndexer
VALUE_BYTES -
Constructor Summary
ConstructorsConstructorDescriptionHalfRawIndexer(ShortPointer pointer) CallsHalfRawIndexer(pointer, Index.create(pointer.limit() - pointer.position())).HalfRawIndexer(ShortPointer pointer, long... sizes) CallsHalfRawIndexer(pointer, Index.create(sizes)).HalfRawIndexer(ShortPointer pointer, long[] sizes, long[] strides) CallsHalfRawIndexer(pointer, Index.create(sizes, strides)).HalfRawIndexer(ShortPointer pointer, Index index) Constructor to set thepointerandIndexer.index. -
Method Summary
Modifier and TypeMethodDescriptionfloatget(long i) Returnsarray/buffer[index(i)]floatget(long... indices) Returnsarray/buffer[index(indices)]get(long[] indices, float[] h, int offset, int length) Returnsthiswhereh[offset:offset + length] = array/buffer[index(indices)]get(long i, float[] h, int offset, int length) Returnsthiswhereh[offset:offset + length] = array/buffer[index(i)]floatget(long i, long j) Returnsarray/buffer[index(i, j)]get(long i, long j, float[] h, int offset, int length) Returnsthiswhereh[offset:offset + length] = array/buffer[index(i, j)]floatget(long i, long j, long k) Returnsarray/buffer[index(i, j, k)]floatgetRaw(long i) pointer()Returns the backing pointer, ornullif noneput(long[] indices, float h) Returnsthiswherearray/buffer[index(indices)] = hput(long[] indices, float[] h, int offset, int length) Returnsthiswherearray/buffer[index(indices)] = h[offset:offset + length]put(long i, float h) Returnsthiswherearray/buffer[index(i)] = hput(long i, float[] h, int offset, int length) Returnsthiswherearray/buffer[index(i)] = h[offset:offset + length]put(long i, long j, float h) Returnsthiswherearray/buffer[index(i, j)] = hput(long i, long j, float[] h, int offset, int length) Returnsthiswherearray/buffer[index(i, j)] = h[offset:offset + length]put(long i, long j, long k, float h) Returnsthiswherearray/buffer[index(i, j, k)] = hputRaw(long i, float h) Returns a new Indexer using the same data, but with a different Index.voidrelease()Makes sure changes are reflected onto the backing memory and clears any references.Methods inherited from class HalfIndexer
create, create, create, create, create, create, create, create, create, create, create, create, create, create, fromFloat, get, get, get, getDouble, put, put, put, putDouble, toFloat
-
Field Details
-
RAW
The instance for the raw memory interface. -
pointer
The backing pointer. -
base
final long baseBase address and number of elements accessible. -
size
final long sizeBase address and number of elements accessible.
-
-
Constructor Details
-
HalfRawIndexer
CallsHalfRawIndexer(pointer, Index.create(pointer.limit() - pointer.position())). -
HalfRawIndexer
CallsHalfRawIndexer(pointer, Index.create(sizes)). -
HalfRawIndexer
CallsHalfRawIndexer(pointer, Index.create(sizes, strides)). -
HalfRawIndexer
Constructor to set thepointerandIndexer.index.
-
-
Method Details
-
pointer
-
reindex
Description copied from class:IndexerReturns a new Indexer using the same data, but with a different Index. -
getRaw
public float getRaw(long i) -
get
public float get(long i) Description copied from class:HalfIndexerReturnsarray/buffer[index(i)]- Specified by:
getin classHalfIndexer
-
get
Description copied from class:HalfIndexerReturnsthiswhereh[offset:offset + length] = array/buffer[index(i)]- Specified by:
getin classHalfIndexer
-
get
public float get(long i, long j) Description copied from class:HalfIndexerReturnsarray/buffer[index(i, j)]- Specified by:
getin classHalfIndexer
-
get
Description copied from class:HalfIndexerReturnsthiswhereh[offset:offset + length] = array/buffer[index(i, j)]- Specified by:
getin classHalfIndexer
-
get
public float get(long i, long j, long k) Description copied from class:HalfIndexerReturnsarray/buffer[index(i, j, k)]- Specified by:
getin classHalfIndexer
-
get
public float get(long... indices) Description copied from class:HalfIndexerReturnsarray/buffer[index(indices)]- Specified by:
getin classHalfIndexer
-
get
Description copied from class:HalfIndexerReturnsthiswhereh[offset:offset + length] = array/buffer[index(indices)]- Specified by:
getin classHalfIndexer
-
putRaw
-
put
Description copied from class:HalfIndexerReturnsthiswherearray/buffer[index(i)] = h- Specified by:
putin classHalfIndexer
-
put
Description copied from class:HalfIndexerReturnsthiswherearray/buffer[index(i)] = h[offset:offset + length]- Specified by:
putin classHalfIndexer
-
put
Description copied from class:HalfIndexerReturnsthiswherearray/buffer[index(i, j)] = h- Specified by:
putin classHalfIndexer
-
put
Description copied from class:HalfIndexerReturnsthiswherearray/buffer[index(i, j)] = h[offset:offset + length]- Specified by:
putin classHalfIndexer
-
put
Description copied from class:HalfIndexerReturnsthiswherearray/buffer[index(i, j, k)] = h- Specified by:
putin classHalfIndexer
-
put
Description copied from class:HalfIndexerReturnsthiswherearray/buffer[index(indices)] = h- Specified by:
putin classHalfIndexer
-
put
Description copied from class:HalfIndexerReturnsthiswherearray/buffer[index(indices)] = h[offset:offset + length]- Specified by:
putin classHalfIndexer
-
release
-