Interface FindRunsKernel

All Superinterfaces:
AutoCloseable, Context, SafeCloseable

public interface FindRunsKernel
extends Context
  • Method Details

    • makeContext

      static FindRunsKernel makeContext​(ChunkType chunkType)
    • findRuns

      void findRuns​(Chunk sortedValues, WritableIntChunk<Attributes.ChunkPositions> offsetsOut, WritableIntChunk<Attributes.ChunkLengths> lengthsOut)
      Find runs of identical values in a sorted chunk. This is used as part of an overall sort, after the timsort (or other sorting) kernel to identify the runs that must be sorted according to secondary keys. Runs with only a single value are not included.
      Parameters:
      sortedValues - a chunk of sorted values
      offsetsOut - an output chunk, with offsets of starting locations that a run occurred
      lengthsOut - an output chunk, parallel to offsetsOut, with the lengths of found runs
    • findRunsSingles

      void findRunsSingles​(Chunk sortedValues, WritableIntChunk<Attributes.ChunkPositions> offsetsOut, WritableIntChunk<Attributes.ChunkLengths> lengthsOut)
      Find runs of identical values in a sorted chunk. Runs of a single values are included.
      Parameters:
      sortedValues - a chunk of sorted values
      offsetsOut - an output chunk, with offsets of starting locations that a run occurred
      lengthsOut - an output chunk, parallel to offsetsOut, with the lengths of found runs
    • findRuns

      Find runs of identical values in a sorted chunk. This is used as part of an overall sort, after the timsort (or other sorting) kernel to identify the runs that must be sorted according to secondary keys.
      Parameters:
      sortedValues - a chunk of sorted values
      offsetsIn - the offsets within the chunk to check for runs
      lengthsIn - the lengths parallel to offsetsIn for run checking
      offsetsOut - an output chunk, with offsets of starting locations that a run occurred
      lengthsOut - an output chunk, parallel to offsetsOut, with the lengths of found runs Note, that lengthsIn must contain values greater than 1, and lengthsOut additionally only contain values greater than one