A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://kokkos.github.io/kokkos-core-wiki/API/core/utilities/printf.html below:

Kokkos::printf - Kokkos documentation

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.

Example
#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

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