is_finalized¶
Defined in header <Kokkos_Core.hpp>
Interface¶
-
bool is_finalized() noexcept¶
Queries the finalization status of Kokkos and returns
trueif Kokkos is finalized andfalseif Kokkos is not finalized. This function can be called prior or after Kokkos initialization or finalization.- Returns:
trueiffinalize()has been called; false otherwise.
Examples¶
#include <Kokkos_Core.hpp>
#include <cassert>
int main(int argc, char* argv[]) {
assert(!Kokkos::is_finalized());
Kokkos::initialize(argc, argv);
assert(!Kokkos::is_finalized());
Kokkos::finalize();
assert(Kokkos::is_finalized());
}
See also
- Kokkos::InitializationSettings
Define the settings for initializing Kokkos programmatically.
- Kokkos::ScopeGuard
A class to initialize and finalize Kokkos using RAII.