29#ifndef DY_SOLVER_CONTROL_H
30#define DY_SOLVER_CONTROL_H
32#include "DySolverCore.h"
33#include "DySolverConstraintDesc.h"
43inline void BusyWaitState(
volatile PxU32* state,
const PxU32 requiredState)
45 while(requiredState != *state );
48inline void WaitBodyRequiredState(PxU32* state,
const PxU32 requiredState)
50 if(*state != requiredState)
52 BusyWaitState(state, requiredState);
56inline void BusyWaitStates(
volatile PxU32* stateA,
volatile PxU32* stateB,
const PxU32 requiredStateA,
const PxU32 requiredStateB)
58 while(*stateA != requiredStateA);
59 while(*stateB != requiredStateB);
71 mSize(size), mCurrentIndex(0)
77 PxU32 currentIndex = mCurrentIndex;
78 while((constraintIndex - constraintBatchHeaders[currentIndex].startIndex) >= constraintBatchHeaders[currentIndex].stride)
79 currentIndex = (currentIndex + 1)%mSize;
81 mCurrentIndex = currentIndex;
82 return constraintBatchHeaders[currentIndex];
91 SolveBlockMethod solveTable[],
95 const PxI32 indA = index - (iteration * headerCount);
99 const PxI32 endIndex = indA + batchCount;
100 for(PxI32 i = indA; i < endIndex; ++i)
104 const PxI32 numToGrab = header.stride;
109 for(PxI32 b = 0; b < numToGrab; ++b)
116 solveTable[header.constraintType](block, PxU32(numToGrab), cache);
123 bool frictionEveryIteration;
127 virtual void destroyV();
129 virtual PxI32 solveVParallelAndWriteBack
132 virtual void solveV_Blocks
135 virtual void writeBackV
138 PxSolverBodyData* atomListData, WriteBackBlockMethod writeBackTable[])
const;
145#define SOLVEV_BLOCK_METHOD_ARGS SolverCore* solverCore, SolverIslandParams& params
147void solveVBlock(SOLVEV_BLOCK_METHOD_ARGS);
149SolveBlockMethod* getSolveBlockTable();
151SolveBlockMethod* getSolverConcludeBlockTable();
153SolveWriteBackBlockMethod* getSolveWritebackBlockTable();
Definition DySolverControl.h:64
Definition DySolverControl.h:121
Definition DySolverCore.h:217
#define PX_RESTRICT
Definition PxPreprocessor.h:355
#define PX_FORCE_INLINE
Definition PxPreprocessor.h:335
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
PX_FORCE_INLINE void PxPrefetch(const void *ptr, uint32_t count=1)
Definition PxUnixIntrinsics.h:91
PX_FORCE_INLINE void PxPrefetchLine(const void *ptr, uint32_t offset=0)
Definition PxUnixIntrinsics.h:83
Definition CmSpatialVector.h:134
Definition DySolverContext.h:42
Definition DySolverCore.h:155
Definition DyThresholdTable.h:52
Struct that the solver uses to store the state and other properties of a body.
Definition PxSolverDefs.h:74
Constraint descriptor used inside the solver.
Definition PxSolverDefs.h:108