From 0ed5edd24dc72404dd9f2a998d7a6b742d29ec9d Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 2 Mar 2010 14:50:41 +0100 Subject: [PATCH] blas: add a default implementation of xerbla --- blas/CMakeLists.txt | 2 +- blas/level1_impl.h | 6 +++--- blas/xerbla.cpp | 16 ++++++++++++++++ 3 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 blas/xerbla.cpp diff --git a/blas/CMakeLists.txt b/blas/CMakeLists.txt index ee67fe519..e71076f9d 100644 --- a/blas/CMakeLists.txt +++ b/blas/CMakeLists.txt @@ -2,7 +2,7 @@ project(EigenBlas) add_custom_target(blas) -set(EigenBlas_SRCS single.cpp double.cpp complex_single.cpp complex_double.cpp) +set(EigenBlas_SRCS single.cpp double.cpp complex_single.cpp complex_double.cpp xerbla.cpp) add_library(eigen_blas ${EigenBlas_SRCS}) # add_library(eigen_blas SHARED ${EigenBlas_SRCS}) diff --git a/blas/level1_impl.h b/blas/level1_impl.h index fd680b819..08fd0b6d6 100644 --- a/blas/level1_impl.h +++ b/blas/level1_impl.h @@ -289,7 +289,7 @@ int EIGEN_BLAS_FUNC(scal)(int *n, RealScalar *palpha, RealScalar *px, int *incx) Scalar* x = reinterpret_cast(px); Scalar alpha = *reinterpret_cast(palpha); - std::cerr << "_scal " << *n << " " << alpha << " " << *incx << "\n"; +// std::cerr << "_scal " << *n << " " << alpha << " " << *incx << "\n"; if(*n<=0) return 0; @@ -306,7 +306,7 @@ int EIGEN_CAT(EIGEN_CAT(SCALAR_SUFFIX,REAL_SCALAR_SUFFIX),scal_)(int *n, RealSca Scalar* x = reinterpret_cast(px); RealScalar alpha = *palpha; - std::cerr << "__scal " << *n << " " << alpha << " " << *incx << "\n"; +// std::cerr << "__scal " << *n << " " << alpha << " " << *incx << "\n"; if(*n<=0) return 0; @@ -320,7 +320,7 @@ int EIGEN_CAT(EIGEN_CAT(SCALAR_SUFFIX,REAL_SCALAR_SUFFIX),scal_)(int *n, RealSca int EIGEN_BLAS_FUNC(swap)(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy) { - std::cerr << "_swap " << *n << " " << *incx << " " << *incy << "\n"; +// std::cerr << "_swap " << *n << " " << *incx << " " << *incy << "\n"; Scalar* x = reinterpret_cast(px); Scalar* y = reinterpret_cast(py); diff --git a/blas/xerbla.cpp b/blas/xerbla.cpp new file mode 100644 index 000000000..ce43d3c38 --- /dev/null +++ b/blas/xerbla.cpp @@ -0,0 +1,16 @@ + +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +int xerbla_(char * msg, int *info, int) +{ + std::cerr << "Eigen BLAS ERROR #" << *info << ": " << msg << "\n"; +} + +#ifdef __cplusplus +} +#endif