General Settings¶
The macros on this page describe how Kokkos was configured. Each one is defined when the corresponding CMake option is enabled (see Relationship with CMake configuration options).
Debugging¶
Macro |
Description |
|---|---|
|
Extra debug features are activated. |
|
Extra bounds checks are enabled. |
Kokkos applies these checks itself, so they are mostly informational. See Debugging in the Configuration Guide for the corresponding options.
Deprecated code¶
Macro |
Description |
|---|---|
|
Features deprecated in major release |
|
Deprecated features generate deprecation warnings. |
KOKKOS_ENABLE_DEPRECATED_CODE_<N> is useful for code that must build with several
Kokkos versions:
#include <Kokkos_Core.hpp>
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE_4
// Kokkos 4.x deprecated features are still available
#endif
Tuning and performance¶
Macro |
Description |
|---|---|
|
Bindings for tuning tools are available (see #2422). |
|
Certain dependency assumptions are ignored for aggressive vectorization of internal Kokkos loops. |
|
Complex types are aligned. This macro has no documented CMake option. |
C++ Standard¶
Exactly one macro is defined, matching the C++ standard Kokkos was compiled with. Applications should compile with the same standard (and the same compiler) as Kokkos, so most code has no need to test these macros.
Macro |
Description |
Note |
|---|---|---|
|
Kokkos was compiled with the C++17 language standard. |
Removed in Kokkos 5.0 |
|
Kokkos was compiled with the C++20 language standard. |
|
|
Kokkos was compiled with the C++23 language standard. |
|
|
Kokkos was compiled with the C++26 language standard. |
Third-Party Libraries¶
These macros give information about what third-party libraries Kokkos was compiled with.
They correspond to the Kokkos_ENABLE_<TPL> options listed under
Third-Party Libraries (TPLs) in the Configuration Guide.
Macro |
Description |
|---|---|
|
libhwloc is enabled for NUMA and architecture information. |
|
Kokkos links to the dynamic linker (libdl). |
|
Kokkos links to the GCC Quad-Precision Math Library API. |
|
Kokkos links to the oneDPL library when using the SYCL backend.
Enabling this TPL might affect performance for Kokkos algorithms that use it, e.g., |
|
Kokkos links to the rocThrust library when using the HIP backend.
Enabling this TPL might affect performance for Kokkos algorithms that use it, e.g., |