Toggle table of contents sidebar
Kokkos::printf
¶
Defined in header <Kokkos_Printf.hpp>
which is included from <Kokkos_Core.hpp>
template <typename... Args> KOKKOS_FUNCTION void printf(const char* format, Args... args); // (since 4.2)
Prints the data specified in format
and args...
to stdout
. The behavior is analogous to std::printf
, but the return type is void
to ensure a consistent behavior across backends.
#include <Kokkos_Core.hpp> int main(int argc, char* argv[]) { Kokkos::initialize(argc, argv); Kokkos::parallel_for(4, KOKKOS_LAMBDA(int i) { Kokkos::printf("hello world from thread %d\n", i); }); Kokkos::finalize(); }Notes¶
The Kokkos::printf()
function was added in release 4.2
Calling Kokkos::printf()
from a kernel may affect register usage and affect performance.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4