Package org.bytedeco.javacpp.indexer
Class HalfBufferIndexer
- java.lang.Object
-
- org.bytedeco.javacpp.indexer.Indexer
-
- org.bytedeco.javacpp.indexer.HalfIndexer
-
- org.bytedeco.javacpp.indexer.HalfBufferIndexer
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class HalfBufferIndexer extends HalfIndexer
An indexer for aShortBuffer, treated as half-precision float.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.nio.ShortBufferbufferThe backing buffer.-
Fields inherited from class org.bytedeco.javacpp.indexer.HalfIndexer
VALUE_BYTES
-
-
Constructor Summary
Constructors Constructor Description HalfBufferIndexer(java.nio.ShortBuffer buffer)CallsHalfBufferIndexer(buffer, Index.create(buffer.limit())).HalfBufferIndexer(java.nio.ShortBuffer buffer, long... sizes)CallsHalfBufferIndexer(buffer, Index.create(sizes)).HalfBufferIndexer(java.nio.ShortBuffer buffer, long[] sizes, long[] strides)CallsHalfBufferIndexer(buffer, Index.create(sizes, strides)).HalfBufferIndexer(java.nio.ShortBuffer buffer, Index index)Constructor to set thebufferandIndexer.index.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.Bufferbuffer()Returns the backing buffer, ornullif nonefloatget(long i)Returnsarray/buffer[index(i)]floatget(long... indices)Returnsarray/buffer[index(indices)]HalfIndexerget(long[] indices, float[] h, int offset, int length)Returnsthiswhereh[offset:offset + length] = array/buffer[index(indices)]HalfIndexerget(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)]HalfIndexerget(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)]HalfIndexerput(long[] indices, float h)Returnsthiswherearray/buffer[index(indices)] = hHalfIndexerput(long[] indices, float[] h, int offset, int length)Returnsthiswherearray/buffer[index(indices)] = h[offset:offset + length]HalfIndexerput(long i, float h)Returnsthiswherearray/buffer[index(i)] = hHalfIndexerput(long i, float[] h, int offset, int length)Returnsthiswherearray/buffer[index(i)] = h[offset:offset + length]HalfIndexerput(long i, long j, float h)Returnsthiswherearray/buffer[index(i, j)] = hHalfIndexerput(long i, long j, float[] h, int offset, int length)Returnsthiswherearray/buffer[index(i, j)] = h[offset:offset + length]HalfIndexerput(long i, long j, long k, float h)Returnsthiswherearray/buffer[index(i, j, k)] = hHalfIndexerreindex(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.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
-
-
-
-
Constructor Detail
-
HalfBufferIndexer
public HalfBufferIndexer(java.nio.ShortBuffer buffer)
CallsHalfBufferIndexer(buffer, Index.create(buffer.limit())).
-
HalfBufferIndexer
public HalfBufferIndexer(java.nio.ShortBuffer buffer, long... sizes)CallsHalfBufferIndexer(buffer, Index.create(sizes)).
-
HalfBufferIndexer
public HalfBufferIndexer(java.nio.ShortBuffer buffer, long[] sizes, long[] strides)CallsHalfBufferIndexer(buffer, Index.create(sizes, strides)).
-
HalfBufferIndexer
public HalfBufferIndexer(java.nio.ShortBuffer buffer, Index index)Constructor to set thebufferandIndexer.index.
-
-
Method Detail
-
buffer
public java.nio.Buffer buffer()
Description copied from class:IndexerReturns the backing buffer, ornullif none
-
reindex
public HalfIndexer 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:HalfIndexerReturnsarray/buffer[index(i)]- Specified by:
getin classHalfIndexer
-
get
public HalfIndexer get(long i, float[] h, int offset, int length)
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
public HalfIndexer get(long i, long j, float[] h, int offset, int length)
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
public HalfIndexer get(long[] indices, float[] h, int offset, int length)
Description copied from class:HalfIndexerReturnsthiswhereh[offset:offset + length] = array/buffer[index(indices)]- Specified by:
getin classHalfIndexer
-
put
public HalfIndexer put(long i, float h)
Description copied from class:HalfIndexerReturnsthiswherearray/buffer[index(i)] = h- Specified by:
putin classHalfIndexer
-
put
public HalfIndexer put(long i, float[] h, int offset, int length)
Description copied from class:HalfIndexerReturnsthiswherearray/buffer[index(i)] = h[offset:offset + length]- Specified by:
putin classHalfIndexer
-
put
public HalfIndexer put(long i, long j, float h)
Description copied from class:HalfIndexerReturnsthiswherearray/buffer[index(i, j)] = h- Specified by:
putin classHalfIndexer
-
put
public HalfIndexer put(long i, long j, float[] h, int offset, int length)
Description copied from class:HalfIndexerReturnsthiswherearray/buffer[index(i, j)] = h[offset:offset + length]- Specified by:
putin classHalfIndexer
-
put
public HalfIndexer put(long i, long j, long k, float h)
Description copied from class:HalfIndexerReturnsthiswherearray/buffer[index(i, j, k)] = h- Specified by:
putin classHalfIndexer
-
put
public HalfIndexer put(long[] indices, float h)
Description copied from class:HalfIndexerReturnsthiswherearray/buffer[index(indices)] = h- Specified by:
putin classHalfIndexer
-
put
public HalfIndexer put(long[] indices, float[] h, int offset, int length)
Description copied from class:HalfIndexerReturnsthiswherearray/buffer[index(indices)] = h[offset:offset + length]- Specified by:
putin classHalfIndexer
-
-