Sound Byte Libs 29c5ff3
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
sbl::profiling::CycleScope Struct Reference

#include <dwt.hpp>

Collaboration diagram for sbl::profiling::CycleScope:

Public Member Functions

 CycleScope (volatile uint32_t &out)
 
 ~CycleScope ()
 

Public Attributes

uint32_t start_
 
volatile uint32_t & result_
 

Detailed Description

RAII scope for measuring a block of code. Usage: volatile uint32_t elapsed; { CycleScope s(elapsed); /* code *‍/ }

Definition at line 53 of file dwt.hpp.

Constructor & Destructor Documentation

◆ CycleScope()

sbl::profiling::CycleScope::CycleScope ( volatile uint32_t &  out)
inlineexplicit

Definition at line 57 of file dwt.hpp.

◆ ~CycleScope()

sbl::profiling::CycleScope::~CycleScope ( )
inline

Definition at line 59 of file dwt.hpp.

References sbl::profiling::cycles(), result_, and start_.

Here is the call graph for this function:

Member Data Documentation

◆ result_

volatile uint32_t& sbl::profiling::CycleScope::result_

Definition at line 55 of file dwt.hpp.

Referenced by ~CycleScope().

◆ start_

uint32_t sbl::profiling::CycleScope::start_

Definition at line 54 of file dwt.hpp.

Referenced by ~CycleScope().


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