Search in sources :

Example 1 with ParallelForestTraversalExecutor

use of com.amazon.randomcutforest.executor.ParallelForestTraversalExecutor in project random-cut-forest-by-aws by aws.

the class RandomCutForest method initExecutors.

protected <PointReference, Point> void initExecutors(IStateCoordinator<PointReference, Point> updateCoordinator, ComponentList<PointReference, Point> components) {
    if (parallelExecutionEnabled) {
        traversalExecutor = new ParallelForestTraversalExecutor(components, threadPoolSize);
        updateExecutor = new ParallelForestUpdateExecutor<>(updateCoordinator, components, threadPoolSize);
    } else {
        traversalExecutor = new SequentialForestTraversalExecutor(components);
        updateExecutor = new SequentialForestUpdateExecutor<>(updateCoordinator, components);
    }
}
Also used : ParallelForestTraversalExecutor(com.amazon.randomcutforest.executor.ParallelForestTraversalExecutor) SequentialForestTraversalExecutor(com.amazon.randomcutforest.executor.SequentialForestTraversalExecutor)

Aggregations

ParallelForestTraversalExecutor (com.amazon.randomcutforest.executor.ParallelForestTraversalExecutor)1 SequentialForestTraversalExecutor (com.amazon.randomcutforest.executor.SequentialForestTraversalExecutor)1