Class DoubleFindRunsKernel
java.lang.Object
com.illumon.iris.db.v2.sort.findruns.DoubleFindRunsKernel
public class DoubleFindRunsKernel extends Object
-
Constructor Summary
Constructors Constructor Description DoubleFindRunsKernel()
-
Method Summary
Modifier and Type Method Description static FindRunsKernel
createContext()
static void
findRuns(DoubleChunk sortedValues, IntChunk<Attributes.ChunkPositions> offsetsIn, IntChunk<Attributes.ChunkLengths> lengthsIn, WritableIntChunk<Attributes.ChunkPositions> offsetsOut, WritableIntChunk<Attributes.ChunkLengths> lengthsOut)
Find runs of two or more identical values in a sorted chunk.static void
findRunsSingles(DoubleChunk sortedValues, WritableIntChunk<Attributes.ChunkPositions> offsetsOut, WritableIntChunk<Attributes.ChunkLengths> lengthsOut)
Find runs of identical values in a sorted chunk.
-
Constructor Details
-
DoubleFindRunsKernel
public DoubleFindRunsKernel()
-
-
Method Details
-
findRunsSingles
public static void findRunsSingles(DoubleChunk sortedValues, WritableIntChunk<Attributes.ChunkPositions> offsetsOut, WritableIntChunk<Attributes.ChunkLengths> lengthsOut)Find runs of identical values in a sorted chunk. If a single value exists, it is included as run of length 1.- Parameters:
sortedValues
- a chunk of sorted valuesoffsetsOut
- an output chunk, with offsets of starting locations that a run occurredlengthsOut
- an output chunk, parallel to offsetsOut, with the lengths of found runs
-
findRuns
public static void findRuns(DoubleChunk sortedValues, IntChunk<Attributes.ChunkPositions> offsetsIn, IntChunk<Attributes.ChunkLengths> lengthsIn, WritableIntChunk<Attributes.ChunkPositions> offsetsOut, WritableIntChunk<Attributes.ChunkLengths> lengthsOut)Find runs of two or more 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 valuesoffsetsIn
- the offsets within the chunk to check for runslengthsIn
- the lengths parallel to offsetsIn for run checkingoffsetsOut
- an output chunk, with offsets of starting locations that a run occurredlengthsOut
- 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
-
createContext
-