Class LongRawIndexer

All Implemented Interfaces:
AutoCloseable

public class LongRawIndexer extends LongIndexer
An indexer for a LongPointer using the Raw instance.
  • Field Details

    • RAW

      protected static final Raw RAW
      The instance for the raw memory interface.
    • pointer

      protected LongPointer 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

    • LongRawIndexer

      public LongRawIndexer(LongPointer pointer)
      Calls LongRawIndexer(pointer, Index.create(pointer.limit() - pointer.position())).
    • LongRawIndexer

      public LongRawIndexer(LongPointer pointer, long... sizes)
      Calls LongRawIndexer(pointer, Index.create(sizes)).
    • LongRawIndexer

      public LongRawIndexer(LongPointer pointer, long[] sizes, long[] strides)
      Calls LongRawIndexer(pointer, Index.create(sizes, strides)).
    • LongRawIndexer

      public LongRawIndexer(LongPointer 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 LongIndexer 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 long getRaw(long i)
    • get

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

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

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

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

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

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

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

      public LongIndexer putRaw(long i, long l)
    • put

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

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

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

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

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

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

      public LongIndexer put(long[] indices, long[] l, int offset, int length)
      Description copied from class: LongIndexer
      Returns this where array/buffer[index(indices)] = l[offset:offset + length]
      Specified by:
      put in class LongIndexer
    • 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