Tpetra Matrix/Vector Services  Version of the Day
Protected Attributes | List of all members
Tpetra::SerialPlatform< Kokkos::DefaultNode::DefaultNodeType > Class Template Reference

SerialPlatform specialization for Kokkos::DefaultNode::DefaultNodeType. More...

#include <Tpetra_SerialPlatform.hpp>

Inheritance diagram for Tpetra::SerialPlatform< Kokkos::DefaultNode::DefaultNodeType >:
Inheritance graph
[legend]

Public Types

Typedefs
typedef Kokkos::DefaultNode::DefaultNodeType NodeType
 Kokkos Node type; the template parameter of this class. More...
 

Public Member Functions

Constructors and destructor
 SerialPlatform ()
 Default constructor: uses Kokkos default node. More...
 
 SerialPlatform (const RCP< Kokkos::DefaultNode::DefaultNodeType > &node)
 Constructor that accepts a Kokkos Node. More...
 
virtual ~SerialPlatform ()
 Destructor (virtual for memory safety of derived classes). More...
 
Methods to access the communicator and Kokkos Node.
RCP< const Teuchos::Comm< int > > getComm () const
 The Teuchos::Comm instance with which this object was created. More...
 
RCP< Kokkos::DefaultNode::DefaultNodeType > getNode () const
 The Kokkos Node instance for this platform to use. More...
 

Protected Attributes

RCP< const Teuchos::SerialComm< int > > comm_
 Teuchos::Comm object instantiated for the platform. More...
 
RCP< Kokkos::DefaultNode::DefaultNodeType > node_
 Node object instantiated for the platform. More...
 

Detailed Description

template<>
class Tpetra::SerialPlatform< Kokkos::DefaultNode::DefaultNodeType >

SerialPlatform specialization for Kokkos::DefaultNode::DefaultNodeType.

Warning
Kokkos::DefaultNode::DefaultNodeType is a typedef, and may have a different type, depending on Trilinos' build options. For example, it may be Kokkos::SerialNode if Trilinos was built without a threading library, or Kokkos::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.
Examples:
LocalMatOpExample.cpp, Tpetra_Power_Method.cpp, and Tpetra_Power_Method_From_File.cpp.

Definition at line 143 of file Tpetra_SerialPlatform.hpp.

Member Typedef Documentation

typedef Kokkos::DefaultNode::DefaultNodeType Tpetra::SerialPlatform< Kokkos::DefaultNode::DefaultNodeType >::NodeType

Kokkos Node type; the template parameter of this class.

Definition at line 150 of file Tpetra_SerialPlatform.hpp.

Constructor & Destructor Documentation

Tpetra::SerialPlatform< Kokkos::DefaultNode::DefaultNodeType >::SerialPlatform ( )
inline

Default constructor: uses Kokkos default node.

The specialization of SerialPlatform for the default Node type includes a default constructor. It instantiates a default Node instance using Kokkos::DefaultNode::getDefaultNode().

Definition at line 161 of file Tpetra_SerialPlatform.hpp.

Tpetra::SerialPlatform< Kokkos::DefaultNode::DefaultNodeType >::SerialPlatform ( const RCP< Kokkos::DefaultNode::DefaultNodeType > &  node)
inlineexplicit

Constructor that accepts a Kokkos Node.

This version of the constructor is declared "explicit" to forbid silent type conversions from the Node instance to a SerialPlatform. (A single-argument constructor that is not declared "explicit" defines a type conversion method from the input type to the constructor's class's type.) The "explicit" declaration does not affect typical use of this constructor.

This specialization of SerialPlatform for the default node type will instantiate a default Node if node.is_null().

Parameters
node[in/out] The Kokkos Node instance.

Definition at line 179 of file Tpetra_SerialPlatform.hpp.

virtual Tpetra::SerialPlatform< Kokkos::DefaultNode::DefaultNodeType >::~SerialPlatform ( )
inlinevirtual

Destructor (virtual for memory safety of derived classes).

Definition at line 185 of file Tpetra_SerialPlatform.hpp.

Member Function Documentation

RCP<const Teuchos::Comm<int> > Tpetra::SerialPlatform< Kokkos::DefaultNode::DefaultNodeType >::getComm ( ) const
inline
RCP<Kokkos::DefaultNode::DefaultNodeType> Tpetra::SerialPlatform< Kokkos::DefaultNode::DefaultNodeType >::getNode ( ) const
inline

The Kokkos Node instance for this platform to use.

Definition at line 197 of file Tpetra_SerialPlatform.hpp.

Member Data Documentation

RCP<const Teuchos::SerialComm<int> > Tpetra::SerialPlatform< Kokkos::DefaultNode::DefaultNodeType >::comm_
protected

Teuchos::Comm object instantiated for the platform.

Definition at line 211 of file Tpetra_SerialPlatform.hpp.

RCP<Kokkos::DefaultNode::DefaultNodeType> Tpetra::SerialPlatform< Kokkos::DefaultNode::DefaultNodeType >::node_
protected

Node object instantiated for the platform.

Definition at line 214 of file Tpetra_SerialPlatform.hpp.


The documentation for this class was generated from the following file: