|
tesseract++ 0.0.1
N-dimensional tensor library for embedded systems
|
Hardware cycle counter for AArch64/ARM. More...
#include <cycle_counter_arm.h>
Public Member Functions | |
| FORCE_INLINE void | start () noexcept |
| Record the starting tick count. | |
| FORCE_INLINE void | stop () noexcept |
| Record the ending tick count and accumulate. | |
| void | reset () noexcept |
| Reset accumulated ticks and run count to zero. | |
| double | avg_cycles () const |
| Return the average ticks per start/stop pair. | |
Public Attributes | |
| unsigned long long | start_cycles |
| unsigned long long | total_cycles = 0 |
| unsigned long long | runs = 0 |
Hardware cycle counter for AArch64/ARM.
Reads the virtual count register (cntvct_el0) via inline assembly. Note that this returns timer ticks, not raw CPU cycles — the tick frequency is given by cntfrq_el0.
|
inline |
Return the average ticks per start/stop pair.
|
inlinenoexcept |
Reset accumulated ticks and run count to zero.
|
inlinenoexcept |
Record the starting tick count.
|
inlinenoexcept |
Record the ending tick count and accumulate.
| unsigned long long detail::CycleCounterArm::runs = 0 |
| unsigned long long detail::CycleCounterArm::start_cycles |
| unsigned long long detail::CycleCounterArm::total_cycles = 0 |