43 #include "Teuchos_GlobalMPISession.hpp" 44 #include "Kokkos_Core.hpp" 45 #include "Tpetra_Details_checkLaunchBlocking.hpp" 56 if (! Kokkos::is_initialized ()) {
57 std::vector<std::string> args = Teuchos::GlobalMPISession::getArgv ();
58 int narg =
static_cast<int> (args.size ());
60 std::vector<char*> args_c (narg);
61 for (
int k = 0; k < narg; ++k) {
65 args_c[k] =
const_cast<char*
> (args[k].c_str ());
67 Kokkos::initialize (narg, narg == 0 ?
nullptr : args_c.data ());
68 checkOldCudaLaunchBlocking();
69 std::atexit (Kokkos::finalize_all);
Namespace Tpetra contains the class and methods constituting the Tpetra library.
Implementation details of Tpetra.
Declaration of Tpetra::Details::initializeKokkos.
void initializeKokkos()
Initialize Kokkos, using command-line arguments (if any) given to Teuchos::GlobalMPISession.