 |
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(...)
28#elif defined(GPUCA_STANDALONE) && !defined(GPUCA_GPUCODE_DEVICE) && !defined(GPUCA_NO_FMT)
30 #include <fmt/printf.h>
31 #define GPUInfo(string, ...) \
33 fmt::printf(string "\n", ##__VA_ARGS__); \
35 #define GPUImportant(...) GPUInfo(__VA_ARGS__)
36 #define GPUWarning(string, ...) \
38 fmt::fprintf(stderr, string "\n", ##__VA_ARGS__); \
40 #define GPUError(...) GPUWarning(__VA_ARGS__)
41 #define GPUAlarm(...) GPUWarning(__VA_ARGS__)
42 #define GPUFatal(string, ...) \
44 fmt::fprintf(stderr, string "\n", ##__VA_ARGS__); \
45 throw std::exception(); \
47#elif defined(GPUCA_STANDALONE) || defined(GPUCA_GPUCODE_DEVICE)
50 #define GPUInfo(string, ...) \
52 printf(string "\n", ##__VA_ARGS__); \
54 #define GPUImportant(...) GPUInfo(__VA_ARGS__)
55 #ifdef GPUCA_GPUCODE_DEVICE
56 #define GPUWarning(...) GPUInfo(__VA_ARGS__)
57 #define GPUAlarm(...) GPUInfo(__VA_ARGS__)
58 #define GPUError(...) GPUInfo(__VA_ARGS__)
59 #define GPUFatal(...) GPUInfo(__VA_ARGS__)
61 #define GPUWarning(string, ...) \
63 fprintf(stderr, string "\n", ##__VA_ARGS__); \
65 #define GPUAlarm(...) GPUWarning(__VA_ARGS__)
66 #define GPUError(...) GPUWarning(__VA_ARGS__)
67 #define GPUFatal(string, ...) \
69 fprintf(stderr, string "\n", __VA_ARGS__); \
73#elif defined(GPUCA_O2_LIB) || defined(GPUCA_O2_INTERFACE)
76 #define GPUInfo(...) LOGF(info, __VA_ARGS__)
77 #define GPUImportant(...) LOGF(info, __VA_ARGS__)
78 #define GPUWarning(...) LOGF(warning, __VA_ARGS__)
79 #define GPUAlarm(...) LOGF(alarm, __VA_ARGS__)
80 #define GPUError(...) LOGF(error, __VA_ARGS__)
81 #define GPUFatal(...) LOGF(fatal, __VA_ARGS__)