#include <algorithm>
#include <cmath>
#include <numeric>
#include <vector>
Go to the source code of this file.
|
static size_t | rdtsc () |
| Return the TSC. More...
|
|
static void | nano_sleep (size_t ns, double freq_ghz) |
|
static double | measure_rdtsc_freq () |
|
static double | to_sec (size_t cycles, double freq_ghz) |
| Convert cycles measured by rdtsc with frequence freq_ghz to seconds. More...
|
|
static double | to_msec (size_t cycles, double freq_ghz) |
| Convert cycles measured by rdtsc with frequence freq_ghz to msec. More...
|
|
static double | to_usec (size_t cycles, double freq_ghz) |
| Convert cycles measured by rdtsc with frequence freq_ghz to usec. More...
|
|
static size_t | us_to_cycles (double us, double freq_ghz) |
|
static size_t | ns_to_cycles (double ns, double freq_ghz) |
|
static double | to_nsec (size_t cycles, double freq_ghz) |
| Convert cycles measured by rdtsc with frequence freq_ghz to nsec. More...
|
|
static double | sec_since (const struct timespec &t0) |
| Return seconds elapsed since timestamp t0 . More...
|
|
static double | ns_since (const struct timespec &t0) |
| Return nanoseconds elapsed since timestamp t0 . More...
|
|
static double | stddev (const std::vector< double > in_vec) |
|
static double | mean (const std::vector< double > in_vec) |
|
◆ mean()
static double mean |
( |
const std::vector< double > |
in_vec | ) |
|
|
static |
◆ measure_rdtsc_freq()
static double measure_rdtsc_freq |
( |
| ) |
|
|
static |
◆ nano_sleep()
static void nano_sleep |
( |
size_t |
ns, |
|
|
double |
freq_ghz |
|
) |
| |
|
static |
◆ ns_since()
static double ns_since |
( |
const struct timespec & |
t0 | ) |
|
|
static |
Return nanoseconds elapsed since timestamp t0
.
◆ ns_to_cycles()
static size_t ns_to_cycles |
( |
double |
ns, |
|
|
double |
freq_ghz |
|
) |
| |
|
static |
◆ rdtsc()
◆ sec_since()
static double sec_since |
( |
const struct timespec & |
t0 | ) |
|
|
static |
Return seconds elapsed since timestamp t0
.
◆ stddev()
static double stddev |
( |
const std::vector< double > |
in_vec | ) |
|
|
static |
◆ to_msec()
static double to_msec |
( |
size_t |
cycles, |
|
|
double |
freq_ghz |
|
) |
| |
|
static |
Convert cycles measured by rdtsc with frequence freq_ghz
to msec.
◆ to_nsec()
static double to_nsec |
( |
size_t |
cycles, |
|
|
double |
freq_ghz |
|
) |
| |
|
static |
Convert cycles measured by rdtsc with frequence freq_ghz
to nsec.
◆ to_sec()
static double to_sec |
( |
size_t |
cycles, |
|
|
double |
freq_ghz |
|
) |
| |
|
static |
Convert cycles measured by rdtsc with frequence freq_ghz
to seconds.
◆ to_usec()
static double to_usec |
( |
size_t |
cycles, |
|
|
double |
freq_ghz |
|
) |
| |
|
static |
Convert cycles measured by rdtsc with frequence freq_ghz
to usec.
◆ us_to_cycles()
static size_t us_to_cycles |
( |
double |
us, |
|
|
double |
freq_ghz |
|
) |
| |
|
static |
◆ dpath_rdtsc
const auto& dpath_rdtsc = rdtsc |
|
static |
An alias for rdtsc() to distinguish calls on the critical path.