![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
Lightweight workload-aware policy for deciding whether an internal phase should actually launch parallel work when parallel mode is allowed. More...
#include <BRepGraph_ParallelPolicy.hxx>
Data Structures | |
| struct | Workload |
| Simple workload estimate for an execution phase. More... | |
Static Public Member Functions | |
| static int | WorkerCount () |
| Return the effective logical worker count reported by OSD_Parallel. | |
| static bool | IsParallelAllowed (const bool theAllowParallel) |
| Check whether parallel execution is allowed and meaningful at all. | |
| static bool | ShouldRun (const bool theAllowParallel, const int theWorkers, const Workload &theWorkload) |
| Decide whether the estimated workload is large enough to amortize thread-pool launch and synchronization overhead. | |
| static bool | ShouldRun (const bool theAllowParallel, const Workload &theWorkload) |
| Overload that queries the active worker count lazily. | |
Lightweight workload-aware policy for deciding whether an internal phase should actually launch parallel work when parallel mode is allowed.
The goal is to avoid forcing every short-lived loop onto the thread pool. Decisions are based on available worker capacity and on the amount of work already visible to the phase, instead of on buried per-loop split sizes.
Check whether parallel execution is allowed and meaningful at all.
|
inlinestatic |
Decide whether the estimated workload is large enough to amortize thread-pool launch and synchronization overhead.
|
inlinestatic |
Overload that queries the active worker count lazily.
Return the effective logical worker count reported by OSD_Parallel.