Xpetra
Version of the Day
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
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::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
Xpetra_DefaultPlatform.hpp
Xpetra_ConfigDefs.hpp
Xpetra::DefaultPlatform::getDefaultPlatform
static DefaultPlatformType & getDefaultPlatform()
Return the default platform.
Definition:
Xpetra_DefaultPlatform.cpp:17
XPETRA_MONITOR
#define XPETRA_MONITOR(funcName)
Definition:
Xpetra_ConfigDefs.hpp:96
Xpetra::DefaultPlatform::platform_
static Teuchos::RCP< DefaultPlatformType > platform_
Definition:
Xpetra_DefaultPlatform.hpp:46
src
Platform
Xpetra_DefaultPlatform.cpp
Generated on Fri Nov 22 2024 09:23:16 for Xpetra by
1.8.5