MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
maia::debug::Tracer Struct Reference

#include <debug.h>

Collaboration diagram for maia::debug::Tracer:
[legend]

Public Member Functions

 Tracer (const MString &fun, const MString &loc, const MInt timingId, const MBool profile=false)
 
 ~Tracer ()
 

Private Attributes

const MInt m_timingId = -1
 
const MString m_fun {}
 
const MBool m_profile = false
 

Detailed Description

Definition at line 248 of file debug.h.

Constructor & Destructor Documentation

◆ Tracer()

maia::debug::Tracer::Tracer ( const MString fun,
const MString loc,
const MInt  timingId,
const MBool  profile = false 
)
inline

Definition at line 249 of file debug.h.

250 : m_timingId(timingId), m_fun(fun), m_profile(profile) {
251#ifdef MAIA_PROFILING
252 if(profile) {
253 PROFILE(timingId, fun, MAIA_DEBUG_TRACE_IN);
254 } else {
255 DEBUG(fun + " entry (" + loc + ")", MAIA_DEBUG_TRACE_IN);
256 }
257#else
258 DEBUG(fun + " entry (" + loc + ")", MAIA_DEBUG_TRACE_IN);
259#endif
260 }
const MInt m_timingId
Definition: debug.h:274
const MBool m_profile
Definition: debug.h:276
const MString m_fun
Definition: debug.h:275

◆ ~Tracer()

maia::debug::Tracer::~Tracer ( )
inline

Definition at line 261 of file debug.h.

261 {
262#ifdef MAIA_PROFILING
263 if(m_profile) {
264 PROFILE(m_timingId, m_fun, MAIA_DEBUG_TRACE_OUT);
265 } else {
266 DEBUG(m_fun << " return", MAIA_DEBUG_TRACE_OUT);
267 }
268#else
269 DEBUG(m_fun << " return", MAIA_DEBUG_TRACE_OUT);
270#endif
271 }

Member Data Documentation

◆ m_fun

const MString maia::debug::Tracer::m_fun {}
private

Definition at line 275 of file debug.h.

◆ m_profile

const MBool maia::debug::Tracer::m_profile = false
private

Definition at line 276 of file debug.h.

◆ m_timingId

const MInt maia::debug::Tracer::m_timingId = -1
private

Definition at line 274 of file debug.h.


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