Tpetra Matrix/Vector Services Version of the Day
Protected Attributes
Tpetra::SerialPlatform< Node > Class Template Reference

Implementation of the Platform concept for non-MPI platforms. More...

#include <Tpetra_SerialPlatform.hpp>

Inheritance diagram for Tpetra::SerialPlatform< Node >:
Inheritance graph
[legend]

List of all members.

Public Types

Typedefs
typedef Node NodeType
 Kokkos Node type; the template parameter of this class.

Public Member Functions

Constructors and destructor
 SerialPlatform (int *argc, char ***argv)
 Constructor that accepts the same arguments as Tpetra::initialize().
 SerialPlatform (const Teuchos::RCP< NodeType > &node)
 SerialPlatform (int *argc, char ***argv, const Teuchos::RCP< NodeType > &node)
 Constructor that accepts the same arguments as Tpetra::initialize(), plus a Kokkos Node.
virtual ~SerialPlatform ()
 Destructor (virtual for memory safety of derived classes).
Methods to access the communicator and Kokkos Node.
Teuchos::RCP< const
Teuchos::Comm< int > > 
getComm () const
 The Teuchos::Comm instance with which this object was created.
Teuchos::RCP< Node > getNode () const
 The Kokkos Node instance with which this object was created.

Protected Attributes

Teuchos::RCP< const
Teuchos::Comm< int > > 
comm_
 Teuchos::Comm object instantiated for the platform.
Teuchos::RCP< NodeTypenode_
 Kokkos Node object instantiated for the platform.

Detailed Description

template<class Node>
class Tpetra::SerialPlatform< Node >

Implementation of the Platform concept for non-MPI platforms.

SerialPlatform specialization for KokkosClassic::DefaultNode::DefaultNodeType.

Warning:
This class will be DEPRECATED, in favor of the initialize() functions in Tpetra_Core.hpp. Please use those functions for safe, consistent initialization Kokkos, on which Tpetra depends. If you must use this class, please prefer the constructors that take argc and argv. Those constructors will call initialize() for you.

SerialPlatform is an implementation of Tpetra's Platform concept. Classes implementing the Platform concept are templated on the Kokkos Node type. They have at least the following public interface:

 // This is not a real class; it just illustrates the concept.
 template<class Node>
 class Platform {
 public:
   typedef Node NodeType;
   explicit Platform (const RCP<Node>& node);
   RCP<const Comm<int> > getComm() const;
   RCP<Node> getNode() const;
 };

SerialPlatform uses a "communicator" containing one process. It is available whether or not Trilinos was built with MPI (the Message-Passing Interface which provides a distributed-memory parallel programming model).

Warning:
KokkosClassic::DefaultNode::DefaultNodeType is a typedef, and may have a different type, depending on Trilinos' build options. For example, it may be KokkosClassic::SerialNode if Trilinos was built without a threading library, or KokkosClassic::TPINode if Trilinos was built with Pthreads.
Note:
In the past (up to and including the 10.8 Trilinos release), the specialization of SerialPlatform for the default Node type delayed instantiation of the default Node instance until getNode() was called. We have changed this behavior to simplify the code and make the specialization of SerialPlatform conform more closely to the generic version of SerialPlatform.

Definition at line 82 of file Tpetra_SerialPlatform.hpp.


Member Typedef Documentation

template<class Node>
typedef Node Tpetra::SerialPlatform< Node >::NodeType

Kokkos Node type; the template parameter of this class.

Definition at line 88 of file Tpetra_SerialPlatform.hpp.


Constructor & Destructor Documentation

template<class Node>
Tpetra::SerialPlatform< Node >::SerialPlatform ( int *  argc,
char ***  argv 
) [inline, explicit]

Constructor that accepts the same arguments as Tpetra::initialize().

Parameters:
argc[in/out] First argument of Tpetra::initialize().
argv[in/out] Second argument of Tpetra::initialize().

Definition at line 99 of file Tpetra_SerialPlatform.hpp.

template<class Node>
Tpetra::SerialPlatform< Node >::SerialPlatform ( const Teuchos::RCP< NodeType > &  node) [inline, explicit]

Constructor that accepts a Kokkos Node.

Parameters:
node[in/out] The Kokkos Node instance. If null, this class will create a Node with default parameters, at some time no later than during the first call to getNode().

Definition at line 123 of file Tpetra_SerialPlatform.hpp.

template<class Node>
Tpetra::SerialPlatform< Node >::SerialPlatform ( int *  argc,
char ***  argv,
const Teuchos::RCP< NodeType > &  node 
) [inline, explicit]

Constructor that accepts the same arguments as Tpetra::initialize(), plus a Kokkos Node.

Parameters:
argc[in/out] First argument of Tpetra::initialize().
argv[in/out] Second argument of Tpetra::initialize().
node[in/out] The Kokkos Node instance. If null, this class will create a Node with default parameters, at some time no later than during the first call to getNode().

Definition at line 138 of file Tpetra_SerialPlatform.hpp.

template<class Node>
virtual Tpetra::SerialPlatform< Node >::~SerialPlatform ( ) [inline, virtual]

Destructor (virtual for memory safety of derived classes).

Definition at line 149 of file Tpetra_SerialPlatform.hpp.


Member Function Documentation

template<class Node>
Teuchos::RCP<const Teuchos::Comm<int> > Tpetra::SerialPlatform< Node >::getComm ( ) const [inline]

The Teuchos::Comm instance with which this object was created.

Definition at line 156 of file Tpetra_SerialPlatform.hpp.

template<class Node>
Teuchos::RCP<Node> Tpetra::SerialPlatform< Node >::getNode ( ) const [inline]

The Kokkos Node instance with which this object was created.

Definition at line 161 of file Tpetra_SerialPlatform.hpp.


Member Data Documentation

template<class Node>
Teuchos::RCP<const Teuchos::Comm<int> > Tpetra::SerialPlatform< Node >::comm_ [protected]

Teuchos::Comm object instantiated for the platform.

Definition at line 190 of file Tpetra_SerialPlatform.hpp.

template<class Node>
Teuchos::RCP<NodeType> Tpetra::SerialPlatform< Node >::node_ [protected]

Kokkos Node object instantiated for the platform.

Definition at line 192 of file Tpetra_SerialPlatform.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines