![]() |
NEURON
|
Helper class to collect performance statistics. More...
#include <perf_stat.hpp>
Public Member Functions | |
void | print (std::stringstream &stream) const |
std::vector< std::string > | values () const |
Static Public Member Functions | |
static std::vector< std::string > | keys () |
Public Attributes | |
std::string | title |
name for pretty-printing More... | |
int | n_assign = 0 |
write ops More... | |
int | n_add = 0 |
basic ops (<= 1 cycle) More... | |
int | n_sub = 0 |
int | n_mul = 0 |
int | n_div = 0 |
expensive ops More... | |
int | n_exp = 0 |
expensive functions : commonly used functions in mod files More... | |
int | n_log = 0 |
int | n_pow = 0 |
int | n_ext_func_call = 0 |
could be external math funcs More... | |
int | n_int_func_call = 0 |
mod functions (before/after inlining) More... | |
int | n_and = 0 |
bitwise ops More... | |
int | n_or = 0 |
int | n_gt = 0 |
comparisons ops More... | |
int | n_lt = 0 |
int | n_ge = 0 |
int | n_le = 0 |
int | n_ne = 0 |
int | n_ee = 0 |
int | n_not = 0 |
unary ops More... | |
int | n_neg = 0 |
int | n_if = 0 |
conditional ops More... | |
int | n_elif = 0 |
int | n_global_read = 0 |
expensive : typically access to dynamically allocated memory More... | |
int | n_global_write = 0 |
int | n_unique_global_read = 0 |
int | n_unique_global_write = 0 |
int | n_local_read = 0 |
cheap : typically local variables in mod file means registers More... | |
int | n_local_write = 0 |
int | n_constant_read = 0 |
could be optimized : access to variables that could be read-only in this case write counts are typically from initialization More... | |
int | n_constant_write = 0 |
int | n_unique_constant_read = 0 |
int | n_unique_constant_write = 0 |
Friends | |
PerfStat | operator+ (const PerfStat &first, const PerfStat &second) |
Helper class to collect performance statistics.
For code generation it is useful to know the performance characteristics of every block in nmodl. The PerfStat class groups performance characteristics of a single block in nmodl.
Definition at line 36 of file perf_stat.hpp.
|
static |
Definition at line 76 of file perf_stat.cpp.
void nmodl::utils::PerfStat::print | ( | std::stringstream & | stream | ) | const |
Definition at line 66 of file perf_stat.cpp.
std::vector< std::string > nmodl::utils::PerfStat::values | ( | ) | const |
Definition at line 82 of file perf_stat.cpp.
Definition at line 18 of file perf_stat.cpp.
int nmodl::utils::PerfStat::n_add = 0 |
basic ops (<= 1 cycle)
Definition at line 44 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_and = 0 |
bitwise ops
Definition at line 64 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_assign = 0 |
write ops
Definition at line 41 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_constant_read = 0 |
could be optimized : access to variables that could be read-only in this case write counts are typically from initialization
Definition at line 95 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_constant_write = 0 |
Definition at line 96 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_div = 0 |
expensive ops
Definition at line 49 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_ee = 0 |
Definition at line 73 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_elif = 0 |
Definition at line 81 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_exp = 0 |
expensive functions : commonly used functions in mod files
Definition at line 53 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_ext_func_call = 0 |
could be external math funcs
Definition at line 58 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_ge = 0 |
Definition at line 70 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_global_read = 0 |
expensive : typically access to dynamically allocated memory
Definition at line 84 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_global_write = 0 |
Definition at line 85 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_gt = 0 |
comparisons ops
Definition at line 68 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_if = 0 |
conditional ops
Definition at line 80 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_int_func_call = 0 |
mod functions (before/after inlining)
Definition at line 61 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_le = 0 |
Definition at line 71 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_local_read = 0 |
cheap : typically local variables in mod file means registers
Definition at line 90 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_local_write = 0 |
Definition at line 91 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_log = 0 |
Definition at line 54 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_lt = 0 |
Definition at line 69 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_mul = 0 |
Definition at line 46 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_ne = 0 |
Definition at line 72 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_neg = 0 |
Definition at line 77 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_not = 0 |
unary ops
Definition at line 76 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_or = 0 |
Definition at line 65 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_pow = 0 |
Definition at line 55 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_sub = 0 |
Definition at line 45 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_unique_constant_read = 0 |
Definition at line 97 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_unique_constant_write = 0 |
Definition at line 98 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_unique_global_read = 0 |
Definition at line 86 of file perf_stat.hpp.
int nmodl::utils::PerfStat::n_unique_global_write = 0 |
Definition at line 87 of file perf_stat.hpp.
std::string nmodl::utils::PerfStat::title |
name for pretty-printing
Definition at line 38 of file perf_stat.hpp.