// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #include "stat.h" namespace embree { Stat Stat::instance; Stat::Stat () { } Stat::~Stat () { #ifdef EMBREE_STAT_COUNTERS Stat::print(std::cout); #endif } void Stat::print(embree_ostream cout) { Counters& cntrs = instance.cntrs; Counters::Data& data = instance.cntrs.code; //Counters::Data& data = instance.cntrs.active; /* print absolute numbers */ cout << "--------- ABSOLUTE ---------" << std::endl; cout << " #normal_travs = " << float(data.normal.travs )*1E-6 << "M" << std::endl; cout << " #nodes = " << float(data.normal.trav_nodes )*1E-6 << "M" << std::endl; cout << " #nodes_xfm = " << float(data.normal.trav_xfm_nodes )*1E-6 << "M" << std::endl; cout << " #leaves = " << float(data.normal.trav_leaves )*1E-6 << "M" << std::endl; cout << " #prims = " << float(data.normal.trav_prims )*1E-6 << "M" << std::endl; cout << " #prim_hits = " << float(data.normal.trav_prim_hits )*1E-6 << "M" << std::endl; cout << " #stack nodes = " << float(data.normal.trav_stack_nodes )*1E-6 << "M" << std::endl; cout << " #stack pop = " << float(data.normal.trav_stack_pop )*1E-6 << "M" << std::endl; size_t normal_box_hits = 0; size_t weighted_box_hits = 0; for (size_t i=0;i