public class PooledTopNAlgorithm extends BaseTopNAlgorithm<int[],BufferAggregator[],PooledTopNAlgorithm.PooledTopNParams>
Modifier and Type | Class and Description |
---|---|
static class |
PooledTopNAlgorithm.PooledTopNParams |
BaseTopNAlgorithm.AggregatorArrayProvider, BaseTopNAlgorithm.BaseArrayProvider<T>
EMPTY_ARRAY, INIT_POSITION_VALUE, SKIP_POSITION_VALUE
Constructor and Description |
---|
PooledTopNAlgorithm(Capabilities capabilities,
TopNQuery query,
StupidPool<ByteBuffer> bufferPool) |
Modifier and Type | Method and Description |
---|---|
void |
cleanup(PooledTopNAlgorithm.PooledTopNParams params) |
protected void |
closeAggregators(BufferAggregator[] bufferAggregators) |
protected BufferAggregator[] |
makeDimValAggregateStore(PooledTopNAlgorithm.PooledTopNParams params) |
protected int[] |
makeDimValSelector(PooledTopNAlgorithm.PooledTopNParams params,
int numProcessed,
int numToProcess) |
PooledTopNAlgorithm.PooledTopNParams |
makeInitParams(DimensionSelector dimSelector,
Cursor cursor) |
protected void |
scanAndAggregate(PooledTopNAlgorithm.PooledTopNParams params,
int[] positions,
BufferAggregator[] theAggregators,
int numProcessed)
Use aggressive loop unrolling to aggregate the data
How this works: The aggregates are evaluated AGG_UNROLL_COUNT at a time.
|
protected int[] |
updateDimValSelector(int[] dimValSelector,
int numProcessed,
int numToProcess) |
protected void |
updateResults(PooledTopNAlgorithm.PooledTopNParams params,
int[] positions,
BufferAggregator[] theAggregators,
TopNResultBuilder resultBuilder) |
makeAggregators, makeBufferAggregators, makeResultBuilder, run
public PooledTopNAlgorithm(Capabilities capabilities, TopNQuery query, StupidPool<ByteBuffer> bufferPool)
public PooledTopNAlgorithm.PooledTopNParams makeInitParams(DimensionSelector dimSelector, Cursor cursor)
protected int[] makeDimValSelector(PooledTopNAlgorithm.PooledTopNParams params, int numProcessed, int numToProcess)
makeDimValSelector
in class BaseTopNAlgorithm<int[],BufferAggregator[],PooledTopNAlgorithm.PooledTopNParams>
protected int[] updateDimValSelector(int[] dimValSelector, int numProcessed, int numToProcess)
updateDimValSelector
in class BaseTopNAlgorithm<int[],BufferAggregator[],PooledTopNAlgorithm.PooledTopNParams>
protected BufferAggregator[] makeDimValAggregateStore(PooledTopNAlgorithm.PooledTopNParams params)
makeDimValAggregateStore
in class BaseTopNAlgorithm<int[],BufferAggregator[],PooledTopNAlgorithm.PooledTopNParams>
protected void scanAndAggregate(PooledTopNAlgorithm.PooledTopNParams params, int[] positions, BufferAggregator[] theAggregators, int numProcessed)
scanAndAggregate
in class BaseTopNAlgorithm<int[],BufferAggregator[],PooledTopNAlgorithm.PooledTopNParams>
protected void updateResults(PooledTopNAlgorithm.PooledTopNParams params, int[] positions, BufferAggregator[] theAggregators, TopNResultBuilder resultBuilder)
updateResults
in class BaseTopNAlgorithm<int[],BufferAggregator[],PooledTopNAlgorithm.PooledTopNParams>
protected void closeAggregators(BufferAggregator[] bufferAggregators)
closeAggregators
in class BaseTopNAlgorithm<int[],BufferAggregator[],PooledTopNAlgorithm.PooledTopNParams>
public void cleanup(PooledTopNAlgorithm.PooledTopNParams params)
Copyright © 2011–2015. All rights reserved.