Doxygen 1.9.1
Toolkit for Adaptive Stochastic Modeling and Non-Intrusive ApproximatioN: Tasmanian v8.2 (development)
Wrappers around TPL functionality
Collaboration diagram for Wrappers around TPL functionality:

Files

file  tsgTPLWrappers.hpp
 Wrappers to the enabled TPL functionality.
 
file  tsgBlasWrappers.hpp
 Wrappers to BLAS functionality.
 
file  tsgGpuWrappers.hpp
 Wrappers to GPU functionality.
 

Functions

double TasBLAS::norm2 (int N, double const x[], int incx)
 BLAS dnrm2.
 
void TasBLAS::vswap (int N, double x[], int incx, double y[], int incy)
 BLAS dswap.
 
void TasBLAS::scal (int N, double alpha, double x[], int incx)
 BLAS dscal.
 
void TasBLAS::gemv (char trans, int M, int N, double alpha, double const A[], int lda, double const x[], int incx, double beta, double y[], int incy)
 BLAS dgemv.
 
void TasBLAS::trsv (char uplo, char trans, char diag, int N, double const A[], int lda, double x[], int incx)
 BLAS dtrsv.
 
void TasBLAS::gemm (char transa, char transb, int M, int N, int K, double alpha, double const A[], int lda, double const B[], int ldb, double beta, double C[], int ldc)
 BLAS gemm.
 
void TasBLAS::trsm (char side, char uplo, char trans, char diag, int M, int N, double alpha, double const A[], int lda, double B[], int ldb)
 BLAS dtrsm.
 
void TasBLAS::trsm (char side, char uplo, char trans, char diag, int M, int N, std::complex< double > alpha, std::complex< double > const A[], int lda, std::complex< double > B[], int ldb)
 BLAS ztrsm.
 
void TasBLAS::getrf (int M, int N, double A[], int lda, int ipiv[])
 LAPACK dgetrf.
 
void TasBLAS::getrs (char trans, int N, int nrhs, double const A[], int lda, int const ipiv[], double B[], int ldb)
 LAPACK dgetrs.
 
void TasBLAS::gels (char trans, int M, int N, int nrhs, double A[], int lda, double B[], int ldb, double work[], int lwork)
 LAPACK dgels.
 
void TasBLAS::gels (char trans, int M, int N, int nrhs, std::complex< double > A[], int lda, std::complex< double > B[], int ldb, std::complex< double > work[], int lwork)
 LAPACK zgels.
 
void TasBLAS::stebz (char range, char order, int N, double vl, double vu, int il, int iu, double abstol, double D[], double E[], int &M, int &nsplit, double W[], int iblock[], int isplit[], double work[], int iwork[])
 LAPACK dstebz.
 
void TasBLAS::steqr (char compz, int N, double D[], double E[], double Z[], int ldz, double work[])
 LAPACK dsteqr.
 
void TasBLAS::sterf (int N, double D[], double E[])
 LAPACK dsterf.
 
template<typename T >
TasBLAS::norm2_2 (int N, T const x[])
 Returns the square of the norm of the vector.
 
template<typename T >
void TasBLAS::denseMultiply (int M, int N, int K, T alpha, const T A[], const T B[], T beta, T C[])
 Combination of BLAS gemm and gemv. More...
 
void TasBLAS::conj_matrix (int, int, double[])
 Conjugates a matrix, no op in the real case.
 
void TasBLAS::conj_matrix (int N, int M, std::complex< double > A[])
 Conjugates the matrix, used in the case when 'T' operation is needed by only 'C' is available in the LAPACK standard.
 
constexpr char TasBLAS::get_trans (double)
 Returns the transpose symbol, 'T' in the real case.
 
constexpr char TasBLAS::get_trans (std::complex< double >)
 Returns the conjugate-transpose symbol, 'C' in the complex case.
 
template<typename scalar_type >
void TasBLAS::solveLS (char trans, int N, int M, scalar_type A[], scalar_type b[], int nrhs=1)
 Solves the over-determined least squares problem with single right-hand-side. More...
 
template<typename scalar_type >
void TasBLAS::factorizeLQ (int rows, int cols, scalar_type A[], std::vector< scalar_type > &T)
 Compute the LQ factorization of the matrix A. More...
 
template<typename scalar_type >
void TasBLAS::multiplyQ (int M, int N, int K, scalar_type const A[], std::vector< scalar_type > const &T, scalar_type C[])
 Multiplies C by the Q factor computed with factorizeLQ. More...
 
template<typename scalar_type >
void TasBLAS::solveLSmulti (int n, int m, scalar_type A[], int nrhs, scalar_type B[])
 Solves the least-squares assuming row-major format, see TasmanianDenseSolver::solvesLeastSquares()
 

Detailed Description

Tasmanian uses multiple third party libraries (TPL) to gain advanced functionality, such as optimized liner algebra on the CPU and GPU devices. The libraries often come with C or Fortran style of API and the included C++ wrappers help interface with the C++ internals of Tasmanian. The wrappers are put in a set of private headers and should not be included as part of the public API.

Function Documentation

◆ denseMultiply()

template<typename T >
void TasBLAS::denseMultiply ( int  M,
int  N,
int  K,
alpha,
const T  A[],
const T  B[],
beta,
C[] 
)
inline

Combination of BLAS gemm and gemv.

Computes $ C = \alpha A B + \beta C $ where A is M by K, B is K by N, and C is M by N. The method uses both gemm() and gemv() to handle the cases when either dimension is one.

◆ solveLS()

template<typename scalar_type >
void TasBLAS::solveLS ( char  trans,
int  N,
int  M,
scalar_type  A[],
scalar_type  b[],
int  nrhs = 1 
)
inline

Solves the over-determined least squares problem with single right-hand-side.

Note that trans must be a capital letter N or T.

◆ factorizeLQ()

template<typename scalar_type >
void TasBLAS::factorizeLQ ( int  rows,
int  cols,
scalar_type  A[],
std::vector< scalar_type > &  T 
)
inline

Compute the LQ factorization of the matrix A.

The assumption here is that the matrix is in column major format, otherwise this computes the QR factorization. In fact, the Tasmanian uses this method to compute QR of a row-major matrix.

◆ multiplyQ()

template<typename scalar_type >
void TasBLAS::multiplyQ ( int  M,
int  N,
int  K,
scalar_type const  A[],
std::vector< scalar_type > const &  T,
scalar_type  C[] 
)
inline

Multiplies C by the Q factor computed with factorizeLQ.

Computes $ C = C Q^T $ where Q comes from the call to factorizeLQ. The matrix C has dimensions M by N, A has dimensions K by N.