Sleipnir C++ API
Loading...
Searching...
No Matches
slp::TimeTracerIndex< Entries > Class Template Reference

#include </home/runner/work/Sleipnir/Sleipnir/include/sleipnir/util/time_tracer.hpp>

Public Types

using ID = decltype(Entries[0].id)
 Time tracer ID enum type.
 

Public Member Functions

consteval TimeTracerIndex (ID id)
 
constexpr size_t value () const
 

Detailed Description

template<const auto & Entries>
requires (detail::is_valid_time_trace(Entries))
class slp::TimeTracerIndex< Entries >

Index of a tracer in a time trace, found at compile time.

Template Parameters
EntriesTime trace entries.

Constructor & Destructor Documentation

◆ TimeTracerIndex()

template<const auto & Entries>
consteval slp::TimeTracerIndex< Entries >::TimeTracerIndex ( ID  id)
inline

Finds the given tracer ID in the time trace.

This is implicit so TimeTracerTree::operator[] can take a tracer ID. An ID that isn't in the time trace is a compile error.

Parameters
idTime tracer ID.

Member Function Documentation

◆ value()

template<const auto & Entries>
constexpr size_t slp::TimeTracerIndex< Entries >::value ( ) const
inlineconstexpr

Returns the tracer's index in the time trace.

Returns
The tracer's index in the time trace.

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