ONE - On-device Neural Engine
Loading...
Searching...
No Matches
logging.h File Reference
#include <iostream>
#include <cstring>
#include "util/ConfigSource.h"

Go to the source code of this file.

Data Structures

class  onert::util::logging::Context
 

Namespaces

namespace  onert
 
namespace  onert::util
 
namespace  onert::util::logging
 

Macros

#define VERBOSE(name)
 
#define VERBOSE_F()
 
#define WHEN_LOG_ENABLED(METHOD)
 
#define MEASURE_TIME_START(name)
 
#define MEASURE_TIME_END(name)
 

Functions

std::string onert::util::logging::decorated_name (const char *input)
 

Macro Definition Documentation

◆ MEASURE_TIME_END

#define MEASURE_TIME_END (   name)
Value:
auto end_##name = std::chrono::steady_clock::now(); \
auto dur_##name = \
std::chrono::duration_cast<std::chrono::microseconds>(end_##name - beg_##name); \
if (::onert::util::logging::ctx.enabled()) \
std::cout << ::onert::util::logging::decorated_name(__func__) << #name \
<< " time = " << dur_##name.count() << std::endl; \
} \
while (0)
std::string decorated_name(const char *input)
Definition logging.h:56

Definition at line 91 of file logging.h.

◆ MEASURE_TIME_START

#define MEASURE_TIME_START (   name)
Value:
do \
{ \
auto beg_##name = std::chrono::steady_clock::now()

Definition at line 86 of file logging.h.

88 { \
89 auto beg_##name = std::chrono::steady_clock::now()

◆ VERBOSE

#define VERBOSE (   name)
Value:
if (::onert::util::logging::ctx.enabled()) \

Definition at line 71 of file logging.h.

◆ VERBOSE_F

#define VERBOSE_F ( )
Value:
if (::onert::util::logging::ctx.enabled()) \

Definition at line 75 of file logging.h.

◆ WHEN_LOG_ENABLED

#define WHEN_LOG_ENABLED (   METHOD)
Value:
if (::onert::util::logging::ctx.enabled()) \
do \
{ \
METHOD; \
} while (0)

Definition at line 79 of file logging.h.

82 { \
83 METHOD; \
84 } while (0)