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

Non-parallel "functioning stub" implementation of TbbTsqr. More...

#include <TbbTsqr_TbbRecursiveTsqr.hpp>

List of all members.

Public Types

typedef SequentialTsqr
< LocalOrdinal, Scalar >
::FactorOutput 
SeqOutput
 Results of SequentialTsqr for each core.
typedef std::vector
< std::vector< Scalar > > 
ParOutput
 Array of ncores "local tau arrays" from parallel TSQR.
typedef std::pair< std::vector
< SeqOutput >, ParOutput
FactorOutput
 Return type of factor().

Public Member Functions

 TbbRecursiveTsqr (const size_t num_cores=1, const size_t cache_size_hint=0)
 Constructor.
size_t ncores () const
size_t TEUCHOS_DEPRECATED cache_block_size () const
 Cache size hint (in bytes) used for the factorization.
size_t cache_size_hint () const
 Cache size hint (in bytes) used for the factorization.
void cache_block (const LocalOrdinal nrows, const LocalOrdinal ncols, Scalar A_out[], const Scalar A_in[], const LocalOrdinal lda_in) const
void un_cache_block (const LocalOrdinal nrows, const LocalOrdinal ncols, Scalar A_out[], const LocalOrdinal lda_out, const Scalar A_in[]) const
FactorOutput factor (const LocalOrdinal nrows, const LocalOrdinal ncols, Scalar A[], const LocalOrdinal lda, Scalar R[], const LocalOrdinal ldr, const bool contiguous_cache_blocks) const
void apply (const std::string &op, const LocalOrdinal nrows, const LocalOrdinal ncols_C, Scalar C[], const LocalOrdinal ldc, const LocalOrdinal ncols_Q, const Scalar Q[], const LocalOrdinal ldq, const FactorOutput &factor_output, const bool contiguous_cache_blocks) const
void explicit_Q (const LocalOrdinal nrows, const LocalOrdinal ncols_Q_in, const Scalar Q_in[], const LocalOrdinal ldq_in, const LocalOrdinal ncols_Q_out, Scalar Q_out[], const LocalOrdinal ldq_out, const FactorOutput &factor_output, const bool contiguous_cache_blocks) const

Detailed Description

template<class LocalOrdinal, class Scalar>
class TSQR::TBB::TbbRecursiveTsqr< LocalOrdinal, Scalar >

Non-parallel "functioning stub" implementation of TbbTsqr.

Definition at line 65 of file TbbTsqr_TbbRecursiveTsqr.hpp.


Member Typedef Documentation

template<class LocalOrdinal, class Scalar>
typedef SequentialTsqr<LocalOrdinal, Scalar>::FactorOutput TSQR::TBB::TbbRecursiveTsqr< LocalOrdinal, Scalar >::SeqOutput

Results of SequentialTsqr for each core.

Definition at line 96 of file TbbTsqr_TbbRecursiveTsqr.hpp.

template<class LocalOrdinal, class Scalar>
TSQR::TBB::TbbRecursiveTsqr< LocalOrdinal, Scalar >::ParOutput

Array of ncores "local tau arrays" from parallel TSQR.

Local Q factors are stored in place.

Definition at line 102 of file TbbTsqr_TbbRecursiveTsqr.hpp.

template<class LocalOrdinal, class Scalar>
TSQR::TBB::TbbRecursiveTsqr< LocalOrdinal, Scalar >::FactorOutput

Return type of factor().

factor() returns a pair: the results of SequentialTsqr for data on each core, and the results of combining the data on the cores.

Definition at line 110 of file TbbTsqr_TbbRecursiveTsqr.hpp.


Constructor & Destructor Documentation

template<class LocalOrdinal , class Scalar >
TSQR::TBB::TbbRecursiveTsqr< LocalOrdinal, Scalar >::TbbRecursiveTsqr ( const size_t  num_cores = 1,
const size_t  cache_size_hint = 0 
)

Constructor.

Parameters:
num_cores[in] Maximum parallelism to use (i.e., maximum number of partitions into which to divide the matrix to factor).
cache_size_hint[in] Approximate cache size in bytes per CPU core. A hint, not a command. If zero, set to a reasonable default.

Definition at line 465 of file TbbTsqr_TbbRecursiveTsqr_Def.hpp.


Member Function Documentation

template<class LocalOrdinal, class Scalar>
size_t TSQR::TBB::TbbRecursiveTsqr< LocalOrdinal, Scalar >::ncores ( ) const [inline]

Number of cores to use to solve the problem (i.e., number of subproblems into which to divide the main problem, to solve it in parallel).

Definition at line 82 of file TbbTsqr_TbbRecursiveTsqr.hpp.

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

Cache size hint (in bytes) used for the factorization.

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

Definition at line 88 of file TbbTsqr_TbbRecursiveTsqr.hpp.

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

Cache size hint (in bytes) used for the factorization.

Definition at line 93 of file TbbTsqr_TbbRecursiveTsqr.hpp.

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

Copy the nrows by ncols matrix A_in (with leading dimension lda_in >= nrows) into A_out, such that cache blocks are arranged contiguously in memory.

Definition at line 478 of file TbbTsqr_TbbRecursiveTsqr_Def.hpp.

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

Copy the nrows by ncols matrix A_in, whose cache blocks are arranged contiguously in memory, into A_out (with leading dimension lda_out >= nrows), which is in standard column-major order.

Definition at line 493 of file TbbTsqr_TbbRecursiveTsqr_Def.hpp.

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

Compute the QR factorization of the nrows by ncols matrix A (with leading dimension lda >= nrows), returning a representation of the Q factor (which includes data stored in-place in A), and overwriting R (an ncols by ncols matrix in column-major order with leading dimension ldr >= ncols) with the R factor.

Definition at line 508 of file TbbTsqr_TbbRecursiveTsqr_Def.hpp.

template<class LocalOrdinal, class Scalar>
void TSQR::TBB::TbbRecursiveTsqr< LocalOrdinal, Scalar >::apply ( const std::string &  op,
const LocalOrdinal  nrows,
const LocalOrdinal  ncols_C,
Scalar  C[],
const LocalOrdinal  ldc,
const LocalOrdinal  ncols_Q,
const Scalar  Q[],
const LocalOrdinal  ldq,
const FactorOutput factor_output,
const bool  contiguous_cache_blocks 
) const

Apply the Q factor computed by factor() (which see) to the nrows by ncols_C matrix C, with leading dimension ldc >= nrows.

template<class LocalOrdinal, class Scalar>
void TSQR::TBB::TbbRecursiveTsqr< LocalOrdinal, Scalar >::explicit_Q ( const LocalOrdinal  nrows,
const LocalOrdinal  ncols_Q_in,
const Scalar  Q_in[],
const LocalOrdinal  ldq_in,
const LocalOrdinal  ncols_Q_out,
Scalar  Q_out[],
const LocalOrdinal  ldq_out,
const FactorOutput factor_output,
const bool  contiguous_cache_blocks 
) const

Compute the explicit representation of the Q factor computed by factor().


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