Skip to content

Commit

Permalink
AMREX_DEVICE_PRINTF: Host
Browse files Browse the repository at this point in the history
In AMReX, device means host if compiled for CPUs.
Add support for printf debugging on CPUs for `AMREX_DEVICE_PRINTF`.
  • Loading branch information
ax3l committed Aug 28, 2024
1 parent 12002e7 commit da91c76
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Src/Base/AMReX_GpuPrint.H
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
# define AMREX_DEVICE_PRINTF(...) std::printf(__VA_ARGS__);
#elif defined(AMREX_USE_HIP)
# define AMREX_DEVICE_PRINTF(...) ::printf(__VA_ARGS__);
#else
# define AMREX_DEVICE_PRINTF(format,...) { \
std::printf(format, __VA_ARGS__); }
#endif

#endif // !defined(__APPLE__)
Expand Down

0 comments on commit da91c76

Please sign in to comment.