What is Kokkos?
Kokkos is a C++ library for writing hardware-agnostic parallel code with a user-friendly interface. Kokkos supports host parallelism with OpenMP and device parallelism on graphical processing units (GPU).
Why use Kokkos?
Writing code that can be run in parallel is advantageous because it offers massive speedups compared to code that can only be run serially. However, writing parallel code is non-trivial, difficult to optimize, and varies syntactically depending on whether you are programming for host parallelism (OpenMP), device parallelism on a NVIDIA GPU (CUDA), or device parallelism on an AMD GPU (ROCm). Kokkos offers data structures and functions that allow the programmer to write c++ code that can be run in parallel without knowledge of the parallel backend. At compile time the code is converted to be run on the correct backend. The most common data structures and functions used in Kokkos are covered in the next page.
Kokkos has extensive documentation and is actively in development on GitHub. The information in the next pages should be used as a starting point for programming with Kokkos. For more advanced details, refer to the Kokkos documentation.