- Cudaprintfinit and Cudaprintfend only need to be called once in your entire project's use. The display results are not automatically displayed on the screen, but are stored in the cache and are cleared and displayed when Cudaprintfdisplay is called. The size of this cache can be specified by the optional parameters of the function cudaprintfinit (size_t bufferlen).
- Cudaprintfend simply frees up the storage space requested by Cudaprintfinit. When Cudaprintfdisplay is called, it is stored in cache buffer.the outputOutputwill be displayed in the controlsystem tableConsole. The second parameter in this call is used to control the display (true) Current threadThreadstill not show (false). The first parameter, in this example, is specified as astdout, used to definecuprintfthe log fileLogbe sent to where (stdoutstandard output).
- Another area to be aware of is that I have found that using cuprintf affects my kernels performance, presumably because each call to cuprintf will perform the data "transfer" Data Transfer .
Above from "Cuprintf.cuh"
Cuda cudaprintf Use