|
Anasazi Version of the Day
|
Internode part of TSQR. More...
#include <Tsqr_DistTsqr.hpp>
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. | |
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.
| TSQR::DistTsqr< LocalOrdinal, Scalar >::DistTsqr | ( | const Teuchos::RCP< MessengerBase< scalar_type > > & | messenger | ) | [inline] |
Constructor
| messenger | [in/out] Wrapper of communication operations between MPI processes. |
Definition at line 69 of file Tsqr_DistTsqr.hpp.
| 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.
| 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.
| 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.
| 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.
| 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).
| 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.
| 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.
| 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.
| 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.
| 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. |
Definition at line 163 of file Tsqr_DistTsqr.hpp.
1.7.4