Kokkos Node API and Local Linear Algebra Kernels Version of the Day
Public Member Functions
TSQR::DistTsqrRB< LocalOrdinal, Scalar > Class Template Reference

Reduce-and-Broadcast (RB) version of DistTsqr. More...

#include <Tsqr_DistTsqrRB.hpp>

List of all members.

Public Member Functions

 DistTsqrRB (const Teuchos::RCP< MessengerBase< scalar_type > > &messenger)
 Constructor.
void getStats (std::vector< TimeStats > &stats) const
 Fill stats with cumulative timings from factorExplicit().
void getStatsLabels (std::vector< std::string > &labels) const
 Fill labels with timer labels from factorExplicit().
bool QR_produces_R_factor_with_nonnegative_diagonal () const
void factorExplicit (matview_type R_mine, matview_type Q_mine, const bool forceNonnegativeDiagonal=false)
 Internode TSQR with explicit Q factor.

Detailed Description

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

Reduce-and-Broadcast (RB) version of DistTsqr.

Author:
Mark Hoemmen
Template Parameters:
LocalOrdinalCorresponds to the "local ordinal" template parameter of Tpetra objects (though TSQR is not Tpetra-specific).
ScalarCorresponds to the "scalar" template parameter of Tpetra objects (though TSQR is not Tpetra-specific).

This class implements the Reduce-and-Broadcast (RB) version of DistTsqr. DistTsqr factors a vertical stack of n by n R factors, one per MPI process. Only the final R factor is broadcast. The implicit Q factor data stay on the MPI process where they were computed.

Definition at line 154 of file Tsqr_DistTsqrRB.hpp.


Constructor & Destructor Documentation

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

Constructor.

Parameters:
messenger[in/out] Smart pointer to a wrapper handling communication between MPI process(es).

Definition at line 168 of file Tsqr_DistTsqrRB.hpp.


Member Function Documentation

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

Fill stats with cumulative timings from factorExplicit().

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

Definition at line 183 of file Tsqr_DistTsqrRB.hpp.

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

Fill labels with timer labels from factorExplicit().

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

Definition at line 201 of file Tsqr_DistTsqrRB.hpp.

template<class LocalOrdinal , class Scalar >
bool TSQR::DistTsqrRB< 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 215 of file Tsqr_DistTsqrRB.hpp.

template<class LocalOrdinal , class Scalar >
void TSQR::DistTsqrRB< LocalOrdinal, Scalar >::factorExplicit ( matview_type  R_mine,
matview_type  Q_mine,
const bool  forceNonnegativeDiagonal = false 
) [inline]

Internode TSQR with explicit Q factor.

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.)
forceNonnegativeDiagonal[in] If true, then (if necessary) do extra work (modifying both the Q and R factors) in order to force the R factor to have a nonnegative diagonal.

Definition at line 240 of file Tsqr_DistTsqrRB.hpp.


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