Interface ByteSortKernel<SORT_VALUES_ATTR extends Any,PERMUTE_VALUES_ATTR extends Any>

All Superinterfaces:
AutoCloseable, Context, SafeCloseable
All Known Implementing Classes:
ByteByteTimsortDescendingKernel.ByteByteSortKernelContext, ByteByteTimsortKernel.ByteByteSortKernelContext, CharByteTimsortKernel.CharByteSortKernelContext, DoubleByteTimsortDescendingKernel.DoubleByteSortKernelContext, DoubleByteTimsortKernel.DoubleByteSortKernelContext, FloatByteTimsortDescendingKernel.FloatByteSortKernelContext, FloatByteTimsortKernel.FloatByteSortKernelContext, IntByteTimsortDescendingKernel.IntByteSortKernelContext, IntByteTimsortKernel.IntByteSortKernelContext, LongByteTimsortDescendingKernel.LongByteSortKernelContext, LongByteTimsortKernel.LongByteSortKernelContext, NullAwareCharByteTimsortDescendingKernel.CharByteSortKernelContext, NullAwareCharByteTimsortKernel.CharByteSortKernelContext, ObjectByteTimsortDescendingKernel.ObjectByteSortKernelContext, ObjectByteTimsortKernel.ObjectByteSortKernelContext, ShortByteTimsortDescendingKernel.ShortByteSortKernelContext, ShortByteTimsortKernel.ShortByteSortKernelContext

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

    • makeContext

      static <SORT_VALUES_ATTR extends Any, PERMUTE_VALUES_ATTR extends Any> ByteSortKernel<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(WritableByteChunk<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(WritableByteChunk<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.