Xpetra
Version of the Day
Loading...
Searching...
No Matches
Xpetra_DefaultPlatform.cpp
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
#include "
Xpetra_ConfigDefs.hpp
"
11
#include "
Xpetra_DefaultPlatform.hpp
"
12
13
Teuchos::RCP<Xpetra::DefaultPlatform::DefaultPlatformType>
Xpetra::DefaultPlatform::platform_
= Teuchos::null;
14
15
namespace
Xpetra
{
16
17
DefaultPlatform::DefaultPlatformType
&
DefaultPlatform::getDefaultPlatform
() {
18
XPETRA_MONITOR
(
"DefaultPlatform::getDefaultPlatform"
);
19
20
if
(!
platform_
.get()) {
21
using
node_type = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType;
22
Teuchos::RCP<node_type>
node;
// null
23
#ifdef HAVE_MPI
24
platform_
=
Teuchos::rcp
(
new
MpiPlatform<node_type>
(node));
25
#else
26
platform_
=
Teuchos::rcp
(
new
SerialPlatform<node_type>
(node));
27
#endif
28
}
29
return
*
platform_
;
30
}
31
32
}
// namespace Xpetra
Xpetra_ConfigDefs.hpp
XPETRA_MONITOR
#define XPETRA_MONITOR(funcName)
Definition
Xpetra_ConfigDefs.hpp:96
Xpetra_DefaultPlatform.hpp
Teuchos::RCP
Xpetra::DefaultPlatform::platform_
static Teuchos::RCP< DefaultPlatformType > platform_
Definition
Xpetra_DefaultPlatform.hpp:46
Xpetra::DefaultPlatform::getDefaultPlatform
static DefaultPlatformType & getDefaultPlatform()
Return the default platform.
Definition
Xpetra_DefaultPlatform.cpp:17
Xpetra::MpiPlatform
A implementation of the Platform class for MPI-based platforms.
Definition
Xpetra_MpiPlatform.hpp:28
Xpetra::SerialPlatform
A implementation of the Platform class for serial platforms.
Definition
Xpetra_SerialPlatform.hpp:23
Teuchos::rcp
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Xpetra
Xpetra namespace
Definition
Xpetra_BlockedCrsMatrix_decl.hpp:52
src
Platform
Xpetra_DefaultPlatform.cpp
Generated by
1.9.8