Toggle table of contents sidebar
finalize
¶
Defined in header <Kokkos_Core.hpp>
Usage:
Terminates the Kokkos execution environment. This functions cleans up all Kokkos states and released the associated resources. Once this function is called, no Kokkos API functions (not even Kokkos::initialize) may be called, except for Kokkos::is_initialized
or Kokkos::is_finalized
. The user must ensure that all Kokkos objects (e.g. Kokkos::View
) are destroyed before Kokkos::finalize
gets called.
Programs are ill-formed if they do not call this function after calling Kokkos::initialize.
Interface¶ Requirements¶Kokkos::finalize
must be called before MPI_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 calling Kokkos::finalize
#include <Kokkos_Core.hpp> int main(int argc, char* argv[]) { Kokkos::initialize(argc, argv); { // scope to ensure that my_view destructor is called before Kokkos::finalize Kokkos::View<double*> my_view("my_view", 10); } // scope of my_view ends here Kokkos::finalize(); }See also¶
Kokkos::initialize: initializes the Kokkos execution environment
Kokkos::push_finalize_hook: registers a function to be called on Kokkos::finalize()
invocation
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4