29 #define PLUGIN_PREFIX "OPTIX_6_ENGINE "
30 #define PROGRESS_BAR_SIZE 50
32 #define PLUGIN_ERROR(message) std::cerr << "E [" << PLUGIN_PREFIX << "] " << message << std::endl;
33 #define PLUGIN_WARN(message) std::cerr << "W [" << PLUGIN_PREFIX << "] " << message << std::endl;
34 #define PLUGIN_INFO(message) std::cout << "I [" << PLUGIN_PREFIX << "] " << message << std::endl;
37 #define PLUGIN_DEBUG(message)
39 #define PLUGIN_DEBUG(message) std::cout << "D [" << PLUGIN_PREFIX << "] " << message << std::endl;
42 #define PLUGIN_TIMER(__time, __msg) \
43 std::cout << "T [" << PLUGIN_PREFIX << "] [" << __time << "] " << __msg << std::endl;
45 #define PLUGIN_THROW(message) \
47 throw std::runtime_error(message); \
50 #define PLUGIN_PROGRESS(__msg, __progress, __maxValue) \
52 std::cout << "I [" << PLUGIN_PREFIX << "] ["; \
53 const float __mv = float(__maxValue); \
54 const float __p = float(__progress + 1); \
55 const uint32_t __pos = std::min(PROGRESS_BAR_SIZE, int(__p / __mv * PROGRESS_BAR_SIZE)); \
56 for (uint32_t __i = 0; __i < PROGRESS_BAR_SIZE; ++__i) \
60 else if (__i == __pos) \
65 std::cout << "] " << std::min(__pos * 2, uint32_t(PROGRESS_BAR_SIZE * 2)) << "% " << __msg << "\r"; \