 |
Project
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
20#if defined(GPUCA_GPUCODE_DEVICE) && !defined(GPUCA_GPU_DEBUG_PRINT)
23 #define GPUImportant(...)
24 #define GPUWarning(...)
27 #define GPUCritical(...)
29#elif defined(GPUCA_STANDALONE) && !defined(GPUCA_GPUCODE_DEVICE) && !defined(GPUCA_NO_FMT)
31 #pragma GCC diagnostic push
32 #if defined(__FAST_MATH__) && defined(__clang__)
33 #pragma GCC diagnostic ignored "-Wnan-infinity-disabled"
35 #include <fmt/printf.h>
36 #pragma GCC diagnostic pop
37 #define GPUInfo(string, ...) \
39 fmt::printf(string "\n", ##__VA_ARGS__); \
41 #define GPUImportant(...) GPUInfo(__VA_ARGS__)
42 #define GPUWarning(string, ...) \
44 fmt::fprintf(stderr, string "\n", ##__VA_ARGS__); \
46 #define GPUError(...) GPUWarning(__VA_ARGS__)
47 #define GPUCritical(...) GPUWarning(__VA_ARGS__)
48 #define GPUAlarm(...) GPUWarning(__VA_ARGS__)
49 #define GPUFatal(string, ...) \
51 fmt::fprintf(stderr, string "\n", ##__VA_ARGS__); \
52 throw std::exception(); \
54#elif defined(GPUCA_STANDALONE) || defined(GPUCA_GPUCODE_DEVICE)
57 #define GPUInfo(string, ...) \
59 printf(string "\n", ##__VA_ARGS__); \
61 #define GPUImportant(...) GPUInfo(__VA_ARGS__)
62 #ifdef GPUCA_GPUCODE_DEVICE
63 #define GPUWarning(...) GPUInfo(__VA_ARGS__)
64 #define GPUAlarm(...) GPUInfo(__VA_ARGS__)
65 #define GPUError(...) GPUInfo(__VA_ARGS__)
66 #define GPUFatal(...) GPUInfo(__VA_ARGS__)
68 #define GPUWarning(string, ...) \
70 fprintf(stderr, string "\n", ##__VA_ARGS__); \
72 #define GPUAlarm(...) GPUWarning(__VA_ARGS__)
73 #define GPUError(...) GPUWarning(__VA_ARGS__)
74 #define GPUCritical(...) GPUWarning(__VA_ARGS__)
75 #define GPUFatal(string, ...) \
77 fprintf(stderr, string "\n", ##__VA_ARGS__); \
81#elif defined(GPUCA_O2_LIB) || defined(GPUCA_O2_INTERFACE)
84 #define GPUInfo(...) LOGF(info, __VA_ARGS__)
85 #define GPUImportant(...) LOGF(info, __VA_ARGS__)
86 #define GPUWarning(...) LOGF(warning, __VA_ARGS__)
87 #define GPUAlarm(...) LOGF(alarm, __VA_ARGS__)
88 #define GPUError(...) LOGF(error, __VA_ARGS__)
89 #define GPUCritical(...) LOGF(critical, __VA_ARGS__)
90 #define GPUFatal(...) LOGF(fatal, __VA_ARGS__)