Added btSoftBodyHelpers::ReoptimizeLinkOrder(btSoftBody* softBody) method, to help improve performance for modern out-of-core CPUs.
It is tested in Aero2 demo (13) of AppSoftBodyDemo. Note that the cloth in Areo2 is not expensive enough to see benefits. Increase segments to see benefits. Thanks a lot for the contribution.
This commit is contained in:
@@ -137,7 +137,12 @@ struct btSoftBodyHelpers
|
||||
bool bfacelinks,
|
||||
bool btetralinks,
|
||||
bool bfacesfromtetras);
|
||||
|
||||
|
||||
/// Sort the list of links to move link calculations that are dependent upon earlier
|
||||
/// ones as far as possible away from the calculation of those values
|
||||
/// This tends to make adjacent loop iterations not dependent upon one another,
|
||||
/// so out-of-order processors can execute instructions from multiple iterations at once
|
||||
static void ReoptimizeLinkOrder(btSoftBody *psb );
|
||||
};
|
||||
|
||||
#endif //BT_SOFT_BODY_HELPERS_H
|
||||
|
||||
Reference in New Issue
Block a user