aboutsummaryrefslogtreecommitdiffhomepage
path: root/blas
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2010-03-02 14:50:41 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2010-03-02 14:50:41 +0100
commit0ed5edd24dc72404dd9f2a998d7a6b742d29ec9d (patch)
treea1707ff775412891f52c3e2d3cce0748a2e7e6a2 /blas
parenta76c296e7f56e912e265ee44e565c284cbdd011e (diff)
blas: add a default implementation of xerbla
Diffstat (limited to 'blas')
-rw-r--r--blas/CMakeLists.txt2
-rw-r--r--blas/level1_impl.h6
-rw-r--r--blas/xerbla.cpp16
3 files changed, 20 insertions, 4 deletions
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<Scalar*>(px);
Scalar alpha = *reinterpret_cast<Scalar*>(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<Scalar*>(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<Scalar*>(px);
Scalar* y = reinterpret_cast<Scalar*>(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 <iostream>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+int xerbla_(char * msg, int *info, int)
+{
+ std::cerr << "Eigen BLAS ERROR #" << *info << ": " << msg << "\n";
+}
+
+#ifdef __cplusplus
+}
+#endif