Package org.bytedeco.javacpp.indexer
Class Bfloat16ArrayIndexer
java.lang.Object
org.bytedeco.javacpp.indexer.Indexer
org.bytedeco.javacpp.indexer.Bfloat16Indexer
org.bytedeco.javacpp.indexer.Bfloat16ArrayIndexer
- All Implemented Interfaces:
AutoCloseable
An indexer for a
short[]
array, treated as bfloat16.-
Field Summary
FieldsFields inherited from class org.bytedeco.javacpp.indexer.Bfloat16Indexer
VALUE_BYTES
-
Constructor Summary
ConstructorsConstructorDescriptionBfloat16ArrayIndexer
(short[] array) CallsBfloat16ArrayIndexer(array, Index.create(array.length))
.Bfloat16ArrayIndexer
(short[] array, long... sizes) CallsBfloat16ArrayIndexer(array, Index.create(sizes))
.Bfloat16ArrayIndexer
(short[] array, long[] sizes, long[] strides) CallsBfloat16ArrayIndexer(array, Index.create(sizes, strides))
.Bfloat16ArrayIndexer
(short[] array, Index index) Constructor to set thearray
andIndexer.index
. -
Method Summary
Modifier and TypeMethodDescriptionshort[]
array()
Returns the backing array, ornull
if nonefloat
get
(long i) Returnsarray/buffer[index(i)]
float
get
(long... indices) Returnsarray/buffer[index(indices)]
get
(long[] indices, float[] h, int offset, int length) Returnsthis
whereh[offset:offset + length] = array/buffer[index(indices)]
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)]
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)]
put
(long[] indices, float h) Returnsthis
wherearray/buffer[index(indices)] = h
put
(long[] indices, float[] h, int offset, int length) Returnsthis
wherearray/buffer[index(indices)] = h[offset:offset + length]
put
(long i, float h) Returnsthis
wherearray/buffer[index(i)] = h
put
(long i, float[] h, int offset, int length) Returnsthis
wherearray/buffer[index(i)] = h[offset:offset + length]
put
(long i, long j, float h) Returnsthis
wherearray/buffer[index(i, j)] = h
put
(long i, long j, float[] h, int offset, int length) Returnsthis
wherearray/buffer[index(i, j)] = h[offset:offset + length]
put
(long i, long j, long k, float h) Returnsthis
wherearray/buffer[index(i, j, k)] = h
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.Bfloat16Indexer
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
-
array
protected short[] arrayThe backing array.
-
-
Constructor Details
-
Bfloat16ArrayIndexer
public Bfloat16ArrayIndexer(short[] array) CallsBfloat16ArrayIndexer(array, Index.create(array.length))
. -
Bfloat16ArrayIndexer
public Bfloat16ArrayIndexer(short[] array, long... sizes) CallsBfloat16ArrayIndexer(array, Index.create(sizes))
. -
Bfloat16ArrayIndexer
public Bfloat16ArrayIndexer(short[] array, long[] sizes, long[] strides) CallsBfloat16ArrayIndexer(array, Index.create(sizes, strides))
. -
Bfloat16ArrayIndexer
Constructor to set thearray
andIndexer.index
.
-
-
Method Details
-
array
public short[] array()Description copied from class:Indexer
Returns the backing array, ornull
if none -
reindex
Description copied from class:Indexer
Returns a new Indexer using the same data, but with a different Index. -
get
public float get(long i) Description copied from class:Bfloat16Indexer
Returnsarray/buffer[index(i)]
- Specified by:
get
in classBfloat16Indexer
-
get
Description copied from class:Bfloat16Indexer
Returnsthis
whereh[offset:offset + length] = array/buffer[index(i)]
- Specified by:
get
in classBfloat16Indexer
-
get
public float get(long i, long j) Description copied from class:Bfloat16Indexer
Returnsarray/buffer[index(i, j)]
- Specified by:
get
in classBfloat16Indexer
-
get
Description copied from class:Bfloat16Indexer
Returnsthis
whereh[offset:offset + length] = array/buffer[index(i, j)]
- Specified by:
get
in classBfloat16Indexer
-
get
public float get(long i, long j, long k) Description copied from class:Bfloat16Indexer
Returnsarray/buffer[index(i, j, k)]
- Specified by:
get
in classBfloat16Indexer
-
get
public float get(long... indices) Description copied from class:Bfloat16Indexer
Returnsarray/buffer[index(indices)]
- Specified by:
get
in classBfloat16Indexer
-
get
Description copied from class:Bfloat16Indexer
Returnsthis
whereh[offset:offset + length] = array/buffer[index(indices)]
- Specified by:
get
in classBfloat16Indexer
-
put
Description copied from class:Bfloat16Indexer
Returnsthis
wherearray/buffer[index(i)] = h
- Specified by:
put
in classBfloat16Indexer
-
put
Description copied from class:Bfloat16Indexer
Returnsthis
wherearray/buffer[index(i)] = h[offset:offset + length]
- Specified by:
put
in classBfloat16Indexer
-
put
Description copied from class:Bfloat16Indexer
Returnsthis
wherearray/buffer[index(i, j)] = h
- Specified by:
put
in classBfloat16Indexer
-
put
Description copied from class:Bfloat16Indexer
Returnsthis
wherearray/buffer[index(i, j)] = h[offset:offset + length]
- Specified by:
put
in classBfloat16Indexer
-
put
Description copied from class:Bfloat16Indexer
Returnsthis
wherearray/buffer[index(i, j, k)] = h
- Specified by:
put
in classBfloat16Indexer
-
put
Description copied from class:Bfloat16Indexer
Returnsthis
wherearray/buffer[index(indices)] = h
- Specified by:
put
in classBfloat16Indexer
-
put
Description copied from class:Bfloat16Indexer
Returnsthis
wherearray/buffer[index(indices)] = h[offset:offset + length]
- Specified by:
put
in classBfloat16Indexer
-
release
public void release()Description copied from class:Indexer
Makes sure changes are reflected onto the backing memory and clears any references.
-