tesseract++ 0.0.1
N-dimensional tensor library for embedded systems
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
detail::CycleCounterArm Struct Reference

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
 

Detailed Description

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.

Member Function Documentation

◆ avg_cycles()

double detail::CycleCounterArm::avg_cycles ( ) const
inline

Return the average ticks per start/stop pair.

◆ reset()

void detail::CycleCounterArm::reset ( )
inlinenoexcept

Reset accumulated ticks and run count to zero.

◆ start()

FORCE_INLINE void detail::CycleCounterArm::start ( )
inlinenoexcept

Record the starting tick count.

◆ stop()

FORCE_INLINE void detail::CycleCounterArm::stop ( )
inlinenoexcept

Record the ending tick count and accumulate.

Member Data Documentation

◆ runs

unsigned long long detail::CycleCounterArm::runs = 0

◆ start_cycles

unsigned long long detail::CycleCounterArm::start_cycles

◆ total_cycles

unsigned long long detail::CycleCounterArm::total_cycles = 0

The documentation for this struct was generated from the following file: