Package org.bytedeco.javacpp.indexer
Class HalfRawIndexer
- java.lang.Object
-
- org.bytedeco.javacpp.indexer.Indexer
-
- org.bytedeco.javacpp.indexer.HalfIndexer
-
- org.bytedeco.javacpp.indexer.HalfRawIndexer
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class HalfRawIndexer extends HalfIndexer
An indexer for aShortPointer
using theRaw
instance, treated as half-precision float.
-
-
Field Summary
Fields Modifier and Type Field 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.-
Fields inherited from class org.bytedeco.javacpp.indexer.HalfIndexer
VALUE_BYTES
-
-
Constructor Summary
Constructors Constructor Description HalfRawIndexer(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 thepointer
andIndexer.index
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float
get(long i)
Returnsarray/buffer[index(i)]
float
get(long... indices)
Returnsarray/buffer[index(indices)]
HalfIndexer
get(long[] indices, float[] h, int offset, int length)
Returnsthis
whereh[offset:offset + length] = array/buffer[index(indices)]
HalfIndexer
get(long i, float[] h, int offset, int length)
Returnsthis
whereh[offset:offset + length] = array/buffer[index(i)]
float
get(long i, long j)
Returnsarray/buffer[index(i, j)]
HalfIndexer
get(long i, long j, float[] h, int offset, int length)
Returnsthis
whereh[offset:offset + length] = array/buffer[index(i, j)]
float
get(long i, long j, long k)
Returnsarray/buffer[index(i, j, k)]
float
getRaw(long i)
Pointer
pointer()
Returns the backing pointer, ornull
if noneHalfIndexer
put(long[] indices, float h)
Returnsthis
wherearray/buffer[index(indices)] = h
HalfIndexer
put(long[] indices, float[] h, int offset, int length)
Returnsthis
wherearray/buffer[index(indices)] = h[offset:offset + length]
HalfIndexer
put(long i, float h)
Returnsthis
wherearray/buffer[index(i)] = h
HalfIndexer
put(long i, float[] h, int offset, int length)
Returnsthis
wherearray/buffer[index(i)] = h[offset:offset + length]
HalfIndexer
put(long i, long j, float h)
Returnsthis
wherearray/buffer[index(i, j)] = h
HalfIndexer
put(long i, long j, float[] h, int offset, int length)
Returnsthis
wherearray/buffer[index(i, j)] = h[offset:offset + length]
HalfIndexer
put(long i, long j, long k, float h)
Returnsthis
wherearray/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.-
Methods inherited from class org.bytedeco.javacpp.indexer.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 Detail
-
RAW
protected static final Raw RAW
The instance for the raw memory interface.
-
pointer
protected ShortPointer pointer
The backing pointer.
-
base
final long base
Base address and number of elements accessible.
-
size
final long size
Base address and number of elements accessible.
-
-
Constructor Detail
-
HalfRawIndexer
public HalfRawIndexer(ShortPointer pointer)
CallsHalfRawIndexer(pointer, Index.create(pointer.limit() - pointer.position()))
.
-
HalfRawIndexer
public HalfRawIndexer(ShortPointer pointer, long... sizes)
CallsHalfRawIndexer(pointer, Index.create(sizes))
.
-
HalfRawIndexer
public HalfRawIndexer(ShortPointer pointer, long[] sizes, long[] strides)
CallsHalfRawIndexer(pointer, Index.create(sizes, strides))
.
-
HalfRawIndexer
public HalfRawIndexer(ShortPointer pointer, Index index)
Constructor to set thepointer
andIndexer.index
.
-
-
Method Detail
-
pointer
public Pointer pointer()
Description copied from class:Indexer
Returns the backing pointer, ornull
if none
-
reindex
public HalfIndexer reindex(Index index)
Description copied from class:Indexer
Returns 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:HalfIndexer
Returnsarray/buffer[index(i)]
- Specified by:
get
in classHalfIndexer
-
get
public HalfIndexer get(long i, float[] h, int offset, int length)
Description copied from class:HalfIndexer
Returnsthis
whereh[offset:offset + length] = array/buffer[index(i)]
- Specified by:
get
in classHalfIndexer
-
get
public float get(long i, long j)
Description copied from class:HalfIndexer
Returnsarray/buffer[index(i, j)]
- Specified by:
get
in classHalfIndexer
-
get
public HalfIndexer get(long i, long j, float[] h, int offset, int length)
Description copied from class:HalfIndexer
Returnsthis
whereh[offset:offset + length] = array/buffer[index(i, j)]
- Specified by:
get
in classHalfIndexer
-
get
public float get(long i, long j, long k)
Description copied from class:HalfIndexer
Returnsarray/buffer[index(i, j, k)]
- Specified by:
get
in classHalfIndexer
-
get
public float get(long... indices)
Description copied from class:HalfIndexer
Returnsarray/buffer[index(indices)]
- Specified by:
get
in classHalfIndexer
-
get
public HalfIndexer get(long[] indices, float[] h, int offset, int length)
Description copied from class:HalfIndexer
Returnsthis
whereh[offset:offset + length] = array/buffer[index(indices)]
- Specified by:
get
in classHalfIndexer
-
putRaw
public HalfIndexer putRaw(long i, float h)
-
put
public HalfIndexer put(long i, float h)
Description copied from class:HalfIndexer
Returnsthis
wherearray/buffer[index(i)] = h
- Specified by:
put
in classHalfIndexer
-
put
public HalfIndexer put(long i, float[] h, int offset, int length)
Description copied from class:HalfIndexer
Returnsthis
wherearray/buffer[index(i)] = h[offset:offset + length]
- Specified by:
put
in classHalfIndexer
-
put
public HalfIndexer put(long i, long j, float h)
Description copied from class:HalfIndexer
Returnsthis
wherearray/buffer[index(i, j)] = h
- Specified by:
put
in classHalfIndexer
-
put
public HalfIndexer put(long i, long j, float[] h, int offset, int length)
Description copied from class:HalfIndexer
Returnsthis
wherearray/buffer[index(i, j)] = h[offset:offset + length]
- Specified by:
put
in classHalfIndexer
-
put
public HalfIndexer put(long i, long j, long k, float h)
Description copied from class:HalfIndexer
Returnsthis
wherearray/buffer[index(i, j, k)] = h
- Specified by:
put
in classHalfIndexer
-
put
public HalfIndexer put(long[] indices, float h)
Description copied from class:HalfIndexer
Returnsthis
wherearray/buffer[index(indices)] = h
- Specified by:
put
in classHalfIndexer
-
put
public HalfIndexer put(long[] indices, float[] h, int offset, int length)
Description copied from class:HalfIndexer
Returnsthis
wherearray/buffer[index(indices)] = h[offset:offset + length]
- Specified by:
put
in classHalfIndexer
-
-