Is there a replacement for printf in a kernel #389
-
I think I missed how to print from a kernel, so I have just been using |
Beta Was this translation helpful? Give feedback.
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.
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?