11#include "Teuchos_GlobalMPISession.hpp"
12#include "Kokkos_Core.hpp"
13#include "Tpetra_Details_checkLaunchBlocking.hpp"
22void finalizeKokkosIfNeeded() {
23 if(!Kokkos::is_finalized()) {
31 if (! Kokkos::is_initialized ()) {
32 std::vector<std::string>
args = Teuchos::GlobalMPISession::getArgv ();
33 int narg =
static_cast<int> (
args.size ());
36 std::vector<std::unique_ptr<char[]>>
args_;
37 for (
auto const&
x :
args) {
38 args_.emplace_back(
new char[
x.size() + 1]);
46 checkOldCudaLaunchBlocking();
48 std::atexit (finalizeKokkosIfNeeded);
52 Tpetra::Details::AddKokkosDeepCopyToTimeMonitor();
53 Tpetra::Details::AddKokkosFenceToTimeMonitor();
54 Tpetra::Details::AddKokkosFunctionsToTimeMonitor();
Declaration functions that use Kokkos' profiling library to add deep copies between memory spaces,...
Declaration of Tpetra::Details::initializeKokkos.
Struct that holds views of the contents of a CrsMatrix.
Implementation details of Tpetra.
void initializeKokkos()
Initialize Kokkos, using command-line arguments (if any) given to Teuchos::GlobalMPISession.
Namespace Tpetra contains the class and methods constituting the Tpetra library.