15#ifndef GPUCOMMONFAIRLOGGER_H
16#define GPUCOMMONFAIRLOGGER_H
19#ifndef GPUCA_GPUCODE_DEVICE
25#if defined(GPUCA_GPUCODE_DEVICE)
27 template <
typename... Args>
28 GPUd() DummyLogger& operator<<(Args... args)
34template <
typename... Args>
51#ifdef GPUCA_GPUCODE_DEVICE
54#if defined(__OPENCL__) || !defined(GPUCA_GPU_DEBUG_PRINT)
55#define LOG(...) o2::gpu::internal::DummyLogger()
60#define LOG(...) o2::gpu::internal::DummyLogger()
62#define LOGF(type, string, ...) do { if (o2::gpu::internal::loglevel::type >= o2::gpu::internal::loglevel::info) { printf(string "\n", ##__VA_ARGS__); }} while (false);
68#elif defined(GPUCA_STANDALONE) || defined(GPUCA_GPUCODE_COMPILEKERNELS) || defined(GPUCA_COMPILEKERNELS)
73#define LOG(type) std::cout
74#define LOGF(type, string, ...) do { if (o2::gpu::internal::loglevel::type >= o2::gpu::internal::loglevel::info) { printf(string "\n", ##__VA_ARGS__); }} while (false);
75#if !defined(GPUCA_NO_FMT) && !defined(GPUCA_GPUCODE)
76#define LOGP(type, string, ...) do { if (o2::gpu::internal::loglevel::type >= o2::gpu::internal::loglevel::info) { fmt::print(string, ##__VA_ARGS__); printf("\n"); }} while (false);
78#define LOGP(type, string, ...) do { if (o2::gpu::internal::loglevel::type >= o2::gpu::internal::loglevel::info) { o2::gpu::internal::LOGP_internal(string, ##__VA_ARGS__); }} while (false);
80#if defined(GPUCA_STANDALONE) && !defined(GPUCA_GPUCODE)
81#if !defined(GPUCA_NO_FMT)
82#include <fmt/format.h>
86template <
typename... Args>
87static const char*
format(Args... args)
GLint GLint GLsizei GLint GLenum format
void LOGP_internal(const char *str, Args... args)