41 #ifdef USE_STACK_TIMERS 43 #ifdef USE_VTUNE_TASKS 44 __itt_id parent_task = __itt_null;
45 __itt_task_begin(manager->task_domain, __itt_null, parent_task, task_name);
49 nvtxRangePushA(name.c_str());
52 bool is_true_master(
true);
55 is_true_master =
false;
61 TimerType* parent = manager->current_timer();
65 current_stack_key.
add_id(timer_id);
70 current_stack_key.add_id(timer_id);
73 manager->push_timer(
this);
75 start_time = CLOCK::now();
78 start_time = CLOCK::now();
88 #ifdef USE_STACK_TIMERS 90 #ifdef USE_VTUNE_TASKS 91 __itt_task_end(manager->task_domain);
98 bool is_true_master(
true);
101 is_true_master =
false;
104 std::chrono::duration<double> elapsed = CLOCK::now() - start_time;
105 total_time += elapsed.count();
108 per_stack_total_time[current_stack_key] += elapsed.count();
109 per_stack_num_calls[current_stack_key] += 1;
112 manager->pop_timer(
this);
115 std::chrono::duration<double> elapsed = CLOCK::now() - start_time;
116 total_time += elapsed.count();
123 template<
class CLOCK>
126 if (timer_level <= threshold)
helper functions for EinsplineSetBuilder
void set_active_by_timer_threshold(const timer_levels threshold)
Timer accumulates time and call counts.
StackKey & get_stack_key()
omp_int_t omp_get_ancestor_thread_num(int level)
void add_id(timer_id_t c1)
bool timer_max_level_exceeded
omp_int_t omp_get_level()
StackKeyParam< 2 > StackKey
NewTimer class various high-resolution timers.