You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue #17 introduced the TimeTasks class to implement basic profiling.
A simpler and more general approach is possible based on macros and automatic destructors.
Create a set of time_task macros to be used as follows:
void mymethod()
{
// record time from this point to the end of this scope.
timeTasks_set_main_task(Task::PARTICLES);
...
// block that does communication
{
// mode is reset to communication until end of scope
timeTasks_set_communicating();
...
}
}
Improvements:
use of destructors: The implementation of the time_task macros constructs a non-anonymous class instance whose destructor is called when it goes out of scope. This eliminates the need to make separate calls to start() and end() methods.
defining subtasks is now supported.
The text was updated successfully, but these errors were encountered:
Issue #17 introduced the TimeTasks class to implement basic profiling.
A simpler and more general approach is possible based on macros and automatic destructors.
Create a set of time_task macros to be used as follows:
Improvements:
start()
andend()
methods.The text was updated successfully, but these errors were encountered: