Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
LargeIslandSplitter::Splits Class Reference

Structure that describes the resulting splits from the large island splitter. More...

#include <LargeIslandSplitter.h>

Public Types

enum  EIterationStatus : uint64 {
  StatusIterationMask = 0xffff000000000000 , StatusIterationShift = 48 , StatusSplitMask = 0x0000ffff00000000 , StatusSplitShift = 32 ,
  StatusItemMask = 0x00000000ffffffff
}
 

Public Member Functions

uint GetNumSplits () const
 
void GetConstraintsInSplit (uint inSplitIndex, uint32 &outConstraintsBegin, uint32 &outConstraintsEnd) const
 
void GetContactsInSplit (uint inSplitIndex, uint32 &outContactsBegin, uint32 &outContactsEnd) const
 
void ResetStatus ()
 Reset current status so that no work can be picked up from this split.
 
void StartFirstBatch ()
 Make the first batch available to other threads.
 
EStatus FetchNextBatch (uint32 &outConstraintsBegin, uint32 &outConstraintsEnd, uint32 &outContactsBegin, uint32 &outContactsEnd, bool &outFirstIteration)
 Fetch the next batch to process.
 
void MarkBatchProcessed (uint inNumProcessed, bool &outLastIteration, bool &outFinalBatch)
 Mark a batch as processed.
 

Static Public Member Functions

static int sGetIteration (uint64 inStatus)
 
static uint sGetSplit (uint64 inStatus)
 
static uint sGetItem (uint64 inStatus)
 

Public Attributes

Split mSplits [cNumSplits]
 Data per split.
 
uint32 mIslandIndex
 Index of the island that was split.
 
uint mNumSplits
 Number of splits that were created (excluding the non-parallel split)
 
int mNumIterations
 Number of iterations to do.
 
int mNumVelocitySteps
 Number of velocity steps to do (cached for 2nd sub step)
 
int mNumPositionSteps
 Number of position steps to do.
 
atomic< uint64mStatus
 Status of the split, see EIterationStatus.
 
atomic< uintmItemsProcessed
 Number of items that have been marked as processed.
 

Detailed Description

Structure that describes the resulting splits from the large island splitter.

Member Enumeration Documentation

◆ EIterationStatus

Enumerator
StatusIterationMask 
StatusIterationShift 
StatusSplitMask 
StatusSplitShift 
StatusItemMask 

Member Function Documentation

◆ FetchNextBatch()

JPH_NAMESPACE_BEGIN LargeIslandSplitter::EStatus LargeIslandSplitter::Splits::FetchNextBatch ( uint32 outConstraintsBegin,
uint32 outConstraintsEnd,
uint32 outContactsBegin,
uint32 outContactsEnd,
bool &  outFirstIteration 
)

Fetch the next batch to process.

◆ GetConstraintsInSplit()

void LargeIslandSplitter::Splits::GetConstraintsInSplit ( uint  inSplitIndex,
uint32 outConstraintsBegin,
uint32 outConstraintsEnd 
) const
inline

◆ GetContactsInSplit()

void LargeIslandSplitter::Splits::GetContactsInSplit ( uint  inSplitIndex,
uint32 outContactsBegin,
uint32 outContactsEnd 
) const
inline

◆ GetNumSplits()

uint LargeIslandSplitter::Splits::GetNumSplits ( ) const
inline

◆ MarkBatchProcessed()

void LargeIslandSplitter::Splits::MarkBatchProcessed ( uint  inNumProcessed,
bool &  outLastIteration,
bool &  outFinalBatch 
)

Mark a batch as processed.

◆ ResetStatus()

void LargeIslandSplitter::Splits::ResetStatus ( )
inline

Reset current status so that no work can be picked up from this split.

◆ sGetItem()

static uint LargeIslandSplitter::Splits::sGetItem ( uint64  inStatus)
inlinestatic

◆ sGetIteration()

static int LargeIslandSplitter::Splits::sGetIteration ( uint64  inStatus)
inlinestatic

◆ sGetSplit()

static uint LargeIslandSplitter::Splits::sGetSplit ( uint64  inStatus)
inlinestatic

◆ StartFirstBatch()

void LargeIslandSplitter::Splits::StartFirstBatch ( )
inline

Make the first batch available to other threads.

Member Data Documentation

◆ mIslandIndex

uint32 LargeIslandSplitter::Splits::mIslandIndex

Index of the island that was split.

◆ mItemsProcessed

atomic<uint> LargeIslandSplitter::Splits::mItemsProcessed

Number of items that have been marked as processed.

◆ mNumIterations

int LargeIslandSplitter::Splits::mNumIterations

Number of iterations to do.

◆ mNumPositionSteps

int LargeIslandSplitter::Splits::mNumPositionSteps

Number of position steps to do.

◆ mNumSplits

uint LargeIslandSplitter::Splits::mNumSplits

Number of splits that were created (excluding the non-parallel split)

◆ mNumVelocitySteps

int LargeIslandSplitter::Splits::mNumVelocitySteps

Number of velocity steps to do (cached for 2nd sub step)

◆ mSplits

Split LargeIslandSplitter::Splits::mSplits[cNumSplits]

Data per split.

◆ mStatus

atomic<uint64> LargeIslandSplitter::Splits::mStatus

Status of the split, see EIterationStatus.


The documentation for this class was generated from the following files: