OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm::perf::CounterBatch Class Reference

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>

Collaboration diagram for openswmm::perf::CounterBatch:

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ CounterBatch() [1/2]

openswmm::perf::CounterBatch::CounterBatch ( )
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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~CounterBatch()

openswmm::perf::CounterBatch::~CounterBatch ( )
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.

◆ CounterBatch() [2/2]

openswmm::perf::CounterBatch::CounterBatch ( const CounterBatch & )
delete

Prevent copying an active CounterBatch scope.

A copied scope would duplicate ownership of timing/counter cleanup and is forbidden at compile time.

Here is the call graph for this function:

Member Function Documentation

◆ operator=()

CounterBatch & openswmm::perf::CounterBatch::operator= ( const CounterBatch & )
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.

Here is the call graph for this function:

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