22 unsigned long long runs = 0;
27 unsigned long long val;
28 asm volatile(
"mrs %0, cntvct_el0" :
"=r"(val));
35 unsigned long long end;
36 asm volatile(
"mrs %0, cntvct_el0" :
"=r"(end));
#define FORCE_INLINE
Hint the compiler to always inline a function.
Definition config.h:26
Hardware cycle counter for AArch64/ARM.
Definition cycle_counter_arm.h:19
unsigned long long runs
Definition cycle_counter_arm.h:22
unsigned long long total_cycles
Definition cycle_counter_arm.h:21
unsigned long long start_cycles
Definition cycle_counter_arm.h:20
void reset() noexcept
Reset accumulated ticks and run count to zero.
Definition cycle_counter_arm.h:42
FORCE_INLINE void stop() noexcept
Record the ending tick count and accumulate.
Definition cycle_counter_arm.h:33
FORCE_INLINE void start() noexcept
Record the starting tick count.
Definition cycle_counter_arm.h:25
double avg_cycles() const
Return the average ticks per start/stop pair.
Definition cycle_counter_arm.h:49