Package org.bytedeco.javacpp.indexer
Class ByteRawIndexer
java.lang.Object
org.bytedeco.javacpp.indexer.Indexer
org.bytedeco.javacpp.indexer.ByteIndexer
org.bytedeco.javacpp.indexer.ByteRawIndexer
- All Implemented Interfaces:
AutoCloseable
An indexer for a
BytePointer
using the Raw
instance.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final long
Base address and number of elements accessible.protected BytePointer
The backing pointer.protected static final Raw
The instance for the raw memory interface.(package private) final long
Base address and number of elements accessible.Fields inherited from class org.bytedeco.javacpp.indexer.ByteIndexer
VALUE_BYTES
-
Constructor Summary
ConstructorsConstructorDescriptionByteRawIndexer
(BytePointer pointer) CallsByteRawIndexer(pointer, Index.create(pointer.limit() - pointer.position()))
.ByteRawIndexer
(BytePointer pointer, long... sizes) CallsByteRawIndexer(pointer, Index.create(sizes))
.ByteRawIndexer
(BytePointer pointer, long[] sizes, long[] strides) CallsByteRawIndexer(pointer, Index.create(sizes, strides))
.ByteRawIndexer
(BytePointer pointer, Index index) Constructor to set thepointer
andIndexer.index
. -
Method Summary
Modifier and TypeMethodDescriptionbyte
get
(long i) Returnsarray/buffer[index(i)]
byte
get
(long... indices) Returnsarray/buffer[index(indices)]
get
(long[] indices, byte[] b, int offset, int length) Returnsthis
whereb[offset:offset + length] = array/buffer[index(indices)]
get
(long i, byte[] b, int offset, int length) Returnsthis
whereb[offset:offset + length] = array/buffer[index(i)]
byte
get
(long i, long j) Returnsarray/buffer[index(i, j)]
get
(long i, long j, byte[] b, int offset, int length) Returnsthis
whereb[offset:offset + length] = array/buffer[index(i, j)]
byte
get
(long i, long j, long k) Returnsarray/buffer[index(i, j, k)]
byte
getByte
(long i) Returns thebyte
value atarray/buffer[i]
char
getChar
(long i) Returns thechar
value atarray/buffer[i]
double
getDouble
(long i) Returns thedouble
value atarray/buffer[i]
float
getFloat
(long i) Returns thefloat
value atarray/buffer[i]
int
getInt
(long i) Returns theint
value atarray/buffer[i]
long
getLong
(long i) Returns thelong
value atarray/buffer[i]
byte
getRaw
(long i) short
getShort
(long i) Returns theshort
value atarray/buffer[i]
pointer()
Returns the backing pointer, ornull
if noneput
(long[] indices, byte b) Returnsthis
wherearray/buffer[index(indices)] = b
put
(long[] indices, byte[] b, int offset, int length) Returnsthis
wherearray/buffer[index(indices)] = b[offset:offset + length]
put
(long i, byte b) Returnsthis
wherearray/buffer[index(i)] = b
put
(long i, byte[] b, int offset, int length) Returnsthis
wherearray/buffer[index(i)] = b[offset:offset + length]
put
(long i, long j, byte b) Returnsthis
wherearray/buffer[index(i, j)] = b
put
(long i, long j, byte[] b, int offset, int length) Returnsthis
wherearray/buffer[index(i, j)] = b[offset:offset + length]
put
(long i, long j, long k, byte b) Returnsthis
wherearray/buffer[index(i, j, k)] = b
putByte
(long i, byte b) Sets thebyte
value atarray/buffer[i]
putChar
(long i, char c) Sets thechar
value atarray/buffer[i]
putDouble
(long i, double d) Sets thedouble
value atarray/buffer[i]
putFloat
(long i, float f) Sets thefloat
value atarray/buffer[i]
putInt
(long i, int j) Sets theint
value atarray/buffer[i]
putLong
(long i, long j) Sets thelong
value atarray/buffer[i]
putRaw
(long i, byte b) putShort
(long i, short s) Sets theshort
value atarray/buffer[i]
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.ByteIndexer
create, create, create, create, create, create, create, create, create, create, create, create, create, create, get, get, get, getBfloat16, getBoolean, getDouble, getHalf, getUByte, getUInt, getULong, getUShort, put, put, put, putBfloat16, putBoolean, putDouble, putHalf, putUByte, putUInt, putULong, putUShort
-
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
-
ByteRawIndexer
CallsByteRawIndexer(pointer, Index.create(pointer.limit() - pointer.position()))
. -
ByteRawIndexer
CallsByteRawIndexer(pointer, Index.create(sizes))
. -
ByteRawIndexer
CallsByteRawIndexer(pointer, Index.create(sizes, strides))
. -
ByteRawIndexer
Constructor to set thepointer
andIndexer.index
.
-
-
Method Details
-
pointer
Description copied from class:Indexer
Returns the backing pointer, ornull
if none -
reindex
Description copied from class:Indexer
Returns a new Indexer using the same data, but with a different Index. -
getRaw
public byte getRaw(long i) -
get
public byte get(long i) Description copied from class:ByteIndexer
Returnsarray/buffer[index(i)]
- Specified by:
get
in classByteIndexer
-
get
Description copied from class:ByteIndexer
Returnsthis
whereb[offset:offset + length] = array/buffer[index(i)]
- Specified by:
get
in classByteIndexer
-
get
public byte get(long i, long j) Description copied from class:ByteIndexer
Returnsarray/buffer[index(i, j)]
- Specified by:
get
in classByteIndexer
-
get
Description copied from class:ByteIndexer
Returnsthis
whereb[offset:offset + length] = array/buffer[index(i, j)]
- Specified by:
get
in classByteIndexer
-
get
public byte get(long i, long j, long k) Description copied from class:ByteIndexer
Returnsarray/buffer[index(i, j, k)]
- Specified by:
get
in classByteIndexer
-
get
public byte get(long... indices) Description copied from class:ByteIndexer
Returnsarray/buffer[index(indices)]
- Specified by:
get
in classByteIndexer
-
get
Description copied from class:ByteIndexer
Returnsthis
whereb[offset:offset + length] = array/buffer[index(indices)]
- Specified by:
get
in classByteIndexer
-
putRaw
-
put
Description copied from class:ByteIndexer
Returnsthis
wherearray/buffer[index(i)] = b
- Specified by:
put
in classByteIndexer
-
put
Description copied from class:ByteIndexer
Returnsthis
wherearray/buffer[index(i)] = b[offset:offset + length]
- Specified by:
put
in classByteIndexer
-
put
Description copied from class:ByteIndexer
Returnsthis
wherearray/buffer[index(i, j)] = b
- Specified by:
put
in classByteIndexer
-
put
Description copied from class:ByteIndexer
Returnsthis
wherearray/buffer[index(i, j)] = b[offset:offset + length]
- Specified by:
put
in classByteIndexer
-
put
Description copied from class:ByteIndexer
Returnsthis
wherearray/buffer[index(i, j, k)] = b
- Specified by:
put
in classByteIndexer
-
put
Description copied from class:ByteIndexer
Returnsthis
wherearray/buffer[index(indices)] = b
- Specified by:
put
in classByteIndexer
-
put
Description copied from class:ByteIndexer
Returnsthis
wherearray/buffer[index(indices)] = b[offset:offset + length]
- Specified by:
put
in classByteIndexer
-
getByte
public byte getByte(long i) Description copied from class:ByteIndexer
Returns thebyte
value atarray/buffer[i]
- Specified by:
getByte
in classByteIndexer
-
putByte
Description copied from class:ByteIndexer
Sets thebyte
value atarray/buffer[i]
- Specified by:
putByte
in classByteIndexer
-
getShort
public short getShort(long i) Description copied from class:ByteIndexer
Returns theshort
value atarray/buffer[i]
- Specified by:
getShort
in classByteIndexer
-
putShort
Description copied from class:ByteIndexer
Sets theshort
value atarray/buffer[i]
- Specified by:
putShort
in classByteIndexer
-
getInt
public int getInt(long i) Description copied from class:ByteIndexer
Returns theint
value atarray/buffer[i]
- Specified by:
getInt
in classByteIndexer
-
putInt
Description copied from class:ByteIndexer
Sets theint
value atarray/buffer[i]
- Specified by:
putInt
in classByteIndexer
-
getLong
public long getLong(long i) Description copied from class:ByteIndexer
Returns thelong
value atarray/buffer[i]
- Specified by:
getLong
in classByteIndexer
-
putLong
Description copied from class:ByteIndexer
Sets thelong
value atarray/buffer[i]
- Specified by:
putLong
in classByteIndexer
-
getFloat
public float getFloat(long i) Description copied from class:ByteIndexer
Returns thefloat
value atarray/buffer[i]
- Specified by:
getFloat
in classByteIndexer
-
putFloat
Description copied from class:ByteIndexer
Sets thefloat
value atarray/buffer[i]
- Specified by:
putFloat
in classByteIndexer
-
getDouble
public double getDouble(long i) Description copied from class:ByteIndexer
Returns thedouble
value atarray/buffer[i]
- Specified by:
getDouble
in classByteIndexer
-
putDouble
Description copied from class:ByteIndexer
Sets thedouble
value atarray/buffer[i]
- Specified by:
putDouble
in classByteIndexer
-
getChar
public char getChar(long i) Description copied from class:ByteIndexer
Returns thechar
value atarray/buffer[i]
- Specified by:
getChar
in classByteIndexer
-
putChar
Description copied from class:ByteIndexer
Sets thechar
value atarray/buffer[i]
- Specified by:
putChar
in classByteIndexer
-
release
public void release()Description copied from class:Indexer
Makes sure changes are reflected onto the backing memory and clears any references.
-