mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-12 17:33:15 +08:00
blas: add a default implementation of xerbla
This commit is contained in:
parent
a76c296e7f
commit
0ed5edd24d
@ -2,7 +2,7 @@ project(EigenBlas)
|
|||||||
|
|
||||||
add_custom_target(blas)
|
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 ${EigenBlas_SRCS})
|
||||||
# add_library(eigen_blas SHARED ${EigenBlas_SRCS})
|
# add_library(eigen_blas SHARED ${EigenBlas_SRCS})
|
||||||
|
@ -289,7 +289,7 @@ int EIGEN_BLAS_FUNC(scal)(int *n, RealScalar *palpha, RealScalar *px, int *incx)
|
|||||||
Scalar* x = reinterpret_cast<Scalar*>(px);
|
Scalar* x = reinterpret_cast<Scalar*>(px);
|
||||||
Scalar alpha = *reinterpret_cast<Scalar*>(palpha);
|
Scalar alpha = *reinterpret_cast<Scalar*>(palpha);
|
||||||
|
|
||||||
std::cerr << "_scal " << *n << " " << alpha << " " << *incx << "\n";
|
// std::cerr << "_scal " << *n << " " << alpha << " " << *incx << "\n";
|
||||||
|
|
||||||
if(*n<=0)
|
if(*n<=0)
|
||||||
return 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);
|
Scalar* x = reinterpret_cast<Scalar*>(px);
|
||||||
RealScalar alpha = *palpha;
|
RealScalar alpha = *palpha;
|
||||||
|
|
||||||
std::cerr << "__scal " << *n << " " << alpha << " " << *incx << "\n";
|
// std::cerr << "__scal " << *n << " " << alpha << " " << *incx << "\n";
|
||||||
|
|
||||||
if(*n<=0)
|
if(*n<=0)
|
||||||
return 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)
|
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* x = reinterpret_cast<Scalar*>(px);
|
||||||
Scalar* y = reinterpret_cast<Scalar*>(py);
|
Scalar* y = reinterpret_cast<Scalar*>(py);
|
||||||
|
16
blas/xerbla.cpp
Normal file
16
blas/xerbla.cpp
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user