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

Cache-blocked sequential implementation of CholeskyQR. More...

#include <Tsqr_SequentialCholeskyQR.hpp>

List of all members.

Public Types

typedef int FactorOutput
 Return value of factor().

Public Member Functions

size_t TEUCHOS_DEPRECATED cache_block_size () const
 Cache size hint (in bytes).
size_t cache_size_hint () const
 Cache size hint (in bytes).
 SequentialCholeskyQR (const size_t theCacheSizeHint=0)
 Constructor.
bool QR_produces_R_factor_with_nonnegative_diagonal () const
 Whether the R factor has a nonnegative diagonal.
FactorOutput factor (const LocalOrdinal nrows, const LocalOrdinal ncols, const Scalar A[], const LocalOrdinal lda, Scalar R[], const LocalOrdinal ldr, const bool contiguous_cache_blocks=false)
 Compute the QR factorization of the matrix A.
void explicit_Q (const LocalOrdinal nrows, const LocalOrdinal ncols_Q, const Scalar Q[], const LocalOrdinal ldq, const FactorOutput &factor_output, const LocalOrdinal ncols_C, Scalar C[], const LocalOrdinal ldc, const bool contiguous_cache_blocks=false)
void cache_block (const LocalOrdinal nrows, const LocalOrdinal ncols, Scalar A_out[], const Scalar A_in[], const LocalOrdinal lda_in) const
 Cache-block the given A_in matrix, writing the results to A_out.
void un_cache_block (const LocalOrdinal nrows, const LocalOrdinal ncols, Scalar A_out[], const LocalOrdinal lda_out, const Scalar A_in[]) const
 "Un"-cache-block the given A_in matrix, writing the results to A_out.
void fill_with_zeros (const LocalOrdinal nrows, const LocalOrdinal ncols, Scalar A[], const LocalOrdinal lda, const bool contiguous_cache_blocks=false)
 Fill the nrows by ncols matrix A with zeros.
template<class MatrixViewType >
MatrixViewType top_block (const MatrixViewType &C, const bool contiguous_cache_blocks=false) const

Detailed Description

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

Cache-blocked sequential implementation of CholeskyQR.

CholeskyQR works like this: given an input matrix A with no fewer rows than columns,

Definition at line 59 of file Tsqr_SequentialCholeskyQR.hpp.


Member Typedef Documentation

template<class LocalOrdinal , class Scalar >
TSQR::SequentialCholeskyQR< LocalOrdinal, Scalar >::FactorOutput

Return value of factor().

Here, FactorOutput is just a minimal object whose value is irrelevant, so that this class' interface looks like that of SequentialTsqr.

Definition at line 74 of file Tsqr_SequentialCholeskyQR.hpp.


Constructor & Destructor Documentation

template<class LocalOrdinal , class Scalar >
TSQR::SequentialCholeskyQR< LocalOrdinal, Scalar >::SequentialCholeskyQR ( const size_t  theCacheSizeHint = 0) [inline]

Constructor.

Parameters:
theCacheSizeHint[in] Cache size hint in bytes. If 0, the implementation will pick a reasonable size, which may be queried by calling cache_size_hint().

Definition at line 92 of file Tsqr_SequentialCholeskyQR.hpp.


Member Function Documentation

template<class LocalOrdinal , class Scalar >
size_t TEUCHOS_DEPRECATED TSQR::SequentialCholeskyQR< LocalOrdinal, Scalar >::cache_block_size ( ) const [inline]

Cache size hint (in bytes).

This method is deprecated, because the name is misleading. Please call cache_size_hint() instead.

Definition at line 80 of file Tsqr_SequentialCholeskyQR.hpp.

template<class LocalOrdinal , class Scalar >
size_t TSQR::SequentialCholeskyQR< LocalOrdinal, Scalar >::cache_size_hint ( ) const [inline]

Cache size hint (in bytes).

Definition at line 85 of file Tsqr_SequentialCholeskyQR.hpp.

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

Whether the R factor has a nonnegative diagonal.

The factor() method computes a QR factorization of the input matrix A. Some, but not all methods for computing a QR factorization produce an R factor with a nonnegative diagonal. This class' implementation does, because the R factor comes from a Cholesky factorization.

Definition at line 103 of file Tsqr_SequentialCholeskyQR.hpp.

template<class LocalOrdinal , class Scalar >
FactorOutput TSQR::SequentialCholeskyQR< LocalOrdinal, Scalar >::factor ( const LocalOrdinal  nrows,
const LocalOrdinal  ncols,
const Scalar  A[],
const LocalOrdinal  lda,
Scalar  R[],
const LocalOrdinal  ldr,
const bool  contiguous_cache_blocks = false 
) [inline]

Compute the QR factorization of the matrix A.

Compute the QR factorization of the nrows by ncols matrix A, with nrows >= ncols, stored either in column-major order (the default) or as contiguous column-major cache blocks, with leading dimension lda >= nrows.

Definition at line 114 of file Tsqr_SequentialCholeskyQR.hpp.

template<class LocalOrdinal , class Scalar >
void TSQR::SequentialCholeskyQR< LocalOrdinal, Scalar >::explicit_Q ( const LocalOrdinal  nrows,
const LocalOrdinal  ncols_Q,
const Scalar  Q[],
const LocalOrdinal  ldq,
const FactorOutput factor_output,
const LocalOrdinal  ncols_C,
Scalar  C[],
const LocalOrdinal  ldc,
const bool  contiguous_cache_blocks = false 
) [inline]
Parameters:
factor_output[in] Not used; just here to match the interface of SequentialTsqr.

Definition at line 205 of file Tsqr_SequentialCholeskyQR.hpp.

template<class LocalOrdinal , class Scalar >
void TSQR::SequentialCholeskyQR< LocalOrdinal, Scalar >::cache_block ( const LocalOrdinal  nrows,
const LocalOrdinal  ncols,
Scalar  A_out[],
const Scalar  A_in[],
const LocalOrdinal  lda_in 
) const [inline]

Cache-block the given A_in matrix, writing the results to A_out.

Definition at line 242 of file Tsqr_SequentialCholeskyQR.hpp.

template<class LocalOrdinal , class Scalar >
void TSQR::SequentialCholeskyQR< LocalOrdinal, Scalar >::un_cache_block ( const LocalOrdinal  nrows,
const LocalOrdinal  ncols,
Scalar  A_out[],
const LocalOrdinal  lda_out,
const Scalar  A_in[] 
) const [inline]

"Un"-cache-block the given A_in matrix, writing the results to A_out.

Definition at line 255 of file Tsqr_SequentialCholeskyQR.hpp.

template<class LocalOrdinal , class Scalar >
void TSQR::SequentialCholeskyQR< LocalOrdinal, Scalar >::fill_with_zeros ( const LocalOrdinal  nrows,
const LocalOrdinal  ncols,
Scalar  A[],
const LocalOrdinal  lda,
const bool  contiguous_cache_blocks = false 
) [inline]

Fill the nrows by ncols matrix A with zeros.

Definition at line 267 of file Tsqr_SequentialCholeskyQR.hpp.

template<class LocalOrdinal , class Scalar >
template<class MatrixViewType >
MatrixViewType TSQR::SequentialCholeskyQR< LocalOrdinal, Scalar >::top_block ( const MatrixViewType &  C,
const bool  contiguous_cache_blocks = false 
) const [inline]

Return a view of the topmost cache block (on this node) of the given matrix C. NOTE that this is not necessarily square, though it must have at least as many rows as columns. For a square ncols by ncols block, as needed in TSQR::Tsqr::apply(), if the output is ret, do MatView< LocalOrdinal, Scalar > (ncols, ncols, ret.get(), ret.lda()) to get an ncols by ncols block.

Definition at line 286 of file Tsqr_SequentialCholeskyQR.hpp.


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