Class Bfloat16RawIndexer

All Implemented Interfaces:
AutoCloseable

public class Bfloat16RawIndexer extends Bfloat16Indexer
An indexer for a ShortPointer using the Raw instance, treated as bfloat16.
  • Field Details

    • 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 Details

    • Bfloat16RawIndexer

      public Bfloat16RawIndexer(ShortPointer pointer)
      Calls Bfloat16RawIndexer(pointer, Index.create(pointer.limit() - pointer.position())).
    • Bfloat16RawIndexer

      public Bfloat16RawIndexer(ShortPointer pointer, long... sizes)
      Calls Bfloat16RawIndexer(pointer, Index.create(sizes)).
    • Bfloat16RawIndexer

      public Bfloat16RawIndexer(ShortPointer pointer, long[] sizes, long[] strides)
      Calls Bfloat16RawIndexer(pointer, Index.create(sizes, strides)).
    • Bfloat16RawIndexer

      public Bfloat16RawIndexer(ShortPointer pointer, Index index)
      Constructor to set the pointer and Indexer.index.
  • Method Details

    • pointer

      public Pointer pointer()
      Description copied from class: Indexer
      Returns the backing pointer, or null if none
      Overrides:
      pointer in class Indexer
    • reindex

      public Bfloat16Indexer reindex(Index index)
      Description copied from class: Indexer
      Returns a new Indexer using the same data, but with a different Index.
      Specified by:
      reindex in class Indexer
    • getRaw

      public float getRaw(long i)
    • get

      public float get(long i)
      Description copied from class: Bfloat16Indexer
      Returns array/buffer[index(i)]
      Specified by:
      get in class Bfloat16Indexer
    • get

      public Bfloat16Indexer get(long i, float[] h, int offset, int length)
      Description copied from class: Bfloat16Indexer
      Returns this where h[offset:offset + length] = array/buffer[index(i)]
      Specified by:
      get in class Bfloat16Indexer
    • get

      public float get(long i, long j)
      Description copied from class: Bfloat16Indexer
      Returns array/buffer[index(i, j)]
      Specified by:
      get in class Bfloat16Indexer
    • get

      public Bfloat16Indexer get(long i, long j, float[] h, int offset, int length)
      Description copied from class: Bfloat16Indexer
      Returns this where h[offset:offset + length] = array/buffer[index(i, j)]
      Specified by:
      get in class Bfloat16Indexer
    • get

      public float get(long i, long j, long k)
      Description copied from class: Bfloat16Indexer
      Returns array/buffer[index(i, j, k)]
      Specified by:
      get in class Bfloat16Indexer
    • get

      public float get(long... indices)
      Description copied from class: Bfloat16Indexer
      Returns array/buffer[index(indices)]
      Specified by:
      get in class Bfloat16Indexer
    • get

      public Bfloat16Indexer get(long[] indices, float[] h, int offset, int length)
      Description copied from class: Bfloat16Indexer
      Returns this where h[offset:offset + length] = array/buffer[index(indices)]
      Specified by:
      get in class Bfloat16Indexer
    • putRaw

      public Bfloat16Indexer putRaw(long i, float h)
    • put

      public Bfloat16Indexer put(long i, float h)
      Description copied from class: Bfloat16Indexer
      Returns this where array/buffer[index(i)] = h
      Specified by:
      put in class Bfloat16Indexer
    • put

      public Bfloat16Indexer put(long i, float[] h, int offset, int length)
      Description copied from class: Bfloat16Indexer
      Returns this where array/buffer[index(i)] = h[offset:offset + length]
      Specified by:
      put in class Bfloat16Indexer
    • put

      public Bfloat16Indexer put(long i, long j, float h)
      Description copied from class: Bfloat16Indexer
      Returns this where array/buffer[index(i, j)] = h
      Specified by:
      put in class Bfloat16Indexer
    • put

      public Bfloat16Indexer put(long i, long j, float[] h, int offset, int length)
      Description copied from class: Bfloat16Indexer
      Returns this where array/buffer[index(i, j)] = h[offset:offset + length]
      Specified by:
      put in class Bfloat16Indexer
    • put

      public Bfloat16Indexer put(long i, long j, long k, float h)
      Description copied from class: Bfloat16Indexer
      Returns this where array/buffer[index(i, j, k)] = h
      Specified by:
      put in class Bfloat16Indexer
    • put

      public Bfloat16Indexer put(long[] indices, float h)
      Description copied from class: Bfloat16Indexer
      Returns this where array/buffer[index(indices)] = h
      Specified by:
      put in class Bfloat16Indexer
    • put

      public Bfloat16Indexer put(long[] indices, float[] h, int offset, int length)
      Description copied from class: Bfloat16Indexer
      Returns this where array/buffer[index(indices)] = h[offset:offset + length]
      Specified by:
      put in class Bfloat16Indexer
    • release

      public void release()
      Description copied from class: Indexer
      Makes sure changes are reflected onto the backing memory and clears any references.
      Specified by:
      release in class Indexer