Interface IntSortKernel<SORT_VALUES_ATTR extends Any,PERMUTE_VALUES_ATTR extends Any>

All Superinterfaces:
AutoCloseable, Context, SafeCloseable
All Known Implementing Classes:
ByteIntTimsortDescendingKernel.ByteIntSortKernelContext, ByteIntTimsortKernel.ByteIntSortKernelContext, CharIntTimsortKernel.CharIntSortKernelContext, DoubleIntTimsortDescendingKernel.DoubleIntSortKernelContext, DoubleIntTimsortKernel.DoubleIntSortKernelContext, FloatIntTimsortDescendingKernel.FloatIntSortKernelContext, FloatIntTimsortKernel.FloatIntSortKernelContext, IntIntTimsortDescendingKernel.IntIntSortKernelContext, IntIntTimsortKernel.IntIntSortKernelContext, LongIntTimsortDescendingKernel.LongIntSortKernelContext, LongIntTimsortKernel.LongIntSortKernelContext, NullAwareCharIntTimsortDescendingKernel.CharIntSortKernelContext, NullAwareCharIntTimsortKernel.CharIntSortKernelContext, ObjectIntTimsortDescendingKernel.ObjectIntSortKernelContext, ObjectIntTimsortKernel.ObjectIntSortKernelContext, ShortIntTimsortDescendingKernel.ShortIntSortKernelContext, ShortIntTimsortKernel.ShortIntSortKernelContext

public interface IntSortKernel<SORT_VALUES_ATTR extends Any,PERMUTE_VALUES_ATTR extends Any> extends Context
The SortKernel sorts a chunk of primitive value together with a parallel IntChunk of RowKeys.
  • Method Details

    • makeContext

      static <SORT_VALUES_ATTR extends Any, PERMUTE_VALUES_ATTR extends Any> IntSortKernel<SORT_VALUES_ATTR,PERMUTE_VALUES_ATTR> makeContext(ChunkType chunkType, SortingOrder order, int size, boolean preserveValues)
      Creates a SortKernel for the given chunkType.
      Parameters:
      chunkType - the type of chunk we are sorting
      order - whether we should sort in an ascending or descending direction
      size - how many values we will be sorting
      preserveValues - if the output chunk of our sort should contain the values in sorted order; otherwise the kernel need only permute the input indices into sorted order
      Returns:
      a SortKernel suitable for the given type, order, and size
    • sort

      void sort(WritableIntChunk<PERMUTE_VALUES_ATTR> valuesToPermute, WritableChunk<SORT_VALUES_ATTR> valuesToSort)
      Sort the values in valuesToSort permuting the valuesToPermute chunk in the same way.
    • sort

      void sort(WritableIntChunk<PERMUTE_VALUES_ATTR> valuesToPermute, WritableChunk<SORT_VALUES_ATTR> valuesToSort, IntChunk<? extends ChunkPositions> offsetsIn, IntChunk<? extends ChunkLengths> lengthsIn)
      Sort the values in valuesToSort permuting the valuesToPermute chunk in the same way.

      The offsetsIn chunk is contains the offsets of runs to sort in valuesToPermute; and the lengthsIn contains the lengths of the runs. This allows the kernel to be used for a secondary column sort, chaining it together with smaller runs sorted on each pass.