mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Remove "using namespace Eigen" from blas/common.h.
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
6ed4d80cc8
commit
8a73c6490f
@@ -28,9 +28,9 @@ EIGEN_LAPACK_FUNC(potrf)(char *uplo, int *n, RealScalar *pa, int *lda, int *info
|
||||
MatrixType A(a, *n, *n, *lda);
|
||||
int ret;
|
||||
if (UPLO(*uplo) == UP)
|
||||
ret = int(internal::llt_inplace<Scalar, Upper>::blocked(A));
|
||||
ret = int(Eigen::internal::llt_inplace<Scalar, Eigen::Upper>::blocked(A));
|
||||
else
|
||||
ret = int(internal::llt_inplace<Scalar, Lower>::blocked(A));
|
||||
ret = int(Eigen::internal::llt_inplace<Scalar, Eigen::Lower>::blocked(A));
|
||||
|
||||
if (ret >= 0) *info = ret + 1;
|
||||
}
|
||||
@@ -61,10 +61,10 @@ EIGEN_LAPACK_FUNC(potrs)(char *uplo, int *n, int *nrhs, RealScalar *pa, int *lda
|
||||
MatrixType B(b, *n, *nrhs, *ldb);
|
||||
|
||||
if (UPLO(*uplo) == UP) {
|
||||
A.triangularView<Upper>().adjoint().solveInPlace(B);
|
||||
A.triangularView<Upper>().solveInPlace(B);
|
||||
A.triangularView<Eigen::Upper>().adjoint().solveInPlace(B);
|
||||
A.triangularView<Eigen::Upper>().solveInPlace(B);
|
||||
} else {
|
||||
A.triangularView<Lower>().solveInPlace(B);
|
||||
A.triangularView<Lower>().adjoint().solveInPlace(B);
|
||||
A.triangularView<Eigen::Lower>().solveInPlace(B);
|
||||
A.triangularView<Eigen::Lower>().adjoint().solveInPlace(B);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,9 +47,10 @@ EIGEN_LAPACK_FUNC(syev)
|
||||
mat = matrix(a, *n, *n, *lda);
|
||||
|
||||
bool computeVectors = *jobz == 'V' || *jobz == 'v';
|
||||
SelfAdjointEigenSolver<PlainMatrixType> eig(mat, computeVectors ? ComputeEigenvectors : EigenvaluesOnly);
|
||||
Eigen::SelfAdjointEigenSolver<PlainMatrixType> eig(
|
||||
mat, computeVectors ? Eigen::ComputeEigenvectors : Eigen::EigenvaluesOnly);
|
||||
|
||||
if (eig.info() == NoConvergence) {
|
||||
if (eig.info() == Eigen::NoConvergence) {
|
||||
make_vector(w, *n).setZero();
|
||||
if (computeVectors) matrix(a, *n, *n, *lda).setIdentity();
|
||||
//*info = 1;
|
||||
|
||||
@@ -62,6 +62,8 @@ EIGEN_LAPACK_FUNC(getrs)
|
||||
MatrixType lu(a, *n, *n, *lda);
|
||||
MatrixType B(b, *n, *nrhs, *ldb);
|
||||
|
||||
using Eigen::UnitLower;
|
||||
using Eigen::Upper;
|
||||
for (int i = 0; i < *n; ++i) ipiv[i]--;
|
||||
if (OP(*trans) == NOTR) {
|
||||
B = PivotsType(ipiv, *n) * B;
|
||||
|
||||
@@ -56,12 +56,12 @@ EIGEN_LAPACK_FUNC(gesdd)
|
||||
PlainMatrixType mat(*m, *n);
|
||||
mat = matrix(a, *m, *n, *lda);
|
||||
|
||||
int option = *jobz == 'A' ? ComputeFullU | ComputeFullV
|
||||
: *jobz == 'S' ? ComputeThinU | ComputeThinV
|
||||
: *jobz == 'O' ? ComputeThinU | ComputeThinV
|
||||
int option = *jobz == 'A' ? Eigen::ComputeFullU | Eigen::ComputeFullV
|
||||
: *jobz == 'S' ? Eigen::ComputeThinU | Eigen::ComputeThinV
|
||||
: *jobz == 'O' ? Eigen::ComputeThinU | Eigen::ComputeThinV
|
||||
: 0;
|
||||
|
||||
BDCSVD<PlainMatrixType> svd(mat, option);
|
||||
Eigen::BDCSVD<PlainMatrixType> svd(mat, option);
|
||||
|
||||
make_vector(s, diag_size) = svd.singularValues().head(diag_size);
|
||||
|
||||
@@ -119,14 +119,14 @@ EIGEN_LAPACK_FUNC(gesvd)
|
||||
PlainMatrixType mat(*m, *n);
|
||||
mat = matrix(a, *m, *n, *lda);
|
||||
|
||||
int option = (*jobu == 'A' ? ComputeFullU
|
||||
: *jobu == 'S' || *jobu == 'O' ? ComputeThinU
|
||||
int option = (*jobu == 'A' ? Eigen::ComputeFullU
|
||||
: *jobu == 'S' || *jobu == 'O' ? Eigen::ComputeThinU
|
||||
: 0) |
|
||||
(*jobv == 'A' ? ComputeFullV
|
||||
: *jobv == 'S' || *jobv == 'O' ? ComputeThinV
|
||||
(*jobv == 'A' ? Eigen::ComputeFullV
|
||||
: *jobv == 'S' || *jobv == 'O' ? Eigen::ComputeThinV
|
||||
: 0);
|
||||
|
||||
JacobiSVD<PlainMatrixType> svd(mat, option);
|
||||
Eigen::JacobiSVD<PlainMatrixType> svd(mat, option);
|
||||
|
||||
make_vector(s, diag_size) = svd.singularValues().head(diag_size);
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user