11#include "Teuchos_GlobalMPISession.hpp"
12#include "Kokkos_Core.hpp"
13#include "Tpetra_Details_checkLaunchBlocking.hpp"
22void finalizeKokkosIfNeeded() {
23 if (!Kokkos::is_finalized()) {
29 if (!Kokkos::is_initialized()) {
30 std::vector<std::string>
args = Teuchos::GlobalMPISession::getArgv();
31 int narg =
static_cast<int>(
args.size());
34 std::vector<std::unique_ptr<char[]>>
args_;
35 for (
auto const&
x :
args) {
36 args_.emplace_back(
new char[
x.size() + 1]);
44 checkOldCudaLaunchBlocking();
46 std::atexit(finalizeKokkosIfNeeded);
49 Tpetra::Details::AddKokkosDeepCopyToTimeMonitor();
50 Tpetra::Details::AddKokkosFenceToTimeMonitor();
51 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.