Refactor handling of timers to achieve simpler code in place of use and increase coverage #3098
Labels
I: No breaking change
Previously written code will work as before, no one should note anything changing (aside the fix)
S: Normal
Handle this with default priority
stale
Automatic marker for inactivity, please have another look here
T: Enhancement
New functionality, model or documentation
Projects
Currently, timers in NEST are typically started/stopped with code like this:
or
This creates a lot of visual clutter and is not as expressive as it could be in terms of OpenMP. I suggest the following:
if ( tid == 0 )
should be replaced by#pragma omp master
, which should have the same effect and does not introduce barriers.#ifdef TIMER_DETAILED
into thestart()
/stop()
methods. These should be inline, so that this should not cause any overhead. It will require creating aStopwatch
subclass forDetailedStopwatch
, which is inactive unless the detailed timers option is set.This work will required careful benchmarking to ensure that 1 & 2 do not cause longer runtimes.
The text was updated successfully, but these errors were encountered: