50 T my_min(
const T& v1,
const T& v2 ) {
return v1 < v2 ? v1 : v2; }
59 info < 0, std::invalid_argument
60 ,
"potrf(...): Error, Invalid argument "
61 << -info <<
" sent to LAPACK function xPOTRF(...)" );
65 ,
"potrf(...): Error, Minor of order "
66 << info <<
" is not positive definite, the factorization "
67 "could not be completed" );
76 if( tau->dim() != my_min( A->
rows(), A->
cols() ) ) {
78 true, std::invalid_argument,
"geqrf(...): Error, tau is not sized correctly!" );
81 , tau->raw_ptr(), work->raw_ptr(), work->dim(), &info );
84 info < 0, std::invalid_argument
85 ,
"geqrf(...): Error, Invalid argument "
86 << -info <<
" sent to LAPACK function xGEQRF(...)" );
101 , work->raw_ptr(), work->dim(), &info );
104 info < 0, std::invalid_argument
105 ,
"ormrq(...): Error, Invalid argument "
106 << -info <<
" sent to LAPACK function xORMRQ(...)" );
118 , A->
gms().
max_rows(), ipiv, work->raw_ptr(), work->dim()
121 info < 0, std::invalid_argument
122 ,
"sytrf(...): Error, Invalid argument "
123 << -info <<
" sent to LAPACK function xSYTRF(...)" );
124 TEUCHOS_TEST_FOR_EXCEPTION(
126 ,
"sytrf(...): Error, xSYTRF(...) indicates a singular matrix, "
127 <<
"D("<<info<<
","<<info<<
") is zero." );
137 (A.
rows() != B->
rows()), std::invalid_argument
138 ,
"sytrs(...) : Error, The number of rows in A and B must match."
145 info < 0, std::invalid_argument
146 ,
"sytrs(...): Error, Invalid argument "
147 << -info <<
" sent to LAPACK function xSYTRS(...)"
160 *rank = my_min( A->
rows(), A->
cols() );
162 info < 0, std::invalid_argument
163 ,
"getrf(...): Error, Invalid argument "
164 << -info <<
" sent to LAPACK function xGETRF(...)" );
176 ,
"getrs(...) : Error, A must be square and the number of rows in A and B must match."
184 info < 0, std::invalid_argument
185 ,
"getrs(...): Error, Invalid argument "
186 << -info <<
" sent to LAPACK function xGETRS(...)" );
void getrf(const f_int &m, const f_int &n, f_dbl_prec A[], const f_int &lda, f_int ipiv[], f_int *info)
void ormqr(BLAS_Cpp::Side side, BLAS_Cpp::Transp trans, const f_int &m, const f_int &n, const f_int &k, const f_dbl_prec *A, const f_int &lda, const f_dbl_prec *tau, f_dbl_prec *C, const f_int &ldc, f_dbl_prec *work, const f_int &lwork, f_int *info)
FortranTypes::f_int f_int
void sytrf(DMatrixSliceTriEle *A, FortranTypes::f_int ipiv[], DVectorSlice *work)
Calls xSYTRF to compute the P*A*P' = L'*D*L factorization of a symmetric possibly indefinite matrix...
void getrs(const DMatrixSlice &LU, const FortranTypes::f_int ipiv[], BLAS_Cpp::Transp transp, DMatrixSlice *B)
Calls xGETRS to solve linear systems with the factors of P'*A = L*U generated by xGETRF.
void geqrf(DMatrixSlice *A, DVectorSlice *tau, DVectorSlice *work)
Calls xGEQRF to compute the QR factorization of a matrix A.
size_type cols() const
Return the number of columns.
Exception for factorization error.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
void geqrf(const f_int &m, const f_int &n, f_dbl_prec *A, const f_int &lda, f_dbl_prec *tau, f_dbl_prec *work, const f_int &lwork, f_int *info)
void getrf(DMatrixSlice *A, FortranTypes::f_int ipiv[], FortranTypes::f_int *rank)
Calls xGETRF to compute the P'*A = L*U factorization of a general rectuangular matrix.
void getrs(BLAS_Cpp::Transp trans, const f_int &n, const f_int &nrhs, const f_dbl_prec A[], const f_int &lda, const f_int ipiv[], f_dbl_prec B[], const f_int &ldb, f_int *info)
size_type max_rows() const
Return the number of rows in the full matrix. Equivalent to BLAS LDA argument.
value_type * col_ptr(size_type j)
BLAS_Cpp::Uplo uplo() const
void potrf(DMatrixSliceTriEle *A)
Calls xPOTRF to compute the cholesky factorization of a symmetric positive definte matrix...
DenseLinAlgPack::VectorSliceTmpl< value_type > DVectorSlice
size_type rows() const
Return the number of rows.
void potrf(BLAS_Cpp::Uplo uplo, const f_int &n, f_dbl_prec *A, const f_int &lda, f_int *info)
void sytrs(BLAS_Cpp::Uplo uplo, const f_int &n, const f_int &nrhs, const f_dbl_prec A[], const f_int &lda, const f_int ipiv[], f_dbl_prec B[], const f_int &ldb, f_int *info)
void ormrq(BLAS_Cpp::Side side, BLAS_Cpp::Transp trans, const DMatrixSlice &A, const DVectorSlice &tau, DMatrixSlice *C, DVectorSlice *work)
Calls xORMRQ to compute a matrix matrix op(C)=op(Q)*op(C) where Q is stored in A and tau computed fro...
void sytrs(const DMatrixSliceTriEle &A, FortranTypes::f_int ipiv[], DMatrixSlice *B, DVectorSlice *work)
Calls xSYTRS(...) to compute the solution of the factorized system A * X = B where A was factorized b...
void sytrf(BLAS_Cpp::Uplo uplo, const f_int &n, f_dbl_prec A[], const f_int &lda, f_int ipiv[], f_dbl_prec work[], const f_int &lwork, f_int *info)