Xpetra Version of the Day
Loading...
Searching...
No Matches
Xpetra_MpiPlatform.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Xpetra: A linear algebra interface package
4//
5// Copyright 2012 NTESS and the Xpetra contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef XPETRA_MPIPLATFORM_HPP
11#define XPETRA_MPIPLATFORM_HPP
12
14#include <Teuchos_Describable.hpp>
15#include <Tpetra_KokkosCompat_DefaultNode.hpp>
16
17#include "Xpetra_ConfigDefs.hpp"
18
19namespace Xpetra {
20
22
27template <class Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
29 public:
31 typedef Node NodeType;
33
34
36 explicit MpiPlatform(Teuchos::RCP<Node> node);
37
40
43
45
47
48
51
53
54 private:
56 MpiPlatform(const MpiPlatform<Node> &platform);
57};
58
59template <class Node>
61 : comm_(Teuchos::createMpiComm<int>(rawMpiComm)) {}
62
63template <class Node>
65 : comm_(Teuchos::createMpiComm<int>(Teuchos::opaqueWrapper<MPI_Comm>(MPI_COMM_WORLD))) {} // CHECK: ALLOW MPI_COMM_WORLD
66
67template <class Node>
69
70template <class Node>
72 comm_ = platform.comm_;
73}
74
75template <class Node>
78 return comm_;
79}
80
81} // namespace Xpetra
82
83#endif // XPETRA_MPIPLATFORM_HPP
A implementation of the Platform class for MPI-based platforms.
Node NodeType
Typedef indicating the node type over which the platform is templated. This default to the Kokkos def...
MpiPlatform(Teuchos::RCP< Node > node)
Constructor.
Teuchos::RCP< Teuchos::MpiComm< int > > comm_
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
Comm Instance.