Utilities

Error Handling and Diagnostics

Kokkos provides utility functions for error handling, debugging, and output that work consistently across host and device code.

abort

Terminates the program immediately with an error message.

KOKKOS_ASSERT

Aborts the program if the user-specified condition is not true. Behavior depends on NDEBUG and KOKKOS_ENABLE_DEBUG macros.

printf

Prints formatted output to the standard output stream.

Other