From f1d310195653e1d84f6b606354ea1c5babfa3d5d Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 3 Mar 2010 09:32:10 +0100 Subject: [PATCH] blas: add warnings for non implemented functions --- blas/level1_impl.h | 5 +++++ blas/level2_impl.h | 33 +++++++++++++++++++++++---------- blas/level3_impl.h | 2 ++ blas/xerbla.cpp | 1 + 4 files changed, 31 insertions(+), 10 deletions(-) diff --git a/blas/level1_impl.h b/blas/level1_impl.h index 08fd0b6d6..9f3e4d166 100644 --- a/blas/level1_impl.h +++ b/blas/level1_impl.h @@ -157,6 +157,9 @@ Scalar EIGEN_BLAS_FUNC(sdot)(int *n, RealScalar *px, int *incx, RealScalar *py, // computes a dot product of a conjugated vector with another vector. void EIGEN_BLAS_FUNC(dotc)(RealScalar* dot, int *n, RealScalar *px, int *incx, RealScalar *py, int *incy) { + + std::cerr << "Eigen BLAS: _dotc is not implemented yet\n"; + return; // TODO: find how to return a complex to fortran @@ -175,6 +178,8 @@ void EIGEN_BLAS_FUNC(dotc)(RealScalar* dot, int *n, RealScalar *px, int *incx, R // computes a vector-vector dot product without complex conjugation. void EIGEN_BLAS_FUNC(dotu)(RealScalar* dot, int *n, RealScalar *px, int *incx, RealScalar *py, int *incy) { + std::cerr << "Eigen BLAS: _dotu is not implemented yet\n"; + return; // TODO: find how to return a complex to fortran diff --git a/blas/level2_impl.h b/blas/level2_impl.h index 5691e8a7f..68be9a806 100644 --- a/blas/level2_impl.h +++ b/blas/level2_impl.h @@ -56,9 +56,11 @@ int EIGEN_BLAS_FUNC(gemv)(char *opa, int *m, int *n, RealScalar *palpha, RealSca return 1; } -/* + int EIGEN_BLAS_FUNC(trsv)(char *uplo, char *opa, char *diag, int *n, RealScalar *pa, int *lda, RealScalar *pb, int *incb) { + return 0; + typedef void (*functype)(int, const Scalar *, int, Scalar *, int); functype func[16]; @@ -95,13 +97,14 @@ int EIGEN_BLAS_FUNC(trsv)(char *uplo, char *opa, char *diag, int *n, RealScalar return 0; func[code](*n, a, *lda, b, *incb); - return 1; + return 0; } -*/ -/* + + int EIGEN_BLAS_FUNC(trmv)(char *uplo, char *opa, char *diag, int *n, RealScalar *pa, int *lda, RealScalar *pb, int *incb) { + return 0; // TODO typedef void (*functype)(int, const Scalar *, int, const Scalar *, int, Scalar *, int); @@ -140,13 +143,21 @@ int EIGEN_BLAS_FUNC(trmv)(char *uplo, char *opa, char *diag, int *n, RealScalar return 0; func[code](*n, a, *lda, b, *incb, b, *incb); - return 1; + return 0; +} + +// y = alpha*A*x + beta*y +int EIGEN_BLAS_FUNC(ssymv) (char *uplo, int *n, RealScalar *palpha, RealScalar *pa, int *lda, RealScalar *px, int *incx, RealScalar *pbeta, RealScalar *py, int *incy) +{ + return 0; + + // TODO } -*/ -/* int EIGEN_BLAS_FUNC(syr)(char *uplo, int *n, RealScalar *palpha, RealScalar *pa, int *inca, RealScalar *pc, int *ldc) { + return 0; + // TODO typedef void (*functype)(int, const Scalar *, int, Scalar *, int, Scalar); functype func[2]; @@ -174,11 +185,13 @@ int EIGEN_BLAS_FUNC(syr)(char *uplo, int *n, RealScalar *palpha, RealScalar *pa, func[code](*n, a, *inca, c, *ldc, alpha); return 1; } -*/ -/* + + int EIGEN_BLAS_FUNC(syr2)(char *uplo, int *n, RealScalar *palpha, RealScalar *pa, int *inca, RealScalar *pb, int *incb, RealScalar *pc, int *ldc) { + return 0; + // TODO typedef void (*functype)(int, const Scalar *, int, const Scalar *, int, Scalar *, int, Scalar); functype func[2]; @@ -207,7 +220,7 @@ int EIGEN_BLAS_FUNC(syr2)(char *uplo, int *n, RealScalar *palpha, RealScalar *pa func[code](*n, a, *inca, b, *incb, c, *ldc, alpha); return 1; } -*/ + #if ISCOMPLEX diff --git a/blas/level3_impl.h b/blas/level3_impl.h index c9023ab37..6a0e64392 100644 --- a/blas/level3_impl.h +++ b/blas/level3_impl.h @@ -308,6 +308,7 @@ int EIGEN_BLAS_FUNC(syr2k)(char *uplo, char *op, int *n, int *k, RealScalar *pal Scalar beta = *reinterpret_cast(pbeta); // TODO + std::cerr << "Eigen BLAS: _syr2k is not implemented yet\n"; return 0; } @@ -422,6 +423,7 @@ int EIGEN_BLAS_FUNC(her2k)(char *uplo, char *op, int *n, int *k, RealScalar *pal } // TODO + std::cerr << "Eigen BLAS: _her2k is not implemented yet\n"; return 0; } diff --git a/blas/xerbla.cpp b/blas/xerbla.cpp index ce43d3c38..2e7ad6eff 100644 --- a/blas/xerbla.cpp +++ b/blas/xerbla.cpp @@ -9,6 +9,7 @@ extern "C" int xerbla_(char * msg, int *info, int) { std::cerr << "Eigen BLAS ERROR #" << *info << ": " << msg << "\n"; + return 0; } #ifdef __cplusplus