4#include <cuda_runtime.h>
5#include <cuda_runtime_api.h>
9template <
typename InType,
typename OutType = InType>
10MUDA_INLINE MUDA_GENERIC OutType print_convert(
const InType& v)
15MUDA_INLINE MUDA_GENERIC
auto print_convert(
const char* v)
21MUDA_INLINE MUDA_GENERIC
const T& print_check(
const T& t)
23 static_assert(std::is_arithmetic_v<T> || std::is_pointer_v<T>
24 || std::is_same_v<T, std::nullptr_t>,
25 "not supported type T in printf!");
29MUDA_INLINE MUDA_GENERIC
auto print_check(
const char* t)
34template <
typename... Args>
35MUDA_INLINE MUDA_GENERIC
void print(
const char*
const fmt, Args&&... arg)
37 ::printf(fmt, print_check(print_convert(std::forward<Args>(arg)))...);