clapack.h not present in Linux
parent
0013911960
commit
ae8c59bc4c
|
@ -76,12 +76,13 @@ void choleskyFactorUnderdetermined(MatrixColMajor& Ab) {
|
||||||
|
|
||||||
// Compute the values of R from F'F
|
// Compute the values of R from F'F
|
||||||
int info = lapack_dpotrf('U', rank, &R(0,0), Ab.size1());
|
int info = lapack_dpotrf('U', rank, &R(0,0), Ab.size1());
|
||||||
if(info != 0)
|
if(info != 0) {
|
||||||
if(info < 0)
|
if(info < 0)
|
||||||
throw std::domain_error(boost::str(boost::format(
|
throw std::domain_error(boost::str(boost::format(
|
||||||
"Bad input to choleskyFactorUnderdetermined, dpotrf returned %d.\n")%info));
|
"Bad input to choleskyFactorUnderdetermined, dpotrf returned %d.\n")%info));
|
||||||
else
|
else
|
||||||
throw std::domain_error("The matrix passed into choleskyFactorUnderdetermined is numerically rank-deficient");
|
throw std::domain_error("The matrix passed into choleskyFactorUnderdetermined is numerically rank-deficient");
|
||||||
|
}
|
||||||
|
|
||||||
// Compute S = inv(R') * F' * G, i.e. solve S when R'S = F'G
|
// Compute S = inv(R') * F' * G, i.e. solve S when R'S = F'G
|
||||||
cblas_dtrsm(CblasColMajor, CblasLeft, CblasUpper, CblasTrans, CblasNonUnit, S.size1(), S.size2(), 1.0, &R(0,0), m, &S(0,0), m);
|
cblas_dtrsm(CblasColMajor, CblasLeft, CblasUpper, CblasTrans, CblasNonUnit, S.size1(), S.size2(), 1.0, &R(0,0), m, &S(0,0), m);
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
||||||
#include <cblas.h>
|
#include <cblas.h>
|
||||||
#include <clapack.h>
|
|
||||||
|
|
||||||
/* Subroutine */ int dpotrf_(char *uplo, int *n, double *a, int *lda,
|
/* Subroutine */ int dpotrf_(char *uplo, int *n, double *a, int *lda,
|
||||||
int *info);
|
int *info);
|
||||||
|
|
Loading…
Reference in New Issue