void TraceTimer::prune() { unsigned int i=0; for(; i<m_children.size(); ++i){ TraceTimer* timer = m_children[i]; timer->prune(); } m_pruned = true; }
void TraceTimer::prune() { #ifdef _OPENMP if(onThread0()){ #endif int i=0; for (; i<m_children.size(); ++i) { TraceTimer* timer = m_children[i]; timer->prune(); } m_pruned = true; #ifdef _OPENMP } #endif }
void TraceTimer::PruneTimersParentChildPercent(double threshold, TraceTimer* parent) { if (parent->isPruned()) return; unsigned long long int time = parent->time(); const std::vector<TraceTimer*>& children = parent->children(); for (int i=0; i<children.size(); ++i) { TraceTimer* child = children[i]; if (!child->isPruned()) { unsigned long long int childtime = child->time(); if (((double)childtime)/time < threshold) child->prune(); else PruneTimersParentChildPercent(threshold, child); } } }