#include <LargeIslandSplitter.h>
|
struct | Split |
| Describes a split of constraints and contacts. More...
|
|
class | Splits |
| Structure that describes the resulting splits from the large island splitter. More...
|
|
|
| ~LargeIslandSplitter () |
| Destructor.
|
|
void | Prepare (const IslandBuilder &inIslandBuilder, uint32 inNumActiveBodies, TempAllocator *inTempAllocator) |
| Prepare the island splitter by allocating memory.
|
|
uint | AssignSplit (const Body *inBody1, const Body *inBody2) |
| Assign two bodies to a split. Returns the split index.
|
|
uint | AssignToNonParallelSplit (const Body *inBody) |
| Force a body to be in a non parallel split. Returns the split index.
|
|
bool | SplitIsland (uint32 inIslandIndex, const IslandBuilder &inIslandBuilder, const BodyManager &inBodyManager, const ContactConstraintManager &inContactManager, Constraint **inActiveConstraints, CalculateSolverSteps &ioStepsCalculator) |
| Splits up an island, the created splits will be added to the list of batches and can be fetched with FetchNextBatch. Returns false if the island did not need splitting.
|
|
EStatus | FetchNextBatch (uint &outSplitIslandIndex, uint32 *&outConstraintsBegin, uint32 *&outConstraintsEnd, uint32 *&outContactsBegin, uint32 *&outContactsEnd, bool &outFirstIteration) |
| Fetch the next batch to process, returns a handle in outSplitIslandIndex that must be provided to MarkBatchProcessed when complete.
|
|
void | MarkBatchProcessed (uint inSplitIslandIndex, const uint32 *inConstraintsBegin, const uint32 *inConstraintsEnd, const uint32 *inContactsBegin, const uint32 *inContactsEnd, bool &outLastIteration, bool &outFinalBatch) |
| Mark a batch as processed.
|
|
uint32 | GetIslandIndex (uint inSplitIslandIndex) const |
| Get the island index of the island that was split for a particular split island index.
|
|
void | PrepareForSolvePositions () |
| Prepare the island splitter for iterating over the split islands again for position solving. Marks all batches as startable.
|
|
void | Reset (TempAllocator *inTempAllocator) |
| Reset the island splitter.
|
|
| NonCopyable ()=default |
|
| NonCopyable (const NonCopyable &)=delete |
|
void | operator= (const NonCopyable &)=delete |
|
Assigns bodies in large islands to multiple groups that can run in parallel
This basically implements what is described in: High-Performance Physical Simulations on Next-Generation Architecture with Many Cores by Chen et al. See: http://web.eecs.umich.edu/~msmelyan/papers/physsim_onmanycore_itj.pdf section "PARALLELIZATION METHODOLOGY"
◆ EStatus
Status code for retrieving a batch.
Enumerator |
---|
WaitingForBatch | Work is expected to be available later.
|
BatchRetrieved | Work is being returned.
|
AllBatchesDone | No further work is expected from this.
|
◆ ~LargeIslandSplitter()
LargeIslandSplitter::~LargeIslandSplitter |
( |
| ) |
|
◆ AssignSplit()
uint LargeIslandSplitter::AssignSplit |
( |
const Body * |
inBody1, |
|
|
const Body * |
inBody2 |
|
) |
| |
Assign two bodies to a split. Returns the split index.
◆ AssignToNonParallelSplit()
uint LargeIslandSplitter::AssignToNonParallelSplit |
( |
const Body * |
inBody | ) |
|
Force a body to be in a non parallel split. Returns the split index.
◆ FetchNextBatch()
Fetch the next batch to process, returns a handle in outSplitIslandIndex that must be provided to MarkBatchProcessed when complete.
◆ GetIslandIndex()
uint32 LargeIslandSplitter::GetIslandIndex |
( |
uint |
inSplitIslandIndex | ) |
const |
|
inline |
Get the island index of the island that was split for a particular split island index.
◆ MarkBatchProcessed()
void LargeIslandSplitter::MarkBatchProcessed |
( |
uint |
inSplitIslandIndex, |
|
|
const uint32 * |
inConstraintsBegin, |
|
|
const uint32 * |
inConstraintsEnd, |
|
|
const uint32 * |
inContactsBegin, |
|
|
const uint32 * |
inContactsEnd, |
|
|
bool & |
outLastIteration, |
|
|
bool & |
outFinalBatch |
|
) |
| |
Mark a batch as processed.
◆ Prepare()
Prepare the island splitter by allocating memory.
◆ PrepareForSolvePositions()
void LargeIslandSplitter::PrepareForSolvePositions |
( |
| ) |
|
Prepare the island splitter for iterating over the split islands again for position solving. Marks all batches as startable.
◆ Reset()
void LargeIslandSplitter::Reset |
( |
TempAllocator * |
inTempAllocator | ) |
|
Reset the island splitter.
◆ SplitIsland()
Splits up an island, the created splits will be added to the list of batches and can be fetched with FetchNextBatch. Returns false if the island did not need splitting.
◆ cLargeIslandTreshold
constexpr uint LargeIslandSplitter::cLargeIslandTreshold = 128 |
|
staticconstexpr |
If the number of constraints + contacts in an island is larger than this, we will try to split the island.
◆ cNonParallelSplitIdx
constexpr uint LargeIslandSplitter::cNonParallelSplitIdx = cNumSplits - 1 |
|
staticconstexpr |
◆ cNumSplits
constexpr uint LargeIslandSplitter::cNumSplits = sizeof(SplitMask) * 8 |
|
staticconstexpr |
The documentation for this class was generated from the following files: