35 #include <cnc/internal/cnc_api.h> 36 #include <cnc/internal/chronometer.h> 37 #include <cnc/internal/step_launcher.h> 42 template<
class T >
class context;
43 template<
typename Tag,
typename Tuner >
class tag_collection;
44 template<
typename Tag,
typename Item,
typename Tuner >
class item_collection;
45 template<
typename UserStep,
typename Tuner >
class step_collection;
68 template<
typename Tag,
typename Tuner >
70 { tc.m_tagCollection.set_tracing( level ); }
77 template<
typename Tag,
typename Item,
typename HC >
79 { ic.m_itemCollection.set_tracing( level ); }
86 template<
typename UserStep,
typename Tuner >
89 sc.set_tracing( level );
90 CNC_ASSERT( sc.trace_level() == level );
106 template<
class Derived >
108 { c.set_tracing( level ); }
115 { Internal::chronometer::init( cycle ); }
120 { Internal::chronometer::save_log( name ? name :
"-" ); }
126 template<
typename UserStep,
typename Tuner >
134 template<
class Derived >
136 { c.init_scheduler_statistics(); }
141 #endif // _CnC_DEBUG_H_ Debugging interface providing tracing and timing capabilities.
static void collect_scheduler_statistics(::CnC::context< Derived > &c)
enable collection scheduler statistics per context
static void init_timer(bool cycle=false)
initalize timer
A tag collection is a set of tags of the same type. It is used to prescribe steps. By default, tags are not stored.
Base class for defining and using CnC (sub-)graphs.
CnC context bringing together collections (for steps, items and tags).
static void trace(item_collection< Tag, Item, HC > &ic, int level=1)
enable tracing of a given item collection at a given level
static void CNC_API set_num_threads(int n)
sets the number of threads used by the application
static void trace(step_collection< UserStep, Tuner > &sc, int level=1)
enable tracing of a given step-collection at a given level (off=0)
A step collection is logical set of step instances.
static void trace_all(::CnC::context< Derived > &c, int level=1)
enable tracing of everything in given context (off=0)
An item collection is a mapping from tags to items.
static void time(step_collection< UserStep, Tuner > &sc)
enable timing of a given step
static void finalize_timer(const char *name)
save collected time log to a specified file
static void trace(tag_collection< Tag, Tuner > &tc, int level=1)
enable tracing of a given tag collection at a given level