![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
Private counters for one worker in a worksharing phase. Nested batches merge into the enclosing worker's batch. The outer batch merges under one lock after the loop; hydraulic arithmetic is unaffected. When profiling is disabled, no counters are initialized or merged. More...
#include <PerfTimers.hpp>
Public Member Functions | |
| CounterBatch () noexcept | |
| Install private FV counters for the current worker when profiling is enabled. | |
| ~CounterBatch () noexcept | |
| Merge private counters into the enclosing batch or completed totals. | |
| CounterBatch (const CounterBatch &)=delete | |
| Prevent copying an active CounterBatch scope. | |
| CounterBatch & | operator= (const CounterBatch &)=delete |
| Prevent replacing an active CounterBatch scope by copy assignment. | |
Private counters for one worker in a worksharing phase. Nested batches merge into the enclosing worker's batch. The outer batch merges under one lock after the loop; hydraulic arithmetic is unaffected. When profiling is disabled, no counters are initialized or merged.
|
inlinenoexcept |
Install private FV counters for the current worker when profiling is enabled.
Nested batches chain to the previous thread-local counter target. Must be destroyed in reverse construction order on the same thread. Disabled profiling skips initialization and installation.
|
inlinenoexcept |
Merge private counters into the enclosing batch or completed totals.
Nested merge is thread-local; outermost merge locks fv_counts_mutex once. No-op for a disabled batch. As noexcept, a mutex-lock exception terminates.
|
delete |
Prevent copying an active CounterBatch scope.
A copied scope would duplicate ownership of timing/counter cleanup and is forbidden at compile time.
|
delete |
Prevent replacing an active CounterBatch scope by copy assignment.
Scope state must be completed by its original object on the thread that created it.