Static Public Member Functions | |
| static void CNC_API | set_num_threads (int n) |
| sets the number of threads used by the application | |
| template<typename Tag, typename Range, typename HC> | |
| static void | trace (tag_collection< Tag, Range, HC > &tc, const char *name, int level=1) |
| enable tracing of a given tag collection at a given level | |
| template<typename Tag, typename Item, typename HC> | |
| static void | trace (item_collection< Tag, Item, HC > &ic, const char *name, int level=1) |
| enable tracing of a given item collection at a given level | |
| template<class Derived> | |
| static void | trace_all (::CnC::context< Derived > &c, const char *name, int level=1) |
| enable tracing of everything in given context | |
| template<typename Step> | |
| static void | trace (Step step, const char *name, int level=1) |
| enable tracing of a given step at a given level | |
| static void | init_timer (bool cycle=false) |
| initalize timer | |
| static void | finalize_timer (const char *name) |
| save collected time log to a specified file | |
| template<typename Step> | |
| static void | time (Step step, const char *name) |
| enable timing of a given step | |
| template<class Derived> | |
| static void | collect_scheduler_statistics (::CnC::context< Derived > &c) |
| enable collection scheduler statistics per context | |
#include <cnc/debug.h>
For a meaningful tracing the runtime requires a function cnc_format for every non-standard item and tag type. The expected signature is:
std::ostream & cnc_format( std::ostream & os, const your_type & p )
Definition at line 39 of file debug.h.
| static void CNC_API set_num_threads | ( | int | n | ) | [static] |
sets the number of threads used by the application
Overwrites environment variable CNC_NUM_THREADS. To be effective, it must be called prior to context creation.
| static void trace | ( | tag_collection< Tag, Range, HC > & | tc, | |
| const char * | name, | |||
| int | level = 1 | |||
| ) | [inline, static] |
| static void trace | ( | item_collection< Tag, Item, HC > & | ic, | |
| const char * | name, | |||
| int | level = 1 | |||
| ) | [inline, static] |
enable tracing of a given item collection at a given level
To be used in a safe environment only (no steps in flight).
| ic | the item collection to be traced | |
| name | the name by which the item collection should be identified in the trace | |
| level | trace level |
Definition at line 63 of file debug.h.
| static void trace_all | ( | ::CnC::context< Derived > & | c, | |
| const char * | name, | |||
| int | level = 1 | |||
| ) | [inline, static] |
enable tracing of everything in given context
To be used in a safe environment only (no steps in flight) names of collections are unavailable unless tracing them was enabled explicitly.
| c | the context to be traced | |
| name | the name by which the context should be identified in the trace | |
| level | trace level |
Definition at line 74 of file debug.h.
| static void trace | ( | Step | step, | |
| const char * | name, | |||
| int | level = 1 | |||
| ) | [inline, static] |
enable tracing of a given step at a given level
To be used in a safe environment only (no steps in flight)
| step | the step to be traced | |
| name | the name by which the step should be identified in the trace | |
| level | trace level |
Definition at line 84 of file debug.h.
00085 { Internal::step_tracer< Step >::s_traceName = name; Internal::step_tracer< Step >::s_traceLevel = level; }
| static void init_timer | ( | bool | cycle = false |
) | [inline, static] |
| static void finalize_timer | ( | const char * | name | ) | [inline, static] |
| static void time | ( | Step | step, | |
| const char * | name | |||
| ) | [inline, static] |
enable timing of a given step
To be used in a safe environment only (no steps in flight)
| step | the step to be timed | |
| name | the name by which the step should be identified in the time log |
Definition at line 105 of file debug.h.
00106 { Internal::step_timer< Step >::s_timingName = name; Internal::step_timer< Step >::s_timing = true; }
| static void collect_scheduler_statistics | ( | ::CnC::context< Derived > & | c | ) | [inline, static] |
1.5.6