The Klang debug interface.
More...
#include <klang.h>
|
template<typename Func , typename... Args> |
static double | profile (Func func, Args... args) |
|
template<typename Func , typename... Args> |
static double | profile (int times, Func func, Args... args) |
|
Definition at line 2230 of file klang.h.
◆ getText()
int klang::Debug::getText |
( |
char * | buffer | ) |
|
|
inline |
◆ hasText()
bool klang::Debug::hasText |
( |
| ) |
const |
|
inline |
◆ input() [1/3]
void klang::Debug::input |
( |
| ) |
|
|
inlineoverridevirtual |
◆ input() [2/3]
◆ input() [3/3]
◆ operator const signal &()
klang::Debug::operator const signal & |
( |
| ) |
const |
|
inline |
◆ operator<<()
◆ print()
void klang::Debug::print |
( |
const char * | format, |
|
|
| ... ) |
|
inline |
◆ printOnce()
void klang::Debug::printOnce |
( |
const char * | format, |
|
|
| ... ) |
|
inline |
◆ profile() [1/2]
template<typename Func , typename... Args>
static double klang::Debug::profile |
( |
Func | func, |
|
|
Args... | args ) |
|
inlinestatic |
Definition at line 2300 of file klang.h.
2300 {
2301 using namespace std::chrono;
2302
2303 auto start = high_resolution_clock::now();
2304 func(args...);
2305 auto end = high_resolution_clock::now();
2306
2307 auto duration = duration_cast<nanoseconds>(end - start).count();
2308 return (double)duration;
2309 }
◆ profile() [2/2]
template<typename Func , typename... Args>
static double klang::Debug::profile |
( |
int | times, |
|
|
Func | func, |
|
|
Args... | args ) |
|
inlinestatic |
Definition at line 2312 of file klang.h.
2312 {
2313 double sum = 0;
2314 while (times--) {
2315 sum +=
profile(func, args...);
2316 }
2317 return sum / 1000000.0;
2318 }
static double profile(Func func, Args... args)
◆ buffer
◆ console
◆ in