Anasazi Version of the Day
Public Member Functions
TSQR::DistTsqr< LocalOrdinal, Scalar > Class Template Reference

Internode part of TSQR. More...

#include <Tsqr_DistTsqr.hpp>

List of all members.

Public Member Functions

 DistTsqr (const Teuchos::RCP< MessengerBase< scalar_type > > &messenger)
rank_type rank () const
rank_type size () const
 ~DistTsqr ()
 Destructor.
bool QR_produces_R_factor_with_nonnegative_diagonal () const
void factorExplicit (matview_type R_mine, matview_type Q_mine)
 Internode TSQR with explicit Q factor.
void getFactorExplicitTimings (std::vector< TimeStats > &stats) const
void getFactorExplicitTimingLabels (std::vector< std::string > &labels) const
FactorOutput factor (matview_type R_mine)
 Compute QR factorization of R factors, one per MPI process.

Detailed Description

template<class LocalOrdinal, class Scalar>
class TSQR::DistTsqr< LocalOrdinal, Scalar >

Internode part of TSQR.

This class combines the ncols by ncols R factors computed by the intranode TSQR factorization on individual MPI processes. It is a model as well as the default for Tsqr's DistTsqrType template parameter.

LocalOrdinal: index type for dense matrices of Scalar. Known to work with int.

Scalar: value type for matrices to factor. Known to work with float, double, std::complex<float>, std::complex<double>.

Definition at line 56 of file Tsqr_DistTsqr.hpp.


Constructor & Destructor Documentation

template<class LocalOrdinal, class Scalar>
TSQR::DistTsqr< LocalOrdinal, Scalar >::DistTsqr ( const Teuchos::RCP< MessengerBase< scalar_type > > &  messenger) [inline]

Constructor

Parameters:
messenger[in/out] Wrapper of communication operations between MPI processes.

Definition at line 69 of file Tsqr_DistTsqr.hpp.

template<class LocalOrdinal, class Scalar>
TSQR::DistTsqr< LocalOrdinal, Scalar >::~DistTsqr ( ) [inline]

Destructor.

The destructor doesn't need to do anything, thanks to smart pointers.

Definition at line 86 of file Tsqr_DistTsqr.hpp.


Member Function Documentation

template<class LocalOrdinal, class Scalar>
rank_type TSQR::DistTsqr< LocalOrdinal, Scalar >::rank ( ) const [inline]

Rank of this MPI process (via MPI_Comm_rank())

Definition at line 76 of file Tsqr_DistTsqr.hpp.

template<class LocalOrdinal, class Scalar>
rank_type TSQR::DistTsqr< LocalOrdinal, Scalar >::size ( ) const [inline]

Total number of MPI processes in this communicator (via MPI_Comm_size())

Definition at line 80 of file Tsqr_DistTsqr.hpp.

template<class LocalOrdinal, class Scalar>
bool TSQR::DistTsqr< LocalOrdinal, Scalar >::QR_produces_R_factor_with_nonnegative_diagonal ( ) const [inline]

Whether or not all diagonal entries of the R factor computed by the QR factorization are guaranteed to be nonnegative.

Definition at line 90 of file Tsqr_DistTsqr.hpp.

template<class LocalOrdinal, class Scalar>
void TSQR::DistTsqr< LocalOrdinal, Scalar >::factorExplicit ( matview_type  R_mine,
matview_type  Q_mine 
) [inline]

Internode TSQR with explicit Q factor.

Call this routine (instead of factor() and explicit_Q()) if you want to compute the QR factorization and only want the Q factor in explicit form (i.e., as a matrix).

Parameters:
R_mine[in/out] View of a matrix with at least as many rows as columns. On input: upper triangular matrix (R factor from intranode TSQR); different on each process.. On output: R factor from intranode QR factorization; bitwise identical on all processes, since it is effectively broadcast from Proc 0.
Q_mine[out] View of a matrix with the same number of rows as R_mine has columns. On output: this process' component of the internode Q factor. (Write into the top block of this process' entire Q factor, fill the rest of Q with zeros, and call intranode TSQR's apply() on it, to get the final explicit Q factor.)

Definition at line 116 of file Tsqr_DistTsqr.hpp.

template<class LocalOrdinal, class Scalar>
void TSQR::DistTsqr< LocalOrdinal, Scalar >::getFactorExplicitTimings ( std::vector< TimeStats > &  stats) const [inline]

Fill in the timings vector with cumulative timings from factorExplicit(). The vector gets resized to fit all the timings.

Definition at line 125 of file Tsqr_DistTsqr.hpp.

template<class LocalOrdinal, class Scalar>
void TSQR::DistTsqr< LocalOrdinal, Scalar >::getFactorExplicitTimingLabels ( std::vector< std::string > &  labels) const [inline]

Fill in the labels vector with the string labels for the timings from factorExplicit(). The vector gets resized to fit all the labels.

Definition at line 134 of file Tsqr_DistTsqr.hpp.

template<class LocalOrdinal, class Scalar>
FactorOutput TSQR::DistTsqr< LocalOrdinal, Scalar >::factor ( matview_type  R_mine) [inline]

Compute QR factorization of R factors, one per MPI process.

Compute the QR factorization of the P*ncols by ncols matrix consisting of all P nodes' R_mine upper triangular matrices stacked on top of each other. Generally these upper triangular matrices should come from the QR factorization (perhaps computed by sequential or node-parallel TSQR) of a general matrix on each node.

Note:
"ncols" below is the number of columns in the matrix to factor. Should be the same on all nodes.
Parameters:
R_mine[in,out] On input, an ncols by ncols upper triangular matrix with leading dimension ncols, stored unpacked (as a general matrix). Elements below the diagonal are ignored. On output, the final R factor of the QR factorization of all nodes' different R_mine inputs. The final R factor is replicated over all nodes.
Returns:
Two arrays with the same number of elements: first, an array of "local Q factors," and second, an array of "local tau arrays." These together form an implicit representation of the Q factor. They should be passed into the apply() and explicit_Q() functions as the "factorOutput" parameter.

Definition at line 163 of file Tsqr_DistTsqr.hpp.


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