Skip to content

Commit

Permalink
fixed formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelyr committed Nov 15, 2024
1 parent 2e91445 commit 3527f47
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions support/ppPrint.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#ifdef SPDLOG_ENABLED
#include "spdlog/spdlog.h"
#include <spdlog/fmt/bundled/printf.h>
#endif

#include <Kokkos_Core.hpp>
Expand All @@ -15,7 +16,7 @@ namespace pumipic {
template<typename... Args>
void pPrintError(const char* fmt, const Args&... args) {
#if defined(SPDLOG_ENABLED) && defined(PP_PRINT_ENABLED)
spdlog::error(fmt, args...);
spdlog::error("{}", fmt::sprintf(fmt, args...));
#elif defined(PP_PRINT_ENABLED)
fprintf(stderr, fmt, args...);
#endif
Expand All @@ -25,7 +26,7 @@ namespace pumipic {
__host__ __device__
void pPrintInfo(const char* fmt, const Args&... args) {
#if defined(SPDLOG_ENABLED) && defined(PP_PRINT_ENABLED) && !defined(ACTIVE_GPU_EXECUTION)
spdlog::info(fmt, args...);
spdlog::info("{}", fmt::sprintf(fmt, args...));
#elif defined(PP_PRINT_ENABLED)
Kokkos::printf(fmt, args...);
#endif
Expand Down

0 comments on commit 3527f47

Please sign in to comment.