This repository has been archived by the owner on Apr 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Kokkos::finalize
Jeff Miles edited this page May 1, 2020
·
1 revision
Header File: Kokkos_Core.hpp
Shut down all enabled Kokkos backends and free all associated resources. This function should be called after calling all other Kokkos API functions, including Kokkos object destructors.
Programs are ill-formed if they do not call this function after calling Kokkos::initialize
.
Usage:
Kokkos::finalize();
Kokkos::finalize();
- None
-
Kokkos::finalize
must be called beforeMPI_Finalize
if Kokkos is used in an MPI context. -
Kokkos::finalize
must be called after user initialized Kokkos objects are out of scope.
-
Kokkos::is_initialized()
should return false after callingKokkos::finalize
int main(int argc, char** argv) {
Kokkos::initialize(argc, argv);
// add scoping to ensure my_view destructor is called before Kokkos::finalize
{
Kokkos::View<double*> my_view("my_view", 10);
}
Kokkos::finalize();
}
Home:
- Introduction
- Machine Model
- Programming Model
- Compiling
- Initialization
- View
- Parallel Dispatch
- Hierarchical Parallelism
- Custom Reductions
- Atomic Operations
- Subviews
- Interoperability
- Kokkos and Virtual Functions
- Initialization and Finalization
- View
- Data Parallelism
- Execution Policies
- Spaces
- Task Parallelism
- Utilities
- STL Compatibility
- Numerics
- Detection Idiom