Xpetra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Xpetra::TpetraHalfPrecisionOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node > Class Template Reference

Wraps an existing halfer precision Xpetra::Operator as a Xpetra::Operator. More...

#include <Xpetra_TpetraHalfPrecisionOperator.hpp>

Inheritance diagram for Xpetra::TpetraHalfPrecisionOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >:
Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >

Public Types

typedef Teuchos::ScalarTraits
< Scalar >::halfPrecision 
HalfScalar
 
- Public Types inherited from Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >
typedef Scalar scalar_type
 The type of the entries of the input and output multivectors. More...
 
typedef LocalOrdinal local_ordinal_type
 The local index type. More...
 
typedef GlobalOrdinal global_ordinal_type
 The global index type. More...
 
typedef Node node_type
 The Kokkos Node type. More...
 

Public Member Functions

const Teuchos::RCP< const
Xpetra::Map< LocalOrdinal,
GlobalOrdinal, Node > > 
getDomainMap () const
 Returns the Tpetra::Map object associated with the domain of this TpetraOperator. More...
 
const Teuchos::RCP< const
Xpetra::Map< LocalOrdinal,
GlobalOrdinal, Node > > 
getRangeMap () const
 Returns the Tpetra::Map object associated with the range of this TpetraOperator. More...
 
void apply (const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X, Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, Scalar alpha=Teuchos::ScalarTraits< Scalar >::one(), Scalar beta=Teuchos::ScalarTraits< Scalar >::one()) const
 Returns in Y the result of a Xpetra::TpetraOperator applied to a Xpetra::MultiVector X. More...
 
bool hasTransposeApply () const
 Indicates whether this TpetraOperator supports applying the adjoint TpetraOperator. More...
 
void residual (const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X, const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B, Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &R) const
 Compute a residual R = B - (*this) * X. More...
 
- Public Member Functions inherited from Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >
virtual ~Operator ()
 
virtual void removeEmptyProcessesInPlace (const RCP< const map_type > &)
 

Private Attributes

RCP< Xpetra::Operator
< HalfScalar, LocalOrdinal,
GlobalOrdinal, Node > > 
Op_
 
RCP< Xpetra::MultiVector
< HalfScalar, LocalOrdinal,
GlobalOrdinal, Node > > 
X_
 
RCP< Xpetra::MultiVector
< HalfScalar, LocalOrdinal,
GlobalOrdinal, Node > > 
Y_
 

Constructor/Destructor

 TpetraHalfPrecisionOperator (const RCP< Xpetra::Operator< HalfScalar, LocalOrdinal, GlobalOrdinal, Node >> &op)
 Constructor. More...
 
void Allocate (int numVecs)
 
virtual ~TpetraHalfPrecisionOperator ()
 Destructor. More...
 

Xpetra specific

RCP< Xpetra::Operator
< HalfScalar, LocalOrdinal,
GlobalOrdinal, Node > > 
GetHalfPrecisionOperator () const
 Direct access to the underlying TpetraOperator. More...
 
void SetHalfPrecisionOperator (const RCP< Xpetra::Operator< HalfScalar, LocalOrdinal, GlobalOrdinal, Node >> &op)
 

Detailed Description

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
class Xpetra::TpetraHalfPrecisionOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >

Wraps an existing halfer precision Xpetra::Operator as a Xpetra::Operator.

Definition at line 70 of file Xpetra_TpetraHalfPrecisionOperator.hpp.

Member Typedef Documentation

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
typedef Teuchos::ScalarTraits<Scalar>::halfPrecision Xpetra::TpetraHalfPrecisionOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::HalfScalar

Definition at line 72 of file Xpetra_TpetraHalfPrecisionOperator.hpp.

Constructor & Destructor Documentation

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
Xpetra::TpetraHalfPrecisionOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::TpetraHalfPrecisionOperator ( const RCP< Xpetra::Operator< HalfScalar, LocalOrdinal, GlobalOrdinal, Node >> &  op)
inline

Constructor.

Definition at line 78 of file Xpetra_TpetraHalfPrecisionOperator.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
virtual Xpetra::TpetraHalfPrecisionOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::~TpetraHalfPrecisionOperator ( )
inlinevirtual

Destructor.

Definition at line 89 of file Xpetra_TpetraHalfPrecisionOperator.hpp.

Member Function Documentation

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
void Xpetra::TpetraHalfPrecisionOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Allocate ( int  numVecs)
inline

Definition at line 83 of file Xpetra_TpetraHalfPrecisionOperator.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
const Teuchos::RCP<const Xpetra::Map<LocalOrdinal, GlobalOrdinal, Node> > Xpetra::TpetraHalfPrecisionOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getDomainMap ( ) const
inlinevirtual

Returns the Tpetra::Map object associated with the domain of this TpetraOperator.

Implements Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 94 of file Xpetra_TpetraHalfPrecisionOperator.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
const Teuchos::RCP<const Xpetra::Map<LocalOrdinal, GlobalOrdinal, Node> > Xpetra::TpetraHalfPrecisionOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getRangeMap ( ) const
inlinevirtual

Returns the Tpetra::Map object associated with the range of this TpetraOperator.

Implements Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 99 of file Xpetra_TpetraHalfPrecisionOperator.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
void Xpetra::TpetraHalfPrecisionOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::apply ( const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  X,
Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  Y,
Teuchos::ETransp  mode = Teuchos::NO_TRANS,
Scalar  alpha = Teuchos::ScalarTraits<Scalar>::one(),
Scalar  beta = Teuchos::ScalarTraits<Scalar>::one() 
) const
inlinevirtual

Returns in Y the result of a Xpetra::TpetraOperator applied to a Xpetra::MultiVector X.

Parameters
[in]X- Xpetra::MultiVector of dimension NumVectors to multiply with matrix.
[out]Y- Xpetra::MultiVector of dimension NumVectors containing result.

Implements Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 108 of file Xpetra_TpetraHalfPrecisionOperator.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
bool Xpetra::TpetraHalfPrecisionOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::hasTransposeApply ( ) const
inlinevirtual

Indicates whether this TpetraOperator supports applying the adjoint TpetraOperator.

Reimplemented from Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 122 of file Xpetra_TpetraHalfPrecisionOperator.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
void Xpetra::TpetraHalfPrecisionOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::residual ( const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  X,
const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  B,
Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  R 
) const
inlinevirtual

Compute a residual R = B - (*this) * X.

Implements Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 125 of file Xpetra_TpetraHalfPrecisionOperator.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
RCP<Xpetra::Operator<HalfScalar, LocalOrdinal, GlobalOrdinal, Node> > Xpetra::TpetraHalfPrecisionOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::GetHalfPrecisionOperator ( ) const
inline

Direct access to the underlying TpetraOperator.

Definition at line 137 of file Xpetra_TpetraHalfPrecisionOperator.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
void Xpetra::TpetraHalfPrecisionOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::SetHalfPrecisionOperator ( const RCP< Xpetra::Operator< HalfScalar, LocalOrdinal, GlobalOrdinal, Node >> &  op)
inline

Definition at line 139 of file Xpetra_TpetraHalfPrecisionOperator.hpp.

Member Data Documentation

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
RCP<Xpetra::Operator<HalfScalar, LocalOrdinal, GlobalOrdinal, Node> > Xpetra::TpetraHalfPrecisionOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Op_
private

Definition at line 139 of file Xpetra_TpetraHalfPrecisionOperator.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
RCP<Xpetra::MultiVector<HalfScalar, LocalOrdinal, GlobalOrdinal, Node> > Xpetra::TpetraHalfPrecisionOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::X_
private

Definition at line 145 of file Xpetra_TpetraHalfPrecisionOperator.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
RCP<Xpetra::MultiVector<HalfScalar, LocalOrdinal, GlobalOrdinal, Node> > Xpetra::TpetraHalfPrecisionOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Y_
private

Definition at line 145 of file Xpetra_TpetraHalfPrecisionOperator.hpp.


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