Unravel Engine C++ Reference
Loading...
Searching...
No Matches
unravel::thread_profile_data Struct Reference

Double-buffered per-thread profiling state. One buffer is being written by the owning thread while the other is read by the main thread for display and aggregation. More...

#include <profiler.h>

Public Member Functions

auto write_buffer () -> thread_profile_buffer &
 
auto read_buffer () -> thread_profile_buffer &
 
void flip ()
 

Public Attributes

std::array< thread_profile_buffer, 2 > buffers {}
 
std::atomic< uint32_t > write_idx {0}
 

Detailed Description

Double-buffered per-thread profiling state. One buffer is being written by the owning thread while the other is read by the main thread for display and aggregation.

Definition at line 179 of file profiler.h.

Member Function Documentation

◆ flip()

void unravel::thread_profile_data::flip ( )
inline

Definition at line 187 of file profiler.h.

◆ read_buffer()

auto unravel::thread_profile_data::read_buffer ( ) -> thread_profile_buffer&
inline

Definition at line 185 of file profiler.h.

◆ write_buffer()

auto unravel::thread_profile_data::write_buffer ( ) -> thread_profile_buffer&
inline

Definition at line 184 of file profiler.h.

Member Data Documentation

◆ buffers

std::array<thread_profile_buffer, 2> unravel::thread_profile_data::buffers {}

Definition at line 181 of file profiler.h.

◆ write_idx

std::atomic<uint32_t> unravel::thread_profile_data::write_idx {0}

Definition at line 182 of file profiler.h.


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