#include <parallel_batch.h>
Public Member Functions | |
virtual int | batch (const int *pairList, const int numPairs, const int numBodies, BatchVector &bodyRepetitionCount0, BatchVector &bodyRepetitionCount1, BatchVector &maxBodyRepetitionCountInBatch, BatchVector &constraintIndices, BatchVector &batchIndices, BatchVector &batchSizes) |
Greedily assigns constraints to batches. If the maximum number of batches is reached and all constraints have not been assigned, the process resets the "used body" indicator and continues assignment. | |
GreedyBatchStrategy (int maxBatches=ParallelOptions::MAXBATCHES) | |
Constructs on instance of the greedy strategy. |
Greedily assigns constraints to batches if a given constraint has not used a body involved in the constraint.
Definition at line 130 of file parallel_batch.h.
parallel_ode::GreedyBatchStrategy::GreedyBatchStrategy | ( | int | maxBatches = ParallelOptions::MAXBATCHES |
) | [inline] |
Constructs on instance of the greedy strategy.
maxBatches | The maximum number of batches |
Definition at line 140 of file parallel_batch.h.
int parallel_ode::GreedyBatchStrategy::batch | ( | const int * | pairList, | |
const int | numPairs, | |||
const int | numBodies, | |||
BatchVector & | bodyRepetitionCount0, | |||
BatchVector & | bodyRepetitionCount1, | |||
BatchVector & | maxBodyRepetitionCountInBatch, | |||
BatchVector & | constraintIndices, | |||
BatchVector & | batchIndices, | |||
BatchVector & | batchSizes | |||
) | [virtual] |
Greedily assigns constraints to batches. If the maximum number of batches is reached and all constraints have not been assigned, the process resets the "used body" indicator and continues assignment.
Reimplemented from parallel_ode::BatchStrategy.
Definition at line 105 of file parallel_batch.cpp.