Is there a replacement for printf in a kernel #389
Answered
by
eyalroz
EmmanuelMess
asked this question in
Q&A
-
I think I missed how to print from a kernel, so I have just been using |
Beta Was this translation helpful? Give feedback.
Answered by
eyalroz
Jul 23, 2022
Replies: 1 comment 2 replies
-
That would be a device-side facility, while this is a host-side library. I had toyed with a cout-like stream in my cuda-kat library, but the implementation I had was incredibly slow to compile. For now, we have my additionals for this issue, which provides more of the C standard library's printf functionality, but can also serve as a basis for a stream-like facility; or better yet, an std::format / fmt::format-like function. Are you sure you like the former rather than the latter? |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
EmmanuelMess
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That would be a device-side facility, while this is a host-side library. I had toyed with a cout-like stream in my cuda-kat library, but the implementation I had was incredibly slow to compile. For now, we have my additionals for this issue, which provides more of the C standard library's printf functionality, but can also serve as a basis for a stream-like facility; or better yet, an std::format / fmt::format-like function.
Are you sure you like the former rather than the latter?