Thyra::SerialMultiVectorBase< Scalar > Class Template Reference
[Thyra Operator/Vector Base Support Subclasses for Serial Shared-Memory Implementations]

Base class for serial shared-memory multi-vectors. More...

#include <Thyra_SerialMultiVectorBaseDecl.hpp>

Inheritance diagram for Thyra::SerialMultiVectorBase< Scalar >:

[legend]
List of all members.

Constructors / initializers / accessors

 SerialMultiVectorBase ()
 

Pure virtual methods to be overridden by subclasses

virtual void getData (const Scalar **values, Index *leadingDim) const =0
 Returns a const pointer to a Fortran-style view of the local multi-vector data.
virtual void freeData (const Scalar *values) const =0
 Free view of local data that was gotten from getData().
virtual void getData (Scalar **values, Index *leadingDim)=0
 Returns a non-const pointer to a Fortran-style view of the local multi-vector data.
virtual void commitData (Scalar *values)=0
 Commit view of local data that was gotten from getData().

Overridden from MultiVectorBase

Calls EuclideanLinearOpBase::apply() to disambiguate apply()

void applyOp (const RTOpPack::RTOpT< Scalar > &primary_op, const int num_multi_vecs, const MultiVectorBase< Scalar > *multi_vecs[], const int num_targ_multi_vecs, MultiVectorBase< Scalar > *targ_multi_vecs[], RTOpPack::ReductTarget *reduct_objs[], const Index primary_first_ele, const Index primary_sub_dim, const Index primary_global_offset, const Index secondary_first_ele, const Index secondary_sub_dim) const
 
void getSubMultiVector (const Range1D &rowRng, const Range1D &colRng, RTOpPack::SubMultiVectorT< Scalar > *sub_mv) const
 
void freeSubMultiVector (RTOpPack::SubMultiVectorT< Scalar > *sub_mv) const
 
void getSubMultiVector (const Range1D &rowRng, const Range1D &colRng, RTOpPack::MutableSubMultiVectorT< Scalar > *sub_mv)
 
void commitSubMultiVector (RTOpPack::MutableSubMultiVectorT< Scalar > *sub_mv)
 

Overridden from SingleScalarEuclideanLinearOpBase

bool opSupported (ETransp M_trans) const
 For complex Scalar types returns true for NOTRANS, TRANS, and CONJTRANS and for real types returns true for all values of M_trans.
void euclideanApply (const ETransp M_trans, const MultiVectorBase< Scalar > &X, MultiVectorBase< Scalar > *Y, const Scalar alpha, const Scalar beta) const
 Uses GEMM(...) to implement.

Miscellaneous functions for subclasses to call

virtual void updateSpace ()
 Subclasses should call whenever the structure of any VectorSpaceBase changes.
Range1D validateRowRange (const Range1D &rowRng) const
 Validate and resize the row range.
Range1D validateColRange (const Range1D &rowCol) const
 Validate and resize the column range.

Detailed Description

template<class Scalar>
class Thyra::SerialMultiVectorBase< Scalar >

Base class for serial shared-memory multi-vectors.

By inheriting from this base class, multi-vector implementations allow their multi-vector objects to be seamlessly combined with other serial multi-vector objects (of different concrete types) in applyOp() and apply().

This base class contains implementations of applyOp() and apply() that rely on implementations of the methods (const) getSubMultiVector(), freeSubMultiVector(), (non-const) getSubMultiVector() and commitSubMultiVector() (which all have default implementations in this subclass). As long as the number of elements is fairly large, the virtual function call overhead will be minimal and this will result in a near optimal implementation.

Notes to subclass developers

Concrete subclasses must override only four functions that give direct access to MultiVectorBase data: <getData(const Scalar**,Index*), freeData(const Scalar**,Index*), getData(Scalar**,Index*), commitData(Scalar**,Index*).

Definition at line 66 of file Thyra_SerialMultiVectorBaseDecl.hpp.


Constructor & Destructor Documentation

template<class Scalar>
Thyra::SerialMultiVectorBase< Scalar >::SerialMultiVectorBase  ) 
 

Definition at line 49 of file Thyra_SerialMultiVectorBase.hpp.


Member Function Documentation

template<class Scalar>
virtual void Thyra::SerialMultiVectorBase< Scalar >::getData const Scalar **  values,
Index leadingDim
const [pure virtual]
 

Returns a const pointer to a Fortran-style view of the local multi-vector data.

Parameters:
values [out] On output *values will point to the first element in the first column of the local multi-vector stored as a column-major dense Fortran-style matrix.
leadingDim [out] On output *leadingDim gives the leading dimension of the Fortran-style local multi-vector.

Implemented in Thyra::SerialMultiVectorStd< Scalar >.

template<class Scalar>
virtual void Thyra::SerialMultiVectorBase< Scalar >::freeData const Scalar *  values  )  const [pure virtual]
 

Free view of local data that was gotten from getData().

Parameters:
values [in/out] On input values must be the pointer set by getData().

Implemented in Thyra::SerialMultiVectorStd< Scalar >.

template<class Scalar>
virtual void Thyra::SerialMultiVectorBase< Scalar >::getData Scalar **  values,
Index leadingDim
[pure virtual]
 

Returns a non-const pointer to a Fortran-style view of the local multi-vector data.

Parameters:
values [out] On output *values will point to the first element in the first column of the local multi-vector stored as a column-major dense Fortran-style matrix.
leadingDim [out] On output *leadingDim gives the leading dimension of the Fortran-style local multi-vector.
The function commitData() must be called to commit changes to the data.

Implemented in Thyra::SerialMultiVectorStd< Scalar >.

template<class Scalar>
virtual void Thyra::SerialMultiVectorBase< Scalar >::commitData Scalar *  values  )  [pure virtual]
 

Commit view of local data that was gotten from getData().

Parameters:
values [in/out] On input *values must be the pointer set by getData().

Implemented in Thyra::SerialMultiVectorStd< Scalar >.

template<class Scalar>
void Thyra::SerialMultiVectorBase< Scalar >::applyOp const RTOpPack::RTOpT< Scalar > &  primary_op,
const int  num_multi_vecs,
const MultiVectorBase< Scalar > *  multi_vecs[],
const int  num_targ_multi_vecs,
MultiVectorBase< Scalar > *  targ_multi_vecs[],
RTOpPack::ReductTarget reduct_objs[],
const Index  primary_first_ele,
const Index  primary_sub_dim,
const Index  primary_global_offset,
const Index  secondary_first_ele,
const Index  secondary_sub_dim
const
 

Definition at line 76 of file Thyra_SerialMultiVectorBase.hpp.

template<class Scalar>
void Thyra::SerialMultiVectorBase< Scalar >::getSubMultiVector const Range1D rowRng,
const Range1D colRng,
RTOpPack::SubMultiVectorT< Scalar > *  sub_mv
const
 

Definition at line 116 of file Thyra_SerialMultiVectorBase.hpp.

template<class Scalar>
void Thyra::SerialMultiVectorBase< Scalar >::freeSubMultiVector RTOpPack::SubMultiVectorT< Scalar > *  sub_mv  )  const
 

Definition at line 139 of file Thyra_SerialMultiVectorBase.hpp.

template<class Scalar>
void Thyra::SerialMultiVectorBase< Scalar >::getSubMultiVector const Range1D rowRng,
const Range1D colRng,
RTOpPack::MutableSubMultiVectorT< Scalar > *  sub_mv
 

Definition at line 148 of file Thyra_SerialMultiVectorBase.hpp.

template<class Scalar>
void Thyra::SerialMultiVectorBase< Scalar >::commitSubMultiVector RTOpPack::MutableSubMultiVectorT< Scalar > *  sub_mv  ) 
 

Definition at line 171 of file Thyra_SerialMultiVectorBase.hpp.

template<class Scalar>
bool Thyra::SerialMultiVectorBase< Scalar >::opSupported ETransp  M_trans  )  const [protected, virtual]
 

For complex Scalar types returns true for NOTRANS, TRANS, and CONJTRANS and for real types returns true for all values of M_trans.

Implements Thyra::SingleScalarEuclideanLinearOpBase< Scalar >.

Definition at line 185 of file Thyra_SerialMultiVectorBase.hpp.

template<class Scalar>
void Thyra::SerialMultiVectorBase< Scalar >::euclideanApply const ETransp  M_trans,
const MultiVectorBase< Scalar > &  X,
MultiVectorBase< Scalar > *  Y,
const Scalar  alpha,
const Scalar  beta
const [protected, virtual]
 

Uses GEMM(...) to implement.

ToDo: Finish documentation!

Implements Thyra::SingleScalarEuclideanLinearOpBase< Scalar >.

Definition at line 192 of file Thyra_SerialMultiVectorBase.hpp.

template<class Scalar>
void Thyra::SerialMultiVectorBase< Scalar >::updateSpace  )  [protected, virtual]
 

Subclasses should call whenever the structure of any VectorSpaceBase changes.

This function can be overridden by subclasses but this particular function implementation must be called from within any override.

Definition at line 298 of file Thyra_SerialMultiVectorBase.hpp.

template<class Scalar>
Range1D Thyra::SerialMultiVectorBase< Scalar >::validateRowRange const Range1D rowRng  )  const [protected]
 

Validate and resize the row range.

This function throws an exception if the input range is invalid

Definition at line 314 of file Thyra_SerialMultiVectorBase.hpp.

template<class Scalar>
Range1D Thyra::SerialMultiVectorBase< Scalar >::validateColRange const Range1D rowCol  )  const [protected]
 

Validate and resize the column range.

This function throws an exception if the input range is invalid

Definition at line 329 of file Thyra_SerialMultiVectorBase.hpp.


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:39:54 2008 for Thyra ANA Operator/VectorBase Interfaces and Related Software by doxygen 1.3.9.1