blas: add warnings for non implemented functions

This commit is contained in:
Gael Guennebaud 2010-03-03 09:32:10 +01:00
parent 32823caa62
commit f1d3101956
4 changed files with 31 additions and 10 deletions

View File

@ -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. // 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) 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; return;
// TODO: find how to return a complex to fortran // 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. // 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) 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; return;
// TODO: find how to return a complex to fortran // TODO: find how to return a complex to fortran

View File

@ -56,9 +56,11 @@ int EIGEN_BLAS_FUNC(gemv)(char *opa, int *m, int *n, RealScalar *palpha, RealSca
return 1; return 1;
} }
/*
int EIGEN_BLAS_FUNC(trsv)(char *uplo, char *opa, char *diag, int *n, RealScalar *pa, int *lda, RealScalar *pb, int *incb) 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); typedef void (*functype)(int, const Scalar *, int, Scalar *, int);
functype func[16]; functype func[16];
@ -95,13 +97,14 @@ int EIGEN_BLAS_FUNC(trsv)(char *uplo, char *opa, char *diag, int *n, RealScalar
return 0; return 0;
func[code](*n, a, *lda, b, *incb); 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) int EIGEN_BLAS_FUNC(trmv)(char *uplo, char *opa, char *diag, int *n, RealScalar *pa, int *lda, RealScalar *pb, int *incb)
{ {
return 0;
// TODO // TODO
typedef void (*functype)(int, const Scalar *, int, const Scalar *, int, Scalar *, int); 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; return 0;
func[code](*n, a, *lda, b, *incb, b, *incb); 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) int EIGEN_BLAS_FUNC(syr)(char *uplo, int *n, RealScalar *palpha, RealScalar *pa, int *inca, RealScalar *pc, int *ldc)
{ {
return 0;
// TODO // TODO
typedef void (*functype)(int, const Scalar *, int, Scalar *, int, Scalar); typedef void (*functype)(int, const Scalar *, int, Scalar *, int, Scalar);
functype func[2]; 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); func[code](*n, a, *inca, c, *ldc, alpha);
return 1; 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) 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 // TODO
typedef void (*functype)(int, const Scalar *, int, const Scalar *, int, Scalar *, int, Scalar); typedef void (*functype)(int, const Scalar *, int, const Scalar *, int, Scalar *, int, Scalar);
functype func[2]; 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); func[code](*n, a, *inca, b, *incb, c, *ldc, alpha);
return 1; return 1;
} }
*/
#if ISCOMPLEX #if ISCOMPLEX

View File

@ -308,6 +308,7 @@ int EIGEN_BLAS_FUNC(syr2k)(char *uplo, char *op, int *n, int *k, RealScalar *pal
Scalar beta = *reinterpret_cast<Scalar*>(pbeta); Scalar beta = *reinterpret_cast<Scalar*>(pbeta);
// TODO // TODO
std::cerr << "Eigen BLAS: _syr2k is not implemented yet\n";
return 0; return 0;
} }
@ -422,6 +423,7 @@ int EIGEN_BLAS_FUNC(her2k)(char *uplo, char *op, int *n, int *k, RealScalar *pal
} }
// TODO // TODO
std::cerr << "Eigen BLAS: _her2k is not implemented yet\n";
return 0; return 0;
} }

View File

@ -9,6 +9,7 @@ extern "C"
int xerbla_(char * msg, int *info, int) int xerbla_(char * msg, int *info, int)
{ {
std::cerr << "Eigen BLAS ERROR #" << *info << ": " << msg << "\n"; std::cerr << "Eigen BLAS ERROR #" << *info << ": " << msg << "\n";
return 0;
} }
#ifdef __cplusplus #ifdef __cplusplus