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:
java.lang.AutoCloseable
public class Bfloat16ArrayIndexer extends Bfloat16Indexer
An indexer for ashort[]array, treated as bfloat16.
-
-
Field Summary
Fields Modifier and Type Field Description protected short[]arrayThe backing array.-
Fields inherited from class org.bytedeco.javacpp.indexer.Bfloat16Indexer
VALUE_BYTES
-
-
Constructor Summary
Constructors Constructor Description Bfloat16ArrayIndexer(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 thearrayandIndexer.index.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description short[]array()Returns the backing array, ornullif nonefloatget(long i)Returnsarray/buffer[index(i)]floatget(long... indices)Returnsarray/buffer[index(indices)]Bfloat16Indexerget(long[] indices, float[] h, int offset, int length)Returnsthiswhereh[offset:offset + length] = array/buffer[index(indices)]Bfloat16Indexerget(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)]Bfloat16Indexerget(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)]Bfloat16Indexerput(long[] indices, float h)Returnsthiswherearray/buffer[index(indices)] = hBfloat16Indexerput(long[] indices, float[] h, int offset, int length)Returnsthiswherearray/buffer[index(indices)] = h[offset:offset + length]Bfloat16Indexerput(long i, float h)Returnsthiswherearray/buffer[index(i)] = hBfloat16Indexerput(long i, float[] h, int offset, int length)Returnsthiswherearray/buffer[index(i)] = h[offset:offset + length]Bfloat16Indexerput(long i, long j, float h)Returnsthiswherearray/buffer[index(i, j)] = hBfloat16Indexerput(long i, long j, float[] h, int offset, int length)Returnsthiswherearray/buffer[index(i, j)] = h[offset:offset + length]Bfloat16Indexerput(long i, long j, long k, float h)Returnsthiswherearray/buffer[index(i, j, k)] = hBfloat16Indexerreindex(Index index)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 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
-
-
-
-
Constructor Detail
-
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
public Bfloat16ArrayIndexer(short[] array, Index index)Constructor to set thearrayandIndexer.index.
-
-
Method Detail
-
array
public short[] array()
Description copied from class:IndexerReturns the backing array, ornullif none
-
reindex
public Bfloat16Indexer reindex(Index index)
Description copied from class:IndexerReturns a new Indexer using the same data, but with a different Index.
-
get
public float get(long i)
Description copied from class:Bfloat16IndexerReturnsarray/buffer[index(i)]- Specified by:
getin classBfloat16Indexer
-
get
public Bfloat16Indexer get(long i, float[] h, int offset, int length)
Description copied from class:Bfloat16IndexerReturnsthiswhereh[offset:offset + length] = array/buffer[index(i)]- Specified by:
getin classBfloat16Indexer
-
get
public float get(long i, long j)Description copied from class:Bfloat16IndexerReturnsarray/buffer[index(i, j)]- Specified by:
getin classBfloat16Indexer
-
get
public Bfloat16Indexer get(long i, long j, float[] h, int offset, int length)
Description copied from class:Bfloat16IndexerReturnsthiswhereh[offset:offset + length] = array/buffer[index(i, j)]- Specified by:
getin classBfloat16Indexer
-
get
public float get(long i, long j, long k)Description copied from class:Bfloat16IndexerReturnsarray/buffer[index(i, j, k)]- Specified by:
getin classBfloat16Indexer
-
get
public float get(long... indices)
Description copied from class:Bfloat16IndexerReturnsarray/buffer[index(indices)]- Specified by:
getin classBfloat16Indexer
-
get
public Bfloat16Indexer get(long[] indices, float[] h, int offset, int length)
Description copied from class:Bfloat16IndexerReturnsthiswhereh[offset:offset + length] = array/buffer[index(indices)]- Specified by:
getin classBfloat16Indexer
-
put
public Bfloat16Indexer put(long i, float h)
Description copied from class:Bfloat16IndexerReturnsthiswherearray/buffer[index(i)] = h- Specified by:
putin classBfloat16Indexer
-
put
public Bfloat16Indexer put(long i, float[] h, int offset, int length)
Description copied from class:Bfloat16IndexerReturnsthiswherearray/buffer[index(i)] = h[offset:offset + length]- Specified by:
putin classBfloat16Indexer
-
put
public Bfloat16Indexer put(long i, long j, float h)
Description copied from class:Bfloat16IndexerReturnsthiswherearray/buffer[index(i, j)] = h- Specified by:
putin classBfloat16Indexer
-
put
public Bfloat16Indexer put(long i, long j, float[] h, int offset, int length)
Description copied from class:Bfloat16IndexerReturnsthiswherearray/buffer[index(i, j)] = h[offset:offset + length]- Specified by:
putin classBfloat16Indexer
-
put
public Bfloat16Indexer put(long i, long j, long k, float h)
Description copied from class:Bfloat16IndexerReturnsthiswherearray/buffer[index(i, j, k)] = h- Specified by:
putin classBfloat16Indexer
-
put
public Bfloat16Indexer put(long[] indices, float h)
Description copied from class:Bfloat16IndexerReturnsthiswherearray/buffer[index(indices)] = h- Specified by:
putin classBfloat16Indexer
-
put
public Bfloat16Indexer put(long[] indices, float[] h, int offset, int length)
Description copied from class:Bfloat16IndexerReturnsthiswherearray/buffer[index(indices)] = h[offset:offset + length]- Specified by:
putin classBfloat16Indexer
-
-