From 5361dea833df76fc0af1275e708940377dfc0851 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20S=C3=A1nchez?= Date: Wed, 14 Feb 2024 19:51:36 +0000 Subject: [PATCH] Remove return int types from BLAS/LAPACK functions. --- Eigen/src/misc/blas.h | 136 ++++----- blas/blas.h | 658 ++++++++++++++++++++-------------------- blas/common.h | 3 +- blas/double.cpp | 2 +- blas/f2c/chbmv.c | 22 +- blas/f2c/chpmv.c | 22 +- blas/f2c/complexdots.c | 12 +- blas/f2c/ctbmv.c | 33 +- blas/f2c/datatypes.h | 1 - blas/f2c/drotm.c | 6 +- blas/f2c/drotmg.c | 4 +- blas/f2c/dsbmv.c | 23 +- blas/f2c/dspmv.c | 22 +- blas/f2c/dtbmv.c | 31 +- blas/f2c/lsame.c | 2 +- blas/f2c/srotm.c | 4 +- blas/f2c/srotmg.c | 4 +- blas/f2c/ssbmv.c | 22 +- blas/f2c/sspmv.c | 22 +- blas/f2c/stbmv.c | 31 +- blas/f2c/zhbmv.c | 23 +- blas/f2c/zhpmv.c | 22 +- blas/f2c/ztbmv.c | 33 +- blas/level1_cplx_impl.h | 32 +- blas/level1_impl.h | 30 +- blas/level1_real_impl.h | 20 +- blas/level2_cplx_impl.h | 83 +++-- blas/level2_impl.h | 82 +++-- blas/level2_real_impl.h | 75 ++--- blas/level3_impl.h | 128 ++++---- blas/single.cpp | 2 +- blas/xerbla.cpp | 5 +- lapack/cholesky.inc | 13 +- lapack/eigenvalues.inc | 14 +- lapack/lapack.h | 206 ++++++------- lapack/lapack_common.h | 13 +- lapack/lu.inc | 20 +- lapack/svd.inc | 37 ++- 38 files changed, 888 insertions(+), 1010 deletions(-) diff --git a/Eigen/src/misc/blas.h b/Eigen/src/misc/blas.h index bb133bbf5..f12bc7cd9 100644 --- a/Eigen/src/misc/blas.h +++ b/Eigen/src/misc/blas.h @@ -7,89 +7,89 @@ extern "C" { /* Level 1 routines */ -int BLASFUNC(saxpy)(const int *, const float *, const float *, const int *, float *, const int *); -int BLASFUNC(daxpy)(const int *, const double *, const double *, const int *, double *, const int *); -int BLASFUNC(caxpy)(const int *, const float *, const float *, const int *, float *, const int *); -int BLASFUNC(zaxpy)(const int *, const double *, const double *, const int *, double *, const int *); +void BLASFUNC(saxpy)(const int *, const float *, const float *, const int *, float *, const int *); +void BLASFUNC(daxpy)(const int *, const double *, const double *, const int *, double *, const int *); +void BLASFUNC(caxpy)(const int *, const float *, const float *, const int *, float *, const int *); +void BLASFUNC(zaxpy)(const int *, const double *, const double *, const int *, double *, const int *); /* Level 2 routines */ -int BLASFUNC(sgemv)(const char *, const int *, const int *, const float *, const float *, const int *, const float *, - const int *, const float *, float *, const int *); -int BLASFUNC(dgemv)(const char *, const int *, const int *, const double *, const double *, const int *, const double *, - const int *, const double *, double *, const int *); -int BLASFUNC(cgemv)(const char *, const int *, const int *, const float *, const float *, const int *, const float *, - const int *, const float *, float *, const int *); -int BLASFUNC(zgemv)(const char *, const int *, const int *, const double *, const double *, const int *, const double *, - const int *, const double *, double *, const int *); +void BLASFUNC(sgemv)(const char *, const int *, const int *, const float *, const float *, const int *, const float *, + const int *, const float *, float *, const int *); +void BLASFUNC(dgemv)(const char *, const int *, const int *, const double *, const double *, const int *, + const double *, const int *, const double *, double *, const int *); +void BLASFUNC(cgemv)(const char *, const int *, const int *, const float *, const float *, const int *, const float *, + const int *, const float *, float *, const int *); +void BLASFUNC(zgemv)(const char *, const int *, const int *, const double *, const double *, const int *, + const double *, const int *, const double *, double *, const int *); -int BLASFUNC(strmv)(const char *, const char *, const char *, const int *, const float *, const int *, float *, - const int *); -int BLASFUNC(dtrmv)(const char *, const char *, const char *, const int *, const double *, const int *, double *, - const int *); -int BLASFUNC(ctrmv)(const char *, const char *, const char *, const int *, const float *, const int *, float *, - const int *); -int BLASFUNC(ztrmv)(const char *, const char *, const char *, const int *, const double *, const int *, double *, - const int *); +void BLASFUNC(strmv)(const char *, const char *, const char *, const int *, const float *, const int *, float *, + const int *); +void BLASFUNC(dtrmv)(const char *, const char *, const char *, const int *, const double *, const int *, double *, + const int *); +void BLASFUNC(ctrmv)(const char *, const char *, const char *, const int *, const float *, const int *, float *, + const int *); +void BLASFUNC(ztrmv)(const char *, const char *, const char *, const int *, const double *, const int *, double *, + const int *); -int BLASFUNC(ssymv)(const char *, const int *, const float *, const float *, const int *, const float *, const int *, - const float *, float *, const int *); -int BLASFUNC(dsymv)(const char *, const int *, const double *, const double *, const int *, const double *, const int *, - const double *, double *, const int *); +void BLASFUNC(ssymv)(const char *, const int *, const float *, const float *, const int *, const float *, const int *, + const float *, float *, const int *); +void BLASFUNC(dsymv)(const char *, const int *, const double *, const double *, const int *, const double *, + const int *, const double *, double *, const int *); -int BLASFUNC(chemv)(const char *, const int *, const float *, const float *, const int *, const float *, const int *, - const float *, float *, const int *); -int BLASFUNC(zhemv)(const char *, const int *, const double *, const double *, const int *, const double *, const int *, - const double *, double *, const int *); +void BLASFUNC(chemv)(const char *, const int *, const float *, const float *, const int *, const float *, const int *, + const float *, float *, const int *); +void BLASFUNC(zhemv)(const char *, const int *, const double *, const double *, const int *, const double *, + const int *, const double *, double *, const int *); /* Level 3 routines */ -int BLASFUNC(sgemm)(const char *, const char *, const int *, const int *, const int *, const float *, const float *, - const int *, const float *, const int *, const float *, float *, const int *); -int BLASFUNC(dgemm)(const char *, const char *, const int *, const int *, const int *, const double *, const double *, - const int *, const double *, const int *, const double *, double *, const int *); -int BLASFUNC(cgemm)(const char *, const char *, const int *, const int *, const int *, const float *, const float *, - const int *, const float *, const int *, const float *, float *, const int *); -int BLASFUNC(zgemm)(const char *, const char *, const int *, const int *, const int *, const double *, const double *, - const int *, const double *, const int *, const double *, double *, const int *); +void BLASFUNC(sgemm)(const char *, const char *, const int *, const int *, const int *, const float *, const float *, + const int *, const float *, const int *, const float *, float *, const int *); +void BLASFUNC(dgemm)(const char *, const char *, const int *, const int *, const int *, const double *, const double *, + const int *, const double *, const int *, const double *, double *, const int *); +void BLASFUNC(cgemm)(const char *, const char *, const int *, const int *, const int *, const float *, const float *, + const int *, const float *, const int *, const float *, float *, const int *); +void BLASFUNC(zgemm)(const char *, const char *, const int *, const int *, const int *, const double *, const double *, + const int *, const double *, const int *, const double *, double *, const int *); -int BLASFUNC(strsm)(const char *, const char *, const char *, const char *, const int *, const int *, const float *, - const float *, const int *, float *, const int *); -int BLASFUNC(dtrsm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, - const double *, const int *, double *, const int *); -int BLASFUNC(ctrsm)(const char *, const char *, const char *, const char *, const int *, const int *, const float *, - const float *, const int *, float *, const int *); -int BLASFUNC(ztrsm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, - const double *, const int *, double *, const int *); +void BLASFUNC(strsm)(const char *, const char *, const char *, const char *, const int *, const int *, const float *, + const float *, const int *, float *, const int *); +void BLASFUNC(dtrsm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, + const double *, const int *, double *, const int *); +void BLASFUNC(ctrsm)(const char *, const char *, const char *, const char *, const int *, const int *, const float *, + const float *, const int *, float *, const int *); +void BLASFUNC(ztrsm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, + const double *, const int *, double *, const int *); -int BLASFUNC(strmm)(const char *, const char *, const char *, const char *, const int *, const int *, const float *, - const float *, const int *, float *, const int *); -int BLASFUNC(dtrmm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, - const double *, const int *, double *, const int *); -int BLASFUNC(ctrmm)(const char *, const char *, const char *, const char *, const int *, const int *, const float *, - const float *, const int *, float *, const int *); -int BLASFUNC(ztrmm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, - const double *, const int *, double *, const int *); +void BLASFUNC(strmm)(const char *, const char *, const char *, const char *, const int *, const int *, const float *, + const float *, const int *, float *, const int *); +void BLASFUNC(dtrmm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, + const double *, const int *, double *, const int *); +void BLASFUNC(ctrmm)(const char *, const char *, const char *, const char *, const int *, const int *, const float *, + const float *, const int *, float *, const int *); +void BLASFUNC(ztrmm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, + const double *, const int *, double *, const int *); -int BLASFUNC(ssymm)(const char *, const char *, const int *, const int *, const float *, const float *, const int *, - const float *, const int *, const float *, float *, const int *); -int BLASFUNC(dsymm)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, - const double *, const int *, const double *, double *, const int *); +void BLASFUNC(ssymm)(const char *, const char *, const int *, const int *, const float *, const float *, const int *, + const float *, const int *, const float *, float *, const int *); +void BLASFUNC(dsymm)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, + const double *, const int *, const double *, double *, const int *); -int BLASFUNC(ssyrk)(const char *, const char *, const int *, const int *, const float *, const float *, const int *, - const float *, float *, const int *); -int BLASFUNC(dsyrk)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, - const double *, double *, const int *); +void BLASFUNC(ssyrk)(const char *, const char *, const int *, const int *, const float *, const float *, const int *, + const float *, float *, const int *); +void BLASFUNC(dsyrk)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, + const double *, double *, const int *); -int BLASFUNC(chemm)(const char *, const char *, const int *, const int *, const float *, const float *, const int *, - const float *, const int *, const float *, float *, const int *); -int BLASFUNC(zhemm)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, - const double *, const int *, const double *, double *, const int *); +void BLASFUNC(chemm)(const char *, const char *, const int *, const int *, const float *, const float *, const int *, + const float *, const int *, const float *, float *, const int *); +void BLASFUNC(zhemm)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, + const double *, const int *, const double *, double *, const int *); -int BLASFUNC(cherk)(const char *, const char *, const int *, const int *, const float *, const float *, const int *, - const float *, float *, const int *); -int BLASFUNC(zherk)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, - const double *, double *, const int *); +void BLASFUNC(cherk)(const char *, const char *, const int *, const int *, const float *, const float *, const int *, + const float *, float *, const int *); +void BLASFUNC(zherk)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, + const double *, double *, const int *); #undef BLASFUNC } diff --git a/blas/blas.h b/blas/blas.h index 69a926286..8962dc954 100644 --- a/blas/blas.h +++ b/blas/blas.h @@ -15,7 +15,7 @@ typedef long BLASLONG; typedef unsigned long BLASULONG; #endif -int BLASFUNC(xerbla)(const char *, int *info, int); +void BLASFUNC(xerbla)(const char *, int *info); float BLASFUNC(sdot)(int *, float *, int *, float *, int *); float BLASFUNC(sdsdot)(int *, float *, float *, int *, float *, int *); @@ -24,34 +24,34 @@ double BLASFUNC(dsdot)(int *, float *, int *, float *, int *); double BLASFUNC(ddot)(int *, double *, int *, double *, int *); double BLASFUNC(qdot)(int *, double *, int *, double *, int *); -int BLASFUNC(cdotuw)(int *, float *, int *, float *, int *, float *); -int BLASFUNC(cdotcw)(int *, float *, int *, float *, int *, float *); -int BLASFUNC(zdotuw)(int *, double *, int *, double *, int *, double *); -int BLASFUNC(zdotcw)(int *, double *, int *, double *, int *, double *); +void BLASFUNC(cdotuw)(int *, float *, int *, float *, int *, float *); +void BLASFUNC(cdotcw)(int *, float *, int *, float *, int *, float *); +void BLASFUNC(zdotuw)(int *, double *, int *, double *, int *, double *); +void BLASFUNC(zdotcw)(int *, double *, int *, double *, int *, double *); -int BLASFUNC(saxpy)(const int *, const float *, const float *, const int *, float *, const int *); -int BLASFUNC(daxpy)(const int *, const double *, const double *, const int *, double *, const int *); -int BLASFUNC(qaxpy)(const int *, const double *, const double *, const int *, double *, const int *); -int BLASFUNC(caxpy)(const int *, const float *, const float *, const int *, float *, const int *); -int BLASFUNC(zaxpy)(const int *, const double *, const double *, const int *, double *, const int *); -int BLASFUNC(xaxpy)(const int *, const double *, const double *, const int *, double *, const int *); -int BLASFUNC(caxpyc)(const int *, const float *, const float *, const int *, float *, const int *); -int BLASFUNC(zaxpyc)(const int *, const double *, const double *, const int *, double *, const int *); -int BLASFUNC(xaxpyc)(const int *, const double *, const double *, const int *, double *, const int *); +void BLASFUNC(saxpy)(const int *, const float *, const float *, const int *, float *, const int *); +void BLASFUNC(daxpy)(const int *, const double *, const double *, const int *, double *, const int *); +void BLASFUNC(qaxpy)(const int *, const double *, const double *, const int *, double *, const int *); +void BLASFUNC(caxpy)(const int *, const float *, const float *, const int *, float *, const int *); +void BLASFUNC(zaxpy)(const int *, const double *, const double *, const int *, double *, const int *); +void BLASFUNC(xaxpy)(const int *, const double *, const double *, const int *, double *, const int *); +void BLASFUNC(caxpyc)(const int *, const float *, const float *, const int *, float *, const int *); +void BLASFUNC(zaxpyc)(const int *, const double *, const double *, const int *, double *, const int *); +void BLASFUNC(xaxpyc)(const int *, const double *, const double *, const int *, double *, const int *); -int BLASFUNC(scopy)(int *, float *, int *, float *, int *); -int BLASFUNC(dcopy)(int *, double *, int *, double *, int *); -int BLASFUNC(qcopy)(int *, double *, int *, double *, int *); -int BLASFUNC(ccopy)(int *, float *, int *, float *, int *); -int BLASFUNC(zcopy)(int *, double *, int *, double *, int *); -int BLASFUNC(xcopy)(int *, double *, int *, double *, int *); +void BLASFUNC(scopy)(int *, float *, int *, float *, int *); +void BLASFUNC(dcopy)(int *, double *, int *, double *, int *); +void BLASFUNC(qcopy)(int *, double *, int *, double *, int *); +void BLASFUNC(ccopy)(int *, float *, int *, float *, int *); +void BLASFUNC(zcopy)(int *, double *, int *, double *, int *); +void BLASFUNC(xcopy)(int *, double *, int *, double *, int *); -int BLASFUNC(sswap)(int *, float *, int *, float *, int *); -int BLASFUNC(dswap)(int *, double *, int *, double *, int *); -int BLASFUNC(qswap)(int *, double *, int *, double *, int *); -int BLASFUNC(cswap)(int *, float *, int *, float *, int *); -int BLASFUNC(zswap)(int *, double *, int *, double *, int *); -int BLASFUNC(xswap)(int *, double *, int *, double *, int *); +void BLASFUNC(sswap)(int *, float *, int *, float *, int *); +void BLASFUNC(dswap)(int *, double *, int *, double *, int *); +void BLASFUNC(qswap)(int *, double *, int *, double *, int *); +void BLASFUNC(cswap)(int *, float *, int *, float *, int *); +void BLASFUNC(zswap)(int *, double *, int *, double *, int *); +void BLASFUNC(xswap)(int *, double *, int *, double *, int *); float BLASFUNC(sasum)(int *, float *, int *); float BLASFUNC(scasum)(int *, float *, int *); @@ -116,15 +116,15 @@ float BLASFUNC(scmin)(int *, float *, int *); double BLASFUNC(dzmin)(int *, double *, int *); double BLASFUNC(qxmin)(int *, double *, int *); -int BLASFUNC(sscal)(int *, float *, float *, int *); -int BLASFUNC(dscal)(int *, double *, double *, int *); -int BLASFUNC(qscal)(int *, double *, double *, int *); -int BLASFUNC(cscal)(int *, float *, float *, int *); -int BLASFUNC(zscal)(int *, double *, double *, int *); -int BLASFUNC(xscal)(int *, double *, double *, int *); -int BLASFUNC(csscal)(int *, float *, float *, int *); -int BLASFUNC(zdscal)(int *, double *, double *, int *); -int BLASFUNC(xqscal)(int *, double *, double *, int *); +void BLASFUNC(sscal)(int *, float *, float *, int *); +void BLASFUNC(dscal)(int *, double *, double *, int *); +void BLASFUNC(qscal)(int *, double *, double *, int *); +void BLASFUNC(cscal)(int *, float *, float *, int *); +void BLASFUNC(zscal)(int *, double *, double *, int *); +void BLASFUNC(xscal)(int *, double *, double *, int *); +void BLASFUNC(csscal)(int *, float *, float *, int *); +void BLASFUNC(zdscal)(int *, double *, double *, int *); +void BLASFUNC(xqscal)(int *, double *, double *, int *); float BLASFUNC(snrm2)(int *, float *, int *); float BLASFUNC(scnrm2)(int *, float *, int *); @@ -134,335 +134,335 @@ double BLASFUNC(qnrm2)(int *, double *, int *); double BLASFUNC(dznrm2)(int *, double *, int *); double BLASFUNC(qxnrm2)(int *, double *, int *); -int BLASFUNC(srot)(int *, float *, int *, float *, int *, float *, float *); -int BLASFUNC(drot)(int *, double *, int *, double *, int *, double *, double *); -int BLASFUNC(qrot)(int *, double *, int *, double *, int *, double *, double *); -int BLASFUNC(csrot)(int *, float *, int *, float *, int *, float *, float *); -int BLASFUNC(zdrot)(int *, double *, int *, double *, int *, double *, double *); -int BLASFUNC(xqrot)(int *, double *, int *, double *, int *, double *, double *); +void BLASFUNC(srot)(int *, float *, int *, float *, int *, float *, float *); +void BLASFUNC(drot)(int *, double *, int *, double *, int *, double *, double *); +void BLASFUNC(qrot)(int *, double *, int *, double *, int *, double *, double *); +void BLASFUNC(csrot)(int *, float *, int *, float *, int *, float *, float *); +void BLASFUNC(zdrot)(int *, double *, int *, double *, int *, double *, double *); +void BLASFUNC(xqrot)(int *, double *, int *, double *, int *, double *, double *); -int BLASFUNC(srotg)(float *, float *, float *, float *); -int BLASFUNC(drotg)(double *, double *, double *, double *); -int BLASFUNC(qrotg)(double *, double *, double *, double *); -int BLASFUNC(crotg)(float *, float *, float *, float *); -int BLASFUNC(zrotg)(double *, double *, double *, double *); -int BLASFUNC(xrotg)(double *, double *, double *, double *); +void BLASFUNC(srotg)(float *, float *, float *, float *); +void BLASFUNC(drotg)(double *, double *, double *, double *); +void BLASFUNC(qrotg)(double *, double *, double *, double *); +void BLASFUNC(crotg)(float *, float *, float *, float *); +void BLASFUNC(zrotg)(double *, double *, double *, double *); +void BLASFUNC(xrotg)(double *, double *, double *, double *); -int BLASFUNC(srotmg)(float *, float *, float *, float *, float *); -int BLASFUNC(drotmg)(double *, double *, double *, double *, double *); +void BLASFUNC(srotmg)(float *, float *, float *, float *, float *); +void BLASFUNC(drotmg)(double *, double *, double *, double *, double *); -int BLASFUNC(srotm)(int *, float *, int *, float *, int *, float *); -int BLASFUNC(drotm)(int *, double *, int *, double *, int *, double *); -int BLASFUNC(qrotm)(int *, double *, int *, double *, int *, double *); +void BLASFUNC(srotm)(int *, float *, int *, float *, int *, float *); +void BLASFUNC(drotm)(int *, double *, int *, double *, int *, double *); +void BLASFUNC(qrotm)(int *, double *, int *, double *, int *, double *); /* Level 2 routines */ -int BLASFUNC(sger)(int *, int *, float *, float *, int *, float *, int *, float *, int *); -int BLASFUNC(dger)(int *, int *, double *, double *, int *, double *, int *, double *, int *); -int BLASFUNC(qger)(int *, int *, double *, double *, int *, double *, int *, double *, int *); -int BLASFUNC(cgeru)(int *, int *, float *, float *, int *, float *, int *, float *, int *); -int BLASFUNC(cgerc)(int *, int *, float *, float *, int *, float *, int *, float *, int *); -int BLASFUNC(zgeru)(int *, int *, double *, double *, int *, double *, int *, double *, int *); -int BLASFUNC(zgerc)(int *, int *, double *, double *, int *, double *, int *, double *, int *); -int BLASFUNC(xgeru)(int *, int *, double *, double *, int *, double *, int *, double *, int *); -int BLASFUNC(xgerc)(int *, int *, double *, double *, int *, double *, int *, double *, int *); +void BLASFUNC(sger)(int *, int *, float *, float *, int *, float *, int *, float *, int *); +void BLASFUNC(dger)(int *, int *, double *, double *, int *, double *, int *, double *, int *); +void BLASFUNC(qger)(int *, int *, double *, double *, int *, double *, int *, double *, int *); +void BLASFUNC(cgeru)(int *, int *, float *, float *, int *, float *, int *, float *, int *); +void BLASFUNC(cgerc)(int *, int *, float *, float *, int *, float *, int *, float *, int *); +void BLASFUNC(zgeru)(int *, int *, double *, double *, int *, double *, int *, double *, int *); +void BLASFUNC(zgerc)(int *, int *, double *, double *, int *, double *, int *, double *, int *); +void BLASFUNC(xgeru)(int *, int *, double *, double *, int *, double *, int *, double *, int *); +void BLASFUNC(xgerc)(int *, int *, double *, double *, int *, double *, int *, double *, int *); -int BLASFUNC(sgemv)(const char *, const int *, const int *, const float *, const float *, const int *, const float *, - const int *, const float *, float *, const int *); -int BLASFUNC(dgemv)(const char *, const int *, const int *, const double *, const double *, const int *, const double *, - const int *, const double *, double *, const int *); -int BLASFUNC(qgemv)(const char *, const int *, const int *, const double *, const double *, const int *, const double *, - const int *, const double *, double *, const int *); -int BLASFUNC(cgemv)(const char *, const int *, const int *, const float *, const float *, const int *, const float *, - const int *, const float *, float *, const int *); -int BLASFUNC(zgemv)(const char *, const int *, const int *, const double *, const double *, const int *, const double *, - const int *, const double *, double *, const int *); -int BLASFUNC(xgemv)(const char *, const int *, const int *, const double *, const double *, const int *, const double *, - const int *, const double *, double *, const int *); +void BLASFUNC(sgemv)(const char *, const int *, const int *, const float *, const float *, const int *, const float *, + const int *, const float *, float *, const int *); +void BLASFUNC(dgemv)(const char *, const int *, const int *, const double *, const double *, const int *, + const double *, const int *, const double *, double *, const int *); +void BLASFUNC(qgemv)(const char *, const int *, const int *, const double *, const double *, const int *, + const double *, const int *, const double *, double *, const int *); +void BLASFUNC(cgemv)(const char *, const int *, const int *, const float *, const float *, const int *, const float *, + const int *, const float *, float *, const int *); +void BLASFUNC(zgemv)(const char *, const int *, const int *, const double *, const double *, const int *, + const double *, const int *, const double *, double *, const int *); +void BLASFUNC(xgemv)(const char *, const int *, const int *, const double *, const double *, const int *, + const double *, const int *, const double *, double *, const int *); -int BLASFUNC(strsv)(const char *, const char *, const char *, const int *, const float *, const int *, float *, - const int *); -int BLASFUNC(dtrsv)(const char *, const char *, const char *, const int *, const double *, const int *, double *, - const int *); -int BLASFUNC(qtrsv)(const char *, const char *, const char *, const int *, const double *, const int *, double *, - const int *); -int BLASFUNC(ctrsv)(const char *, const char *, const char *, const int *, const float *, const int *, float *, - const int *); -int BLASFUNC(ztrsv)(const char *, const char *, const char *, const int *, const double *, const int *, double *, - const int *); -int BLASFUNC(xtrsv)(const char *, const char *, const char *, const int *, const double *, const int *, double *, - const int *); +void BLASFUNC(strsv)(const char *, const char *, const char *, const int *, const float *, const int *, float *, + const int *); +void BLASFUNC(dtrsv)(const char *, const char *, const char *, const int *, const double *, const int *, double *, + const int *); +void BLASFUNC(qtrsv)(const char *, const char *, const char *, const int *, const double *, const int *, double *, + const int *); +void BLASFUNC(ctrsv)(const char *, const char *, const char *, const int *, const float *, const int *, float *, + const int *); +void BLASFUNC(ztrsv)(const char *, const char *, const char *, const int *, const double *, const int *, double *, + const int *); +void BLASFUNC(xtrsv)(const char *, const char *, const char *, const int *, const double *, const int *, double *, + const int *); -int BLASFUNC(stpsv)(char *, char *, char *, int *, float *, float *, int *); -int BLASFUNC(dtpsv)(char *, char *, char *, int *, double *, double *, int *); -int BLASFUNC(qtpsv)(char *, char *, char *, int *, double *, double *, int *); -int BLASFUNC(ctpsv)(char *, char *, char *, int *, float *, float *, int *); -int BLASFUNC(ztpsv)(char *, char *, char *, int *, double *, double *, int *); -int BLASFUNC(xtpsv)(char *, char *, char *, int *, double *, double *, int *); +void BLASFUNC(stpsv)(char *, char *, char *, int *, float *, float *, int *); +void BLASFUNC(dtpsv)(char *, char *, char *, int *, double *, double *, int *); +void BLASFUNC(qtpsv)(char *, char *, char *, int *, double *, double *, int *); +void BLASFUNC(ctpsv)(char *, char *, char *, int *, float *, float *, int *); +void BLASFUNC(ztpsv)(char *, char *, char *, int *, double *, double *, int *); +void BLASFUNC(xtpsv)(char *, char *, char *, int *, double *, double *, int *); -int BLASFUNC(strmv)(const char *, const char *, const char *, const int *, const float *, const int *, float *, - const int *); -int BLASFUNC(dtrmv)(const char *, const char *, const char *, const int *, const double *, const int *, double *, - const int *); -int BLASFUNC(qtrmv)(const char *, const char *, const char *, const int *, const double *, const int *, double *, - const int *); -int BLASFUNC(ctrmv)(const char *, const char *, const char *, const int *, const float *, const int *, float *, - const int *); -int BLASFUNC(ztrmv)(const char *, const char *, const char *, const int *, const double *, const int *, double *, - const int *); -int BLASFUNC(xtrmv)(const char *, const char *, const char *, const int *, const double *, const int *, double *, - const int *); +void BLASFUNC(strmv)(const char *, const char *, const char *, const int *, const float *, const int *, float *, + const int *); +void BLASFUNC(dtrmv)(const char *, const char *, const char *, const int *, const double *, const int *, double *, + const int *); +void BLASFUNC(qtrmv)(const char *, const char *, const char *, const int *, const double *, const int *, double *, + const int *); +void BLASFUNC(ctrmv)(const char *, const char *, const char *, const int *, const float *, const int *, float *, + const int *); +void BLASFUNC(ztrmv)(const char *, const char *, const char *, const int *, const double *, const int *, double *, + const int *); +void BLASFUNC(xtrmv)(const char *, const char *, const char *, const int *, const double *, const int *, double *, + const int *); -int BLASFUNC(stpmv)(char *, char *, char *, int *, float *, float *, int *); -int BLASFUNC(dtpmv)(char *, char *, char *, int *, double *, double *, int *); -int BLASFUNC(qtpmv)(char *, char *, char *, int *, double *, double *, int *); -int BLASFUNC(ctpmv)(char *, char *, char *, int *, float *, float *, int *); -int BLASFUNC(ztpmv)(char *, char *, char *, int *, double *, double *, int *); -int BLASFUNC(xtpmv)(char *, char *, char *, int *, double *, double *, int *); +void BLASFUNC(stpmv)(char *, char *, char *, int *, float *, float *, int *); +void BLASFUNC(dtpmv)(char *, char *, char *, int *, double *, double *, int *); +void BLASFUNC(qtpmv)(char *, char *, char *, int *, double *, double *, int *); +void BLASFUNC(ctpmv)(char *, char *, char *, int *, float *, float *, int *); +void BLASFUNC(ztpmv)(char *, char *, char *, int *, double *, double *, int *); +void BLASFUNC(xtpmv)(char *, char *, char *, int *, double *, double *, int *); -int BLASFUNC(stbmv)(char *, char *, char *, int *, int *, float *, int *, float *, int *); -int BLASFUNC(dtbmv)(char *, char *, char *, int *, int *, double *, int *, double *, int *); -int BLASFUNC(qtbmv)(char *, char *, char *, int *, int *, double *, int *, double *, int *); -int BLASFUNC(ctbmv)(char *, char *, char *, int *, int *, float *, int *, float *, int *); -int BLASFUNC(ztbmv)(char *, char *, char *, int *, int *, double *, int *, double *, int *); -int BLASFUNC(xtbmv)(char *, char *, char *, int *, int *, double *, int *, double *, int *); +void BLASFUNC(stbmv)(char *, char *, char *, int *, int *, float *, int *, float *, int *); +void BLASFUNC(dtbmv)(char *, char *, char *, int *, int *, double *, int *, double *, int *); +void BLASFUNC(qtbmv)(char *, char *, char *, int *, int *, double *, int *, double *, int *); +void BLASFUNC(ctbmv)(char *, char *, char *, int *, int *, float *, int *, float *, int *); +void BLASFUNC(ztbmv)(char *, char *, char *, int *, int *, double *, int *, double *, int *); +void BLASFUNC(xtbmv)(char *, char *, char *, int *, int *, double *, int *, double *, int *); -int BLASFUNC(stbsv)(char *, char *, char *, int *, int *, float *, int *, float *, int *); -int BLASFUNC(dtbsv)(char *, char *, char *, int *, int *, double *, int *, double *, int *); -int BLASFUNC(qtbsv)(char *, char *, char *, int *, int *, double *, int *, double *, int *); -int BLASFUNC(ctbsv)(char *, char *, char *, int *, int *, float *, int *, float *, int *); -int BLASFUNC(ztbsv)(char *, char *, char *, int *, int *, double *, int *, double *, int *); -int BLASFUNC(xtbsv)(char *, char *, char *, int *, int *, double *, int *, double *, int *); +void BLASFUNC(stbsv)(char *, char *, char *, int *, int *, float *, int *, float *, int *); +void BLASFUNC(dtbsv)(char *, char *, char *, int *, int *, double *, int *, double *, int *); +void BLASFUNC(qtbsv)(char *, char *, char *, int *, int *, double *, int *, double *, int *); +void BLASFUNC(ctbsv)(char *, char *, char *, int *, int *, float *, int *, float *, int *); +void BLASFUNC(ztbsv)(char *, char *, char *, int *, int *, double *, int *, double *, int *); +void BLASFUNC(xtbsv)(char *, char *, char *, int *, int *, double *, int *, double *, int *); -int BLASFUNC(ssymv)(const char *, const int *, const float *, const float *, const int *, const float *, const int *, - const float *, float *, const int *); -int BLASFUNC(dsymv)(const char *, const int *, const double *, const double *, const int *, const double *, const int *, - const double *, double *, const int *); -int BLASFUNC(qsymv)(const char *, const int *, const double *, const double *, const int *, const double *, const int *, - const double *, double *, const int *); +void BLASFUNC(ssymv)(const char *, const int *, const float *, const float *, const int *, const float *, const int *, + const float *, float *, const int *); +void BLASFUNC(dsymv)(const char *, const int *, const double *, const double *, const int *, const double *, + const int *, const double *, double *, const int *); +void BLASFUNC(qsymv)(const char *, const int *, const double *, const double *, const int *, const double *, + const int *, const double *, double *, const int *); -int BLASFUNC(sspmv)(char *, int *, float *, float *, float *, int *, float *, float *, int *); -int BLASFUNC(dspmv)(char *, int *, double *, double *, double *, int *, double *, double *, int *); -int BLASFUNC(qspmv)(char *, int *, double *, double *, double *, int *, double *, double *, int *); +void BLASFUNC(sspmv)(char *, int *, float *, float *, float *, int *, float *, float *, int *); +void BLASFUNC(dspmv)(char *, int *, double *, double *, double *, int *, double *, double *, int *); +void BLASFUNC(qspmv)(char *, int *, double *, double *, double *, int *, double *, double *, int *); -int BLASFUNC(ssyr)(const char *, const int *, const float *, const float *, const int *, float *, const int *); -int BLASFUNC(dsyr)(const char *, const int *, const double *, const double *, const int *, double *, const int *); -int BLASFUNC(qsyr)(const char *, const int *, const double *, const double *, const int *, double *, const int *); +void BLASFUNC(ssyr)(const char *, const int *, const float *, const float *, const int *, float *, const int *); +void BLASFUNC(dsyr)(const char *, const int *, const double *, const double *, const int *, double *, const int *); +void BLASFUNC(qsyr)(const char *, const int *, const double *, const double *, const int *, double *, const int *); -int BLASFUNC(ssyr2)(const char *, const int *, const float *, const float *, const int *, const float *, const int *, - float *, const int *); -int BLASFUNC(dsyr2)(const char *, const int *, const double *, const double *, const int *, const double *, const int *, - double *, const int *); -int BLASFUNC(qsyr2)(const char *, const int *, const double *, const double *, const int *, const double *, const int *, - double *, const int *); -int BLASFUNC(csyr2)(const char *, const int *, const float *, const float *, const int *, const float *, const int *, - float *, const int *); -int BLASFUNC(zsyr2)(const char *, const int *, const double *, const double *, const int *, const double *, const int *, - double *, const int *); -int BLASFUNC(xsyr2)(const char *, const int *, const double *, const double *, const int *, const double *, const int *, - double *, const int *); +void BLASFUNC(ssyr2)(const char *, const int *, const float *, const float *, const int *, const float *, const int *, + float *, const int *); +void BLASFUNC(dsyr2)(const char *, const int *, const double *, const double *, const int *, const double *, + const int *, double *, const int *); +void BLASFUNC(qsyr2)(const char *, const int *, const double *, const double *, const int *, const double *, + const int *, double *, const int *); +void BLASFUNC(csyr2)(const char *, const int *, const float *, const float *, const int *, const float *, const int *, + float *, const int *); +void BLASFUNC(zsyr2)(const char *, const int *, const double *, const double *, const int *, const double *, + const int *, double *, const int *); +void BLASFUNC(xsyr2)(const char *, const int *, const double *, const double *, const int *, const double *, + const int *, double *, const int *); -int BLASFUNC(sspr)(char *, int *, float *, float *, int *, float *); -int BLASFUNC(dspr)(char *, int *, double *, double *, int *, double *); -int BLASFUNC(qspr)(char *, int *, double *, double *, int *, double *); +void BLASFUNC(sspr)(char *, int *, float *, float *, int *, float *); +void BLASFUNC(dspr)(char *, int *, double *, double *, int *, double *); +void BLASFUNC(qspr)(char *, int *, double *, double *, int *, double *); -int BLASFUNC(sspr2)(char *, int *, float *, float *, int *, float *, int *, float *); -int BLASFUNC(dspr2)(char *, int *, double *, double *, int *, double *, int *, double *); -int BLASFUNC(qspr2)(char *, int *, double *, double *, int *, double *, int *, double *); -int BLASFUNC(cspr2)(char *, int *, float *, float *, int *, float *, int *, float *); -int BLASFUNC(zspr2)(char *, int *, double *, double *, int *, double *, int *, double *); -int BLASFUNC(xspr2)(char *, int *, double *, double *, int *, double *, int *, double *); +void BLASFUNC(sspr2)(char *, int *, float *, float *, int *, float *, int *, float *); +void BLASFUNC(dspr2)(char *, int *, double *, double *, int *, double *, int *, double *); +void BLASFUNC(qspr2)(char *, int *, double *, double *, int *, double *, int *, double *); +void BLASFUNC(cspr2)(char *, int *, float *, float *, int *, float *, int *, float *); +void BLASFUNC(zspr2)(char *, int *, double *, double *, int *, double *, int *, double *); +void BLASFUNC(xspr2)(char *, int *, double *, double *, int *, double *, int *, double *); -int BLASFUNC(cher)(char *, int *, float *, float *, int *, float *, int *); -int BLASFUNC(zher)(char *, int *, double *, double *, int *, double *, int *); -int BLASFUNC(xher)(char *, int *, double *, double *, int *, double *, int *); +void BLASFUNC(cher)(char *, int *, float *, float *, int *, float *, int *); +void BLASFUNC(zher)(char *, int *, double *, double *, int *, double *, int *); +void BLASFUNC(xher)(char *, int *, double *, double *, int *, double *, int *); -int BLASFUNC(chpr)(char *, int *, float *, float *, int *, float *); -int BLASFUNC(zhpr)(char *, int *, double *, double *, int *, double *); -int BLASFUNC(xhpr)(char *, int *, double *, double *, int *, double *); +void BLASFUNC(chpr)(char *, int *, float *, float *, int *, float *); +void BLASFUNC(zhpr)(char *, int *, double *, double *, int *, double *); +void BLASFUNC(xhpr)(char *, int *, double *, double *, int *, double *); -int BLASFUNC(cher2)(char *, int *, float *, float *, int *, float *, int *, float *, int *); -int BLASFUNC(zher2)(char *, int *, double *, double *, int *, double *, int *, double *, int *); -int BLASFUNC(xher2)(char *, int *, double *, double *, int *, double *, int *, double *, int *); +void BLASFUNC(cher2)(char *, int *, float *, float *, int *, float *, int *, float *, int *); +void BLASFUNC(zher2)(char *, int *, double *, double *, int *, double *, int *, double *, int *); +void BLASFUNC(xher2)(char *, int *, double *, double *, int *, double *, int *, double *, int *); -int BLASFUNC(chpr2)(char *, int *, float *, float *, int *, float *, int *, float *); -int BLASFUNC(zhpr2)(char *, int *, double *, double *, int *, double *, int *, double *); -int BLASFUNC(xhpr2)(char *, int *, double *, double *, int *, double *, int *, double *); +void BLASFUNC(chpr2)(char *, int *, float *, float *, int *, float *, int *, float *); +void BLASFUNC(zhpr2)(char *, int *, double *, double *, int *, double *, int *, double *); +void BLASFUNC(xhpr2)(char *, int *, double *, double *, int *, double *, int *, double *); -int BLASFUNC(chemv)(const char *, const int *, const float *, const float *, const int *, const float *, const int *, - const float *, float *, const int *); -int BLASFUNC(zhemv)(const char *, const int *, const double *, const double *, const int *, const double *, const int *, - const double *, double *, const int *); -int BLASFUNC(xhemv)(const char *, const int *, const double *, const double *, const int *, const double *, const int *, - const double *, double *, const int *); +void BLASFUNC(chemv)(const char *, const int *, const float *, const float *, const int *, const float *, const int *, + const float *, float *, const int *); +void BLASFUNC(zhemv)(const char *, const int *, const double *, const double *, const int *, const double *, + const int *, const double *, double *, const int *); +void BLASFUNC(xhemv)(const char *, const int *, const double *, const double *, const int *, const double *, + const int *, const double *, double *, const int *); -int BLASFUNC(chpmv)(char *, int *, float *, float *, float *, int *, float *, float *, int *); -int BLASFUNC(zhpmv)(char *, int *, double *, double *, double *, int *, double *, double *, int *); -int BLASFUNC(xhpmv)(char *, int *, double *, double *, double *, int *, double *, double *, int *); +void BLASFUNC(chpmv)(char *, int *, float *, float *, float *, int *, float *, float *, int *); +void BLASFUNC(zhpmv)(char *, int *, double *, double *, double *, int *, double *, double *, int *); +void BLASFUNC(xhpmv)(char *, int *, double *, double *, double *, int *, double *, double *, int *); -int BLASFUNC(snorm)(char *, int *, int *, float *, int *); -int BLASFUNC(dnorm)(char *, int *, int *, double *, int *); -int BLASFUNC(cnorm)(char *, int *, int *, float *, int *); -int BLASFUNC(znorm)(char *, int *, int *, double *, int *); +void BLASFUNC(snorm)(char *, int *, int *, float *, int *); +void BLASFUNC(dnorm)(char *, int *, int *, double *, int *); +void BLASFUNC(cnorm)(char *, int *, int *, float *, int *); +void BLASFUNC(znorm)(char *, int *, int *, double *, int *); -int BLASFUNC(sgbmv)(char *, int *, int *, int *, int *, float *, float *, int *, float *, int *, float *, float *, - int *); -int BLASFUNC(dgbmv)(char *, int *, int *, int *, int *, double *, double *, int *, double *, int *, double *, double *, - int *); -int BLASFUNC(qgbmv)(char *, int *, int *, int *, int *, double *, double *, int *, double *, int *, double *, double *, - int *); -int BLASFUNC(cgbmv)(char *, int *, int *, int *, int *, float *, float *, int *, float *, int *, float *, float *, - int *); -int BLASFUNC(zgbmv)(char *, int *, int *, int *, int *, double *, double *, int *, double *, int *, double *, double *, - int *); -int BLASFUNC(xgbmv)(char *, int *, int *, int *, int *, double *, double *, int *, double *, int *, double *, double *, - int *); +void BLASFUNC(sgbmv)(char *, int *, int *, int *, int *, float *, float *, int *, float *, int *, float *, float *, + int *); +void BLASFUNC(dgbmv)(char *, int *, int *, int *, int *, double *, double *, int *, double *, int *, double *, double *, + int *); +void BLASFUNC(qgbmv)(char *, int *, int *, int *, int *, double *, double *, int *, double *, int *, double *, double *, + int *); +void BLASFUNC(cgbmv)(char *, int *, int *, int *, int *, float *, float *, int *, float *, int *, float *, float *, + int *); +void BLASFUNC(zgbmv)(char *, int *, int *, int *, int *, double *, double *, int *, double *, int *, double *, double *, + int *); +void BLASFUNC(xgbmv)(char *, int *, int *, int *, int *, double *, double *, int *, double *, int *, double *, double *, + int *); -int BLASFUNC(ssbmv)(char *, int *, int *, float *, float *, int *, float *, int *, float *, float *, int *); -int BLASFUNC(dsbmv)(char *, int *, int *, double *, double *, int *, double *, int *, double *, double *, int *); -int BLASFUNC(qsbmv)(char *, int *, int *, double *, double *, int *, double *, int *, double *, double *, int *); -int BLASFUNC(csbmv)(char *, int *, int *, float *, float *, int *, float *, int *, float *, float *, int *); -int BLASFUNC(zsbmv)(char *, int *, int *, double *, double *, int *, double *, int *, double *, double *, int *); -int BLASFUNC(xsbmv)(char *, int *, int *, double *, double *, int *, double *, int *, double *, double *, int *); +void BLASFUNC(ssbmv)(char *, int *, int *, float *, float *, int *, float *, int *, float *, float *, int *); +void BLASFUNC(dsbmv)(char *, int *, int *, double *, double *, int *, double *, int *, double *, double *, int *); +void BLASFUNC(qsbmv)(char *, int *, int *, double *, double *, int *, double *, int *, double *, double *, int *); +void BLASFUNC(csbmv)(char *, int *, int *, float *, float *, int *, float *, int *, float *, float *, int *); +void BLASFUNC(zsbmv)(char *, int *, int *, double *, double *, int *, double *, int *, double *, double *, int *); +void BLASFUNC(xsbmv)(char *, int *, int *, double *, double *, int *, double *, int *, double *, double *, int *); -int BLASFUNC(chbmv)(char *, int *, int *, float *, float *, int *, float *, int *, float *, float *, int *); -int BLASFUNC(zhbmv)(char *, int *, int *, double *, double *, int *, double *, int *, double *, double *, int *); -int BLASFUNC(xhbmv)(char *, int *, int *, double *, double *, int *, double *, int *, double *, double *, int *); +void BLASFUNC(chbmv)(char *, int *, int *, float *, float *, int *, float *, int *, float *, float *, int *); +void BLASFUNC(zhbmv)(char *, int *, int *, double *, double *, int *, double *, int *, double *, double *, int *); +void BLASFUNC(xhbmv)(char *, int *, int *, double *, double *, int *, double *, int *, double *, double *, int *); /* Level 3 routines */ -int BLASFUNC(sgemm)(const char *, const char *, const int *, const int *, const int *, const float *, const float *, - const int *, const float *, const int *, const float *, float *, const int *); -int BLASFUNC(dgemm)(const char *, const char *, const int *, const int *, const int *, const double *, const double *, - const int *, const double *, const int *, const double *, double *, const int *); -int BLASFUNC(qgemm)(const char *, const char *, const int *, const int *, const int *, const double *, const double *, - const int *, const double *, const int *, const double *, double *, const int *); -int BLASFUNC(cgemm)(const char *, const char *, const int *, const int *, const int *, const float *, const float *, - const int *, const float *, const int *, const float *, float *, const int *); -int BLASFUNC(zgemm)(const char *, const char *, const int *, const int *, const int *, const double *, const double *, - const int *, const double *, const int *, const double *, double *, const int *); -int BLASFUNC(xgemm)(const char *, const char *, const int *, const int *, const int *, const double *, const double *, - const int *, const double *, const int *, const double *, double *, const int *); - -int BLASFUNC(cgemm3m)(char *, char *, int *, int *, int *, float *, float *, int *, float *, int *, float *, float *, - int *); -int BLASFUNC(zgemm3m)(char *, char *, int *, int *, int *, double *, double *, int *, double *, int *, double *, - double *, int *); -int BLASFUNC(xgemm3m)(char *, char *, int *, int *, int *, double *, double *, int *, double *, int *, double *, - double *, int *); - -int BLASFUNC(sge2mm)(char *, char *, char *, int *, int *, float *, float *, int *, float *, int *, float *, float *, - int *); -int BLASFUNC(dge2mm)(char *, char *, char *, int *, int *, double *, double *, int *, double *, int *, double *, - double *, int *); -int BLASFUNC(cge2mm)(char *, char *, char *, int *, int *, float *, float *, int *, float *, int *, float *, float *, - int *); -int BLASFUNC(zge2mm)(char *, char *, char *, int *, int *, double *, double *, int *, double *, int *, double *, - double *, int *); - -int BLASFUNC(strsm)(const char *, const char *, const char *, const char *, const int *, const int *, const float *, - const float *, const int *, float *, const int *); -int BLASFUNC(dtrsm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, - const double *, const int *, double *, const int *); -int BLASFUNC(qtrsm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, - const double *, const int *, double *, const int *); -int BLASFUNC(ctrsm)(const char *, const char *, const char *, const char *, const int *, const int *, const float *, - const float *, const int *, float *, const int *); -int BLASFUNC(ztrsm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, - const double *, const int *, double *, const int *); -int BLASFUNC(xtrsm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, - const double *, const int *, double *, const int *); - -int BLASFUNC(strmm)(const char *, const char *, const char *, const char *, const int *, const int *, const float *, - const float *, const int *, float *, const int *); -int BLASFUNC(dtrmm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, - const double *, const int *, double *, const int *); -int BLASFUNC(qtrmm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, - const double *, const int *, double *, const int *); -int BLASFUNC(ctrmm)(const char *, const char *, const char *, const char *, const int *, const int *, const float *, - const float *, const int *, float *, const int *); -int BLASFUNC(ztrmm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, - const double *, const int *, double *, const int *); -int BLASFUNC(xtrmm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, - const double *, const int *, double *, const int *); - -int BLASFUNC(ssymm)(const char *, const char *, const int *, const int *, const float *, const float *, const int *, - const float *, const int *, const float *, float *, const int *); -int BLASFUNC(dsymm)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, - const double *, const int *, const double *, double *, const int *); -int BLASFUNC(qsymm)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, - const double *, const int *, const double *, double *, const int *); -int BLASFUNC(csymm)(const char *, const char *, const int *, const int *, const float *, const float *, const int *, - const float *, const int *, const float *, float *, const int *); -int BLASFUNC(zsymm)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, - const double *, const int *, const double *, double *, const int *); -int BLASFUNC(xsymm)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, - const double *, const int *, const double *, double *, const int *); - -int BLASFUNC(csymm3m)(char *, char *, int *, int *, float *, float *, int *, float *, int *, float *, float *, int *); -int BLASFUNC(zsymm3m)(char *, char *, int *, int *, double *, double *, int *, double *, int *, double *, double *, - int *); -int BLASFUNC(xsymm3m)(char *, char *, int *, int *, double *, double *, int *, double *, int *, double *, double *, - int *); - -int BLASFUNC(ssyrk)(const char *, const char *, const int *, const int *, const float *, const float *, const int *, - const float *, float *, const int *); -int BLASFUNC(dsyrk)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, - const double *, double *, const int *); -int BLASFUNC(qsyrk)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, - const double *, double *, const int *); -int BLASFUNC(csyrk)(const char *, const char *, const int *, const int *, const float *, const float *, const int *, - const float *, float *, const int *); -int BLASFUNC(zsyrk)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, - const double *, double *, const int *); -int BLASFUNC(xsyrk)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, - const double *, double *, const int *); - -int BLASFUNC(ssyr2k)(const char *, const char *, const int *, const int *, const float *, const float *, const int *, - const float *, const int *, const float *, float *, const int *); -int BLASFUNC(dsyr2k)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, - const double *, const int *, const double *, double *, const int *); -int BLASFUNC(qsyr2k)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, - const double *, const int *, const double *, double *, const int *); -int BLASFUNC(csyr2k)(const char *, const char *, const int *, const int *, const float *, const float *, const int *, - const float *, const int *, const float *, float *, const int *); -int BLASFUNC(zsyr2k)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, - const double *, const int *, const double *, double *, const int *); -int BLASFUNC(xsyr2k)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, - const double *, const int *, const double *, double *, const int *); - -int BLASFUNC(chemm)(const char *, const char *, const int *, const int *, const float *, const float *, const int *, - const float *, const int *, const float *, float *, const int *); -int BLASFUNC(zhemm)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, - const double *, const int *, const double *, double *, const int *); -int BLASFUNC(xhemm)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, - const double *, const int *, const double *, double *, const int *); - -int BLASFUNC(chemm3m)(char *, char *, int *, int *, float *, float *, int *, float *, int *, float *, float *, int *); -int BLASFUNC(zhemm3m)(char *, char *, int *, int *, double *, double *, int *, double *, int *, double *, double *, - int *); -int BLASFUNC(xhemm3m)(char *, char *, int *, int *, double *, double *, int *, double *, int *, double *, double *, - int *); - -int BLASFUNC(cherk)(const char *, const char *, const int *, const int *, const float *, const float *, const int *, - const float *, float *, const int *); -int BLASFUNC(zherk)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, - const double *, double *, const int *); -int BLASFUNC(xherk)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, - const double *, double *, const int *); - -int BLASFUNC(cher2k)(const char *, const char *, const int *, const int *, const float *, const float *, const int *, - const float *, const int *, const float *, float *, const int *); -int BLASFUNC(zher2k)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, - const double *, const int *, const double *, double *, const int *); -int BLASFUNC(xher2k)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, - const double *, const int *, const double *, double *, const int *); -int BLASFUNC(cher2m)(const char *, const char *, const char *, const int *, const int *, const float *, const float *, +void BLASFUNC(sgemm)(const char *, const char *, const int *, const int *, const int *, const float *, const float *, const int *, const float *, const int *, const float *, float *, const int *); -int BLASFUNC(zher2m)(const char *, const char *, const char *, const int *, const int *, const double *, const double *, +void BLASFUNC(dgemm)(const char *, const char *, const int *, const int *, const int *, const double *, const double *, const int *, const double *, const int *, const double *, double *, const int *); -int BLASFUNC(xher2m)(const char *, const char *, const char *, const int *, const int *, const double *, const double *, +void BLASFUNC(qgemm)(const char *, const char *, const int *, const int *, const int *, const double *, const double *, const int *, const double *, const int *, const double *, double *, const int *); +void BLASFUNC(cgemm)(const char *, const char *, const int *, const int *, const int *, const float *, const float *, + const int *, const float *, const int *, const float *, float *, const int *); +void BLASFUNC(zgemm)(const char *, const char *, const int *, const int *, const int *, const double *, const double *, + const int *, const double *, const int *, const double *, double *, const int *); +void BLASFUNC(xgemm)(const char *, const char *, const int *, const int *, const int *, const double *, const double *, + const int *, const double *, const int *, const double *, double *, const int *); + +void BLASFUNC(cgemm3m)(char *, char *, int *, int *, int *, float *, float *, int *, float *, int *, float *, float *, + int *); +void BLASFUNC(zgemm3m)(char *, char *, int *, int *, int *, double *, double *, int *, double *, int *, double *, + double *, int *); +void BLASFUNC(xgemm3m)(char *, char *, int *, int *, int *, double *, double *, int *, double *, int *, double *, + double *, int *); + +void BLASFUNC(sge2mm)(char *, char *, char *, int *, int *, float *, float *, int *, float *, int *, float *, float *, + int *); +void BLASFUNC(dge2mm)(char *, char *, char *, int *, int *, double *, double *, int *, double *, int *, double *, + double *, int *); +void BLASFUNC(cge2mm)(char *, char *, char *, int *, int *, float *, float *, int *, float *, int *, float *, float *, + int *); +void BLASFUNC(zge2mm)(char *, char *, char *, int *, int *, double *, double *, int *, double *, int *, double *, + double *, int *); + +void BLASFUNC(strsm)(const char *, const char *, const char *, const char *, const int *, const int *, const float *, + const float *, const int *, float *, const int *); +void BLASFUNC(dtrsm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, + const double *, const int *, double *, const int *); +void BLASFUNC(qtrsm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, + const double *, const int *, double *, const int *); +void BLASFUNC(ctrsm)(const char *, const char *, const char *, const char *, const int *, const int *, const float *, + const float *, const int *, float *, const int *); +void BLASFUNC(ztrsm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, + const double *, const int *, double *, const int *); +void BLASFUNC(xtrsm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, + const double *, const int *, double *, const int *); + +void BLASFUNC(strmm)(const char *, const char *, const char *, const char *, const int *, const int *, const float *, + const float *, const int *, float *, const int *); +void BLASFUNC(dtrmm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, + const double *, const int *, double *, const int *); +void BLASFUNC(qtrmm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, + const double *, const int *, double *, const int *); +void BLASFUNC(ctrmm)(const char *, const char *, const char *, const char *, const int *, const int *, const float *, + const float *, const int *, float *, const int *); +void BLASFUNC(ztrmm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, + const double *, const int *, double *, const int *); +void BLASFUNC(xtrmm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, + const double *, const int *, double *, const int *); + +void BLASFUNC(ssymm)(const char *, const char *, const int *, const int *, const float *, const float *, const int *, + const float *, const int *, const float *, float *, const int *); +void BLASFUNC(dsymm)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, + const double *, const int *, const double *, double *, const int *); +void BLASFUNC(qsymm)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, + const double *, const int *, const double *, double *, const int *); +void BLASFUNC(csymm)(const char *, const char *, const int *, const int *, const float *, const float *, const int *, + const float *, const int *, const float *, float *, const int *); +void BLASFUNC(zsymm)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, + const double *, const int *, const double *, double *, const int *); +void BLASFUNC(xsymm)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, + const double *, const int *, const double *, double *, const int *); + +void BLASFUNC(csymm3m)(char *, char *, int *, int *, float *, float *, int *, float *, int *, float *, float *, int *); +void BLASFUNC(zsymm3m)(char *, char *, int *, int *, double *, double *, int *, double *, int *, double *, double *, + int *); +void BLASFUNC(xsymm3m)(char *, char *, int *, int *, double *, double *, int *, double *, int *, double *, double *, + int *); + +void BLASFUNC(ssyrk)(const char *, const char *, const int *, const int *, const float *, const float *, const int *, + const float *, float *, const int *); +void BLASFUNC(dsyrk)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, + const double *, double *, const int *); +void BLASFUNC(qsyrk)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, + const double *, double *, const int *); +void BLASFUNC(csyrk)(const char *, const char *, const int *, const int *, const float *, const float *, const int *, + const float *, float *, const int *); +void BLASFUNC(zsyrk)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, + const double *, double *, const int *); +void BLASFUNC(xsyrk)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, + const double *, double *, const int *); + +void BLASFUNC(ssyr2k)(const char *, const char *, const int *, const int *, const float *, const float *, const int *, + const float *, const int *, const float *, float *, const int *); +void BLASFUNC(dsyr2k)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, + const double *, const int *, const double *, double *, const int *); +void BLASFUNC(qsyr2k)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, + const double *, const int *, const double *, double *, const int *); +void BLASFUNC(csyr2k)(const char *, const char *, const int *, const int *, const float *, const float *, const int *, + const float *, const int *, const float *, float *, const int *); +void BLASFUNC(zsyr2k)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, + const double *, const int *, const double *, double *, const int *); +void BLASFUNC(xsyr2k)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, + const double *, const int *, const double *, double *, const int *); + +void BLASFUNC(chemm)(const char *, const char *, const int *, const int *, const float *, const float *, const int *, + const float *, const int *, const float *, float *, const int *); +void BLASFUNC(zhemm)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, + const double *, const int *, const double *, double *, const int *); +void BLASFUNC(xhemm)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, + const double *, const int *, const double *, double *, const int *); + +void BLASFUNC(chemm3m)(char *, char *, int *, int *, float *, float *, int *, float *, int *, float *, float *, int *); +void BLASFUNC(zhemm3m)(char *, char *, int *, int *, double *, double *, int *, double *, int *, double *, double *, + int *); +void BLASFUNC(xhemm3m)(char *, char *, int *, int *, double *, double *, int *, double *, int *, double *, double *, + int *); + +void BLASFUNC(cherk)(const char *, const char *, const int *, const int *, const float *, const float *, const int *, + const float *, float *, const int *); +void BLASFUNC(zherk)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, + const double *, double *, const int *); +void BLASFUNC(xherk)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, + const double *, double *, const int *); + +void BLASFUNC(cher2k)(const char *, const char *, const int *, const int *, const float *, const float *, const int *, + const float *, const int *, const float *, float *, const int *); +void BLASFUNC(zher2k)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, + const double *, const int *, const double *, double *, const int *); +void BLASFUNC(xher2k)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, + const double *, const int *, const double *, double *, const int *); +void BLASFUNC(cher2m)(const char *, const char *, const char *, const int *, const int *, const float *, const float *, + const int *, const float *, const int *, const float *, float *, const int *); +void BLASFUNC(zher2m)(const char *, const char *, const char *, const int *, const int *, const double *, + const double *, const int *, const double *, const int *, const double *, double *, const int *); +void BLASFUNC(xher2m)(const char *, const char *, const char *, const int *, const int *, const double *, + const double *, const int *, const double *, const int *, const double *, double *, const int *); #ifdef __cplusplus } diff --git a/blas/common.h b/blas/common.h index bf91a8341..245627362 100644 --- a/blas/common.h +++ b/blas/common.h @@ -140,6 +140,7 @@ T* copy_back(T* x_cpy, T* x, int n, int incx) { #define EIGEN_BLAS_FUNC_SUFFIX _ #endif -#define EIGEN_BLAS_FUNC(X) EIGEN_CAT(SCALAR_SUFFIX, EIGEN_CAT(X, EIGEN_BLAS_FUNC_SUFFIX)) +#define EIGEN_BLAS_FUNC_NAME(X) EIGEN_CAT(SCALAR_SUFFIX, EIGEN_CAT(X, EIGEN_BLAS_FUNC_SUFFIX)) +#define EIGEN_BLAS_FUNC(X) extern "C" void EIGEN_BLAS_FUNC_NAME(X) #endif // EIGEN_BLAS_COMMON_H diff --git a/blas/double.cpp b/blas/double.cpp index eef589176..429866566 100644 --- a/blas/double.cpp +++ b/blas/double.cpp @@ -19,7 +19,7 @@ #include "level2_real_impl.h" #include "level3_impl.h" -double EIGEN_BLAS_FUNC(sdot)(int* n, float* x, int* incx, float* y, int* incy) { +double EIGEN_BLAS_FUNC_NAME(sdot)(int* n, float* x, int* incx, float* y, int* incy) { if (*n <= 0) return 0; if (*incx == 1 && *incy == 1) diff --git a/blas/f2c/chbmv.c b/blas/f2c/chbmv.c index 410a3ced3..2aa3a0170 100644 --- a/blas/f2c/chbmv.c +++ b/blas/f2c/chbmv.c @@ -17,8 +17,8 @@ static inline void r_cnjg(complex *r, complex *z) { r->i = -(z->i); } -/* Subroutine */ int chbmv_(char *uplo, integer *n, integer *k, complex *alpha, complex *a, integer *lda, complex *x, - integer *incx, complex *beta, complex *y, integer *incy, ftnlen uplo_len) { +/* Subroutine */ void chbmv_(char *uplo, integer *n, integer *k, complex *alpha, complex *a, integer *lda, complex *x, + integer *incx, complex *beta, complex *y, integer *incy) { /* System generated locals */ integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5; real r__1; @@ -27,9 +27,9 @@ static inline void r_cnjg(complex *r, complex *z) { /* Local variables */ integer i__, j, l, ix, iy, jx, jy, kx, ky, info; complex temp1, temp2; - extern logical lsame_(char *, char *, ftnlen, ftnlen); + extern logical lsame_(char *, char *); integer kplus1; - extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen); + extern /* Subroutine */ void xerbla_(const char *, integer *); /* .. Scalar Arguments .. */ /* .. */ @@ -183,7 +183,7 @@ static inline void r_cnjg(complex *r, complex *z) { /* Function Body */ info = 0; - if (!lsame_(uplo, "U", (ftnlen)1, (ftnlen)1) && !lsame_(uplo, "L", (ftnlen)1, (ftnlen)1)) { + if (!lsame_(uplo, "U") && !lsame_(uplo, "L")) { info = 1; } else if (*n < 0) { info = 2; @@ -197,14 +197,14 @@ static inline void r_cnjg(complex *r, complex *z) { info = 11; } if (info != 0) { - xerbla_("CHBMV ", &info, (ftnlen)6); - return 0; + xerbla_("CHBMV ", &info); + return; } /* Quick return if possible. */ if (*n == 0 || (alpha->r == 0.f && alpha->i == 0.f && (beta->r == 1.f && beta->i == 0.f))) { - return 0; + return; } /* Set up the start points in X and Y. */ @@ -268,9 +268,9 @@ static inline void r_cnjg(complex *r, complex *z) { } } if (alpha->r == 0.f && alpha->i == 0.f) { - return 0; + return; } - if (lsame_(uplo, "U", (ftnlen)1, (ftnlen)1)) { + if (lsame_(uplo, "U")) { /* Form y when upper triangle of A is stored. */ kplus1 = *k + 1; @@ -451,8 +451,6 @@ static inline void r_cnjg(complex *r, complex *z) { } } - return 0; - /* End of CHBMV . */ } /* chbmv_ */ diff --git a/blas/f2c/chpmv.c b/blas/f2c/chpmv.c index eb0e75359..4a38a524c 100644 --- a/blas/f2c/chpmv.c +++ b/blas/f2c/chpmv.c @@ -17,8 +17,8 @@ static inline void r_cnjg(complex *r, complex *z) { r->i = -(z->i); } -/* Subroutine */ int chpmv_(char *uplo, integer *n, complex *alpha, complex *ap, complex *x, integer *incx, - complex *beta, complex *y, integer *incy, ftnlen uplo_len) { +/* Subroutine */ void chpmv_(char *uplo, integer *n, complex *alpha, complex *ap, complex *x, integer *incx, + complex *beta, complex *y, integer *incy) { /* System generated locals */ integer i__1, i__2, i__3, i__4, i__5; real r__1; @@ -27,8 +27,8 @@ static inline void r_cnjg(complex *r, complex *z) { /* Local variables */ integer i__, j, k, kk, ix, iy, jx, jy, kx, ky, info; complex temp1, temp2; - extern logical lsame_(char *, char *, ftnlen, ftnlen); - extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen); + extern logical lsame_(char *, char *); + extern /* Subroutine */ void xerbla_(const char *, integer *); /* .. Scalar Arguments .. */ /* .. */ @@ -146,7 +146,7 @@ static inline void r_cnjg(complex *r, complex *z) { /* Function Body */ info = 0; - if (!lsame_(uplo, "U", (ftnlen)1, (ftnlen)1) && !lsame_(uplo, "L", (ftnlen)1, (ftnlen)1)) { + if (!lsame_(uplo, "U") && !lsame_(uplo, "L")) { info = 1; } else if (*n < 0) { info = 2; @@ -156,14 +156,14 @@ static inline void r_cnjg(complex *r, complex *z) { info = 9; } if (info != 0) { - xerbla_("CHPMV ", &info, (ftnlen)6); - return 0; + xerbla_("CHPMV ", &info); + return; } /* Quick return if possible. */ if (*n == 0 || (alpha->r == 0.f && alpha->i == 0.f && (beta->r == 1.f && beta->i == 0.f))) { - return 0; + return; } /* Set up the start points in X and Y. */ @@ -227,10 +227,10 @@ static inline void r_cnjg(complex *r, complex *z) { } } if (alpha->r == 0.f && alpha->i == 0.f) { - return 0; + return; } kk = 1; - if (lsame_(uplo, "U", (ftnlen)1, (ftnlen)1)) { + if (lsame_(uplo, "U")) { /* Form y when AP contains the upper triangle. */ if (*incx == 1 && *incy == 1) { @@ -402,8 +402,6 @@ static inline void r_cnjg(complex *r, complex *z) { } } - return 0; - /* End of CHPMV . */ } /* chpmv_ */ diff --git a/blas/f2c/complexdots.c b/blas/f2c/complexdots.c index a0a01e64d..b0dc6c89f 100644 --- a/blas/f2c/complexdots.c +++ b/blas/f2c/complexdots.c @@ -20,7 +20,7 @@ complex cdotc_(integer *n, complex *cx, integer *incx, complex *cy, integer *incy) { complex res; - extern /* Subroutine */ int cdotcw_(integer *, complex *, integer *, complex *, integer *, complex *); + extern /* Subroutine */ void cdotcw_(integer *, complex *, integer *, complex *, integer *, complex *); /* Parameter adjustments */ --cy; @@ -33,7 +33,7 @@ complex cdotc_(integer *n, complex *cx, integer *incx, complex *cy, integer *inc complex cdotu_(integer *n, complex *cx, integer *incx, complex *cy, integer *incy) { complex res; - extern /* Subroutine */ int cdotuw_(integer *, complex *, integer *, complex *, integer *, complex *); + extern /* Subroutine */ void cdotuw_(integer *, complex *, integer *, complex *, integer *, complex *); /* Parameter adjustments */ --cy; @@ -46,8 +46,8 @@ complex cdotu_(integer *n, complex *cx, integer *incx, complex *cy, integer *inc doublecomplex zdotc_(integer *n, doublecomplex *cx, integer *incx, doublecomplex *cy, integer *incy) { doublecomplex res; - extern /* Subroutine */ int zdotcw_(integer *, doublecomplex *, integer *, doublecomplex *, integer *, - doublecomplex *); + extern /* Subroutine */ void zdotcw_(integer *, doublecomplex *, integer *, doublecomplex *, integer *, + doublecomplex *); /* Parameter adjustments */ --cy; @@ -60,8 +60,8 @@ doublecomplex zdotc_(integer *n, doublecomplex *cx, integer *incx, doublecomplex doublecomplex zdotu_(integer *n, doublecomplex *cx, integer *incx, doublecomplex *cy, integer *incy) { doublecomplex res; - extern /* Subroutine */ int zdotuw_(integer *, doublecomplex *, integer *, doublecomplex *, integer *, - doublecomplex *); + extern /* Subroutine */ void zdotuw_(integer *, doublecomplex *, integer *, doublecomplex *, integer *, + doublecomplex *); /* Parameter adjustments */ --cy; diff --git a/blas/f2c/ctbmv.c b/blas/f2c/ctbmv.c index e67482c71..2c0ce9bbf 100644 --- a/blas/f2c/ctbmv.c +++ b/blas/f2c/ctbmv.c @@ -17,8 +17,8 @@ static inline void r_cnjg(complex *r, complex *z) { r->i = -(z->i); } -/* Subroutine */ int ctbmv_(char *uplo, char *trans, char *diag, integer *n, integer *k, complex *a, integer *lda, - complex *x, integer *incx, ftnlen uplo_len, ftnlen trans_len, ftnlen diag_len) { +/* Subroutine */ void ctbmv_(char *uplo, char *trans, char *diag, integer *n, integer *k, complex *a, integer *lda, + complex *x, integer *incx) { /* System generated locals */ integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5; complex q__1, q__2, q__3; @@ -26,9 +26,9 @@ static inline void r_cnjg(complex *r, complex *z) { /* Local variables */ integer i__, j, l, ix, jx, kx, info; complex temp; - extern logical lsame_(char *, char *, ftnlen, ftnlen); + extern logical lsame_(char *, char *); integer kplus1; - extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen); + extern /* Subroutine */ void xerbla_(const char *, integer *); logical noconj, nounit; /* .. Scalar Arguments .. */ @@ -188,12 +188,11 @@ static inline void r_cnjg(complex *r, complex *z) { /* Function Body */ info = 0; - if (!lsame_(uplo, "U", (ftnlen)1, (ftnlen)1) && !lsame_(uplo, "L", (ftnlen)1, (ftnlen)1)) { + if (!lsame_(uplo, "U") && !lsame_(uplo, "L")) { info = 1; - } else if (!lsame_(trans, "N", (ftnlen)1, (ftnlen)1) && !lsame_(trans, "T", (ftnlen)1, (ftnlen)1) && - !lsame_(trans, "C", (ftnlen)1, (ftnlen)1)) { + } else if (!lsame_(trans, "N") && !lsame_(trans, "T") && !lsame_(trans, "C")) { info = 2; - } else if (!lsame_(diag, "U", (ftnlen)1, (ftnlen)1) && !lsame_(diag, "N", (ftnlen)1, (ftnlen)1)) { + } else if (!lsame_(diag, "U") && !lsame_(diag, "N")) { info = 3; } else if (*n < 0) { info = 4; @@ -205,18 +204,18 @@ static inline void r_cnjg(complex *r, complex *z) { info = 9; } if (info != 0) { - xerbla_("CTBMV ", &info, (ftnlen)6); - return 0; + xerbla_("CTBMV ", &info); + return; } /* Quick return if possible. */ if (*n == 0) { - return 0; + return; } - noconj = lsame_(trans, "T", (ftnlen)1, (ftnlen)1); - nounit = lsame_(diag, "N", (ftnlen)1, (ftnlen)1); + noconj = lsame_(trans, "T"); + nounit = lsame_(diag, "N"); /* Set up the start point in X if the increment is not unity. This */ /* will be ( N - 1 )*INCX too small for descending loops. */ @@ -230,10 +229,10 @@ static inline void r_cnjg(complex *r, complex *z) { /* Start the operations. In this version the elements of A are */ /* accessed sequentially with one pass through A. */ - if (lsame_(trans, "N", (ftnlen)1, (ftnlen)1)) { + if (lsame_(trans, "N")) { /* Form x := A*x. */ - if (lsame_(uplo, "U", (ftnlen)1, (ftnlen)1)) { + if (lsame_(uplo, "U")) { kplus1 = *k + 1; if (*incx == 1) { i__1 = *n; @@ -379,7 +378,7 @@ static inline void r_cnjg(complex *r, complex *z) { } else { /* Form x := A'*x or x := conjg( A' )*x. */ - if (lsame_(uplo, "U", (ftnlen)1, (ftnlen)1)) { + if (lsame_(uplo, "U")) { kplus1 = *k + 1; if (*incx == 1) { for (j = *n; j >= 1; --j) { @@ -582,8 +581,6 @@ static inline void r_cnjg(complex *r, complex *z) { } } - return 0; - /* End of CTBMV . */ } /* ctbmv_ */ diff --git a/blas/f2c/datatypes.h b/blas/f2c/datatypes.h index 7c2f4aef7..45b108dbd 100644 --- a/blas/f2c/datatypes.h +++ b/blas/f2c/datatypes.h @@ -15,7 +15,6 @@ typedef struct { typedef struct { doublereal r, i; } doublecomplex; -typedef int ftnlen; typedef int logical; #define abs(x) ((x) >= 0 ? (x) : -(x)) diff --git a/blas/f2c/drotm.c b/blas/f2c/drotm.c index 65183df1e..da823177c 100644 --- a/blas/f2c/drotm.c +++ b/blas/f2c/drotm.c @@ -12,8 +12,8 @@ #include "datatypes.h" -/* Subroutine */ int drotm_(integer *n, doublereal *dx, integer *incx, doublereal *dy, integer *incy, - doublereal *dparam) { +/* Subroutine */ void drotm_(integer *n, doublereal *dx, integer *incx, doublereal *dy, integer *incy, + doublereal *dparam) { /* Initialized data */ static doublereal zero = 0.; @@ -209,5 +209,5 @@ L120: /* L130: */ } L140: - return 0; + return; } /* drotm_ */ diff --git a/blas/f2c/drotmg.c b/blas/f2c/drotmg.c index 1a7115a0a..81233cbdd 100644 --- a/blas/f2c/drotmg.c +++ b/blas/f2c/drotmg.c @@ -12,7 +12,7 @@ #include "datatypes.h" -/* Subroutine */ int drotmg_(doublereal *dd1, doublereal *dd2, doublereal *dx1, doublereal *dy1, doublereal *dparam) { +/* Subroutine */ void drotmg_(doublereal *dd1, doublereal *dd2, doublereal *dx1, doublereal *dy1, doublereal *dparam) { /* Initialized data */ static doublereal zero = 0.; @@ -38,6 +38,7 @@ /* Assigned format variables */ static char *igo_fmt; + (void)igo_fmt; /* .. Scalar Arguments .. */ /* .. */ @@ -289,5 +290,4 @@ L250: dparam[5] = dh22; L260: dparam[1] = dflag; - return 0; } /* drotmg_ */ diff --git a/blas/f2c/dsbmv.c b/blas/f2c/dsbmv.c index 9b11b1588..4619369ff 100644 --- a/blas/f2c/dsbmv.c +++ b/blas/f2c/dsbmv.c @@ -12,18 +12,17 @@ #include "datatypes.h" -/* Subroutine */ int dsbmv_(char *uplo, integer *n, integer *k, doublereal *alpha, doublereal *a, integer *lda, - doublereal *x, integer *incx, doublereal *beta, doublereal *y, integer *incy, - ftnlen uplo_len) { +/* Subroutine */ void dsbmv_(char *uplo, integer *n, integer *k, doublereal *alpha, doublereal *a, integer *lda, + doublereal *x, integer *incx, doublereal *beta, doublereal *y, integer *incy) { /* System generated locals */ integer a_dim1, a_offset, i__1, i__2, i__3, i__4; /* Local variables */ integer i__, j, l, ix, iy, jx, jy, kx, ky, info; doublereal temp1, temp2; - extern logical lsame_(char *, char *, ftnlen, ftnlen); + extern logical lsame_(char *, char *); integer kplus1; - extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen); + extern /* Subroutine */ void xerbla_(const char *, integer *); /* .. Scalar Arguments .. */ /* .. */ @@ -172,7 +171,7 @@ /* Function Body */ info = 0; - if (!lsame_(uplo, "U", (ftnlen)1, (ftnlen)1) && !lsame_(uplo, "L", (ftnlen)1, (ftnlen)1)) { + if (!lsame_(uplo, "U") && !lsame_(uplo, "L")) { info = 1; } else if (*n < 0) { info = 2; @@ -186,14 +185,14 @@ info = 11; } if (info != 0) { - xerbla_("DSBMV ", &info, (ftnlen)6); - return 0; + xerbla_("DSBMV ", &info); + return; } /* Quick return if possible. */ if (*n == 0 || (*alpha == 0. && *beta == 1.)) { - return 0; + return; } /* Set up the start points in X and Y. */ @@ -249,9 +248,9 @@ } } if (*alpha == 0.) { - return 0; + return; } - if (lsame_(uplo, "U", (ftnlen)1, (ftnlen)1)) { + if (lsame_(uplo, "U")) { /* Form y when upper triangle of A is stored. */ kplus1 = *k + 1; @@ -352,8 +351,6 @@ } } - return 0; - /* End of DSBMV . */ } /* dsbmv_ */ diff --git a/blas/f2c/dspmv.c b/blas/f2c/dspmv.c index 2d037ff4c..314d67b8c 100644 --- a/blas/f2c/dspmv.c +++ b/blas/f2c/dspmv.c @@ -12,16 +12,16 @@ #include "datatypes.h" -/* Subroutine */ int dspmv_(char *uplo, integer *n, doublereal *alpha, doublereal *ap, doublereal *x, integer *incx, - doublereal *beta, doublereal *y, integer *incy, ftnlen uplo_len) { +/* Subroutine */ void dspmv_(char *uplo, integer *n, doublereal *alpha, doublereal *ap, doublereal *x, integer *incx, + doublereal *beta, doublereal *y, integer *incy) { /* System generated locals */ integer i__1, i__2; /* Local variables */ integer i__, j, k, kk, ix, iy, jx, jy, kx, ky, info; doublereal temp1, temp2; - extern logical lsame_(char *, char *, ftnlen, ftnlen); - extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen); + extern logical lsame_(char *, char *); + extern /* Subroutine */ void xerbla_(const char *, integer *); /* .. Scalar Arguments .. */ /* .. */ @@ -135,7 +135,7 @@ /* Function Body */ info = 0; - if (!lsame_(uplo, "U", (ftnlen)1, (ftnlen)1) && !lsame_(uplo, "L", (ftnlen)1, (ftnlen)1)) { + if (!lsame_(uplo, "U") && !lsame_(uplo, "L")) { info = 1; } else if (*n < 0) { info = 2; @@ -145,14 +145,14 @@ info = 9; } if (info != 0) { - xerbla_("DSPMV ", &info, (ftnlen)6); - return 0; + xerbla_("DSPMV ", &info); + return; } /* Quick return if possible. */ if (*n == 0 || (*alpha == 0. && *beta == 1.)) { - return 0; + return; } /* Set up the start points in X and Y. */ @@ -208,10 +208,10 @@ } } if (*alpha == 0.) { - return 0; + return; } kk = 1; - if (lsame_(uplo, "U", (ftnlen)1, (ftnlen)1)) { + if (lsame_(uplo, "U")) { /* Form y when AP contains the upper triangle. */ if (*incx == 1 && *incy == 1) { @@ -303,8 +303,6 @@ } } - return 0; - /* End of DSPMV . */ } /* dspmv_ */ diff --git a/blas/f2c/dtbmv.c b/blas/f2c/dtbmv.c index 96c9780d8..92a0aeca6 100644 --- a/blas/f2c/dtbmv.c +++ b/blas/f2c/dtbmv.c @@ -12,17 +12,17 @@ #include "datatypes.h" -/* Subroutine */ int dtbmv_(char *uplo, char *trans, char *diag, integer *n, integer *k, doublereal *a, integer *lda, - doublereal *x, integer *incx, ftnlen uplo_len, ftnlen trans_len, ftnlen diag_len) { +/* Subroutine */ void dtbmv_(char *uplo, char *trans, char *diag, integer *n, integer *k, doublereal *a, integer *lda, + doublereal *x, integer *incx) { /* System generated locals */ integer a_dim1, a_offset, i__1, i__2, i__3, i__4; /* Local variables */ integer i__, j, l, ix, jx, kx, info; doublereal temp; - extern logical lsame_(char *, char *, ftnlen, ftnlen); + extern logical lsame_(char *, char *); integer kplus1; - extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen); + extern /* Subroutine */ void xerbla_(const char *, integer *); logical nounit; /* .. Scalar Arguments .. */ @@ -182,12 +182,11 @@ /* Function Body */ info = 0; - if (!lsame_(uplo, "U", (ftnlen)1, (ftnlen)1) && !lsame_(uplo, "L", (ftnlen)1, (ftnlen)1)) { + if (!lsame_(uplo, "U") && !lsame_(uplo, "L")) { info = 1; - } else if (!lsame_(trans, "N", (ftnlen)1, (ftnlen)1) && !lsame_(trans, "T", (ftnlen)1, (ftnlen)1) && - !lsame_(trans, "C", (ftnlen)1, (ftnlen)1)) { + } else if (!lsame_(trans, "N") && !lsame_(trans, "T") && !lsame_(trans, "C")) { info = 2; - } else if (!lsame_(diag, "U", (ftnlen)1, (ftnlen)1) && !lsame_(diag, "N", (ftnlen)1, (ftnlen)1)) { + } else if (!lsame_(diag, "U") && !lsame_(diag, "N")) { info = 3; } else if (*n < 0) { info = 4; @@ -199,17 +198,17 @@ info = 9; } if (info != 0) { - xerbla_("DTBMV ", &info, (ftnlen)6); - return 0; + xerbla_("DTBMV ", &info); + return; } /* Quick return if possible. */ if (*n == 0) { - return 0; + return; } - nounit = lsame_(diag, "N", (ftnlen)1, (ftnlen)1); + nounit = lsame_(diag, "N"); /* Set up the start point in X if the increment is not unity. This */ /* will be ( N - 1 )*INCX too small for descending loops. */ @@ -223,10 +222,10 @@ /* Start the operations. In this version the elements of A are */ /* accessed sequentially with one pass through A. */ - if (lsame_(trans, "N", (ftnlen)1, (ftnlen)1)) { + if (lsame_(trans, "N")) { /* Form x := A*x. */ - if (lsame_(uplo, "U", (ftnlen)1, (ftnlen)1)) { + if (lsame_(uplo, "U")) { kplus1 = *k + 1; if (*incx == 1) { i__1 = *n; @@ -324,7 +323,7 @@ } else { /* Form x := A'*x. */ - if (lsame_(uplo, "U", (ftnlen)1, (ftnlen)1)) { + if (lsame_(uplo, "U")) { kplus1 = *k + 1; if (*incx == 1) { for (j = *n; j >= 1; --j) { @@ -413,8 +412,6 @@ } } - return 0; - /* End of DTBMV . */ } /* dtbmv_ */ diff --git a/blas/f2c/lsame.c b/blas/f2c/lsame.c index 550e0f159..ad51ea1de 100644 --- a/blas/f2c/lsame.c +++ b/blas/f2c/lsame.c @@ -12,7 +12,7 @@ #include "datatypes.h" -logical lsame_(char *ca, char *cb, ftnlen ca_len, ftnlen cb_len) { +logical lsame_(char *ca, char *cb) { /* System generated locals */ logical ret_val; diff --git a/blas/f2c/srotm.c b/blas/f2c/srotm.c index 7e9ab8406..410dd87ff 100644 --- a/blas/f2c/srotm.c +++ b/blas/f2c/srotm.c @@ -12,7 +12,7 @@ #include "datatypes.h" -/* Subroutine */ int srotm_(integer *n, real *sx, integer *incx, real *sy, integer *incy, real *sparam) { +/* Subroutine */ void srotm_(integer *n, real *sx, integer *incx, real *sy, integer *incy, real *sparam) { /* Initialized data */ static real zero = 0.f; @@ -208,5 +208,5 @@ L120: /* L130: */ } L140: - return 0; + return; } /* srotm_ */ diff --git a/blas/f2c/srotmg.c b/blas/f2c/srotmg.c index 352756854..3a0f9f6bf 100644 --- a/blas/f2c/srotmg.c +++ b/blas/f2c/srotmg.c @@ -12,7 +12,7 @@ #include "datatypes.h" -/* Subroutine */ int srotmg_(real *sd1, real *sd2, real *sx1, real *sy1, real *sparam) { +/* Subroutine */ void srotmg_(real *sd1, real *sd2, real *sx1, real *sy1, real *sparam) { /* Initialized data */ static real zero = 0.f; @@ -38,6 +38,7 @@ /* Assigned format variables */ static char *igo_fmt; + (void)igo_fmt; /* .. Scalar Arguments .. */ /* .. */ @@ -289,5 +290,4 @@ L250: sparam[5] = sh22; L260: sparam[1] = sflag; - return 0; } /* srotmg_ */ diff --git a/blas/f2c/ssbmv.c b/blas/f2c/ssbmv.c index 61fd2133f..ac1d70a43 100644 --- a/blas/f2c/ssbmv.c +++ b/blas/f2c/ssbmv.c @@ -12,17 +12,17 @@ #include "datatypes.h" -/* Subroutine */ int ssbmv_(char *uplo, integer *n, integer *k, real *alpha, real *a, integer *lda, real *x, - integer *incx, real *beta, real *y, integer *incy, ftnlen uplo_len) { +/* Subroutine */ void ssbmv_(char *uplo, integer *n, integer *k, real *alpha, real *a, integer *lda, real *x, + integer *incx, real *beta, real *y, integer *incy) { /* System generated locals */ integer a_dim1, a_offset, i__1, i__2, i__3, i__4; /* Local variables */ integer i__, j, l, ix, iy, jx, jy, kx, ky, info; real temp1, temp2; - extern logical lsame_(char *, char *, ftnlen, ftnlen); + extern logical lsame_(char *, char *); integer kplus1; - extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen); + extern /* Subroutine */ void xerbla_(const char *, integer *); /* .. Scalar Arguments .. */ /* .. */ @@ -174,7 +174,7 @@ /* Function Body */ info = 0; - if (!lsame_(uplo, "U", (ftnlen)1, (ftnlen)1) && !lsame_(uplo, "L", (ftnlen)1, (ftnlen)1)) { + if (!lsame_(uplo, "U") && !lsame_(uplo, "L")) { info = 1; } else if (*n < 0) { info = 2; @@ -188,14 +188,14 @@ info = 11; } if (info != 0) { - xerbla_("SSBMV ", &info, (ftnlen)6); - return 0; + xerbla_("SSBMV ", &info); + return; } /* Quick return if possible. */ if (*n == 0 || (*alpha == 0.f && *beta == 1.f)) { - return 0; + return; } /* Set up the start points in X and Y. */ @@ -251,9 +251,9 @@ } } if (*alpha == 0.f) { - return 0; + return; } - if (lsame_(uplo, "U", (ftnlen)1, (ftnlen)1)) { + if (lsame_(uplo, "U")) { /* Form y when upper triangle of A is stored. */ kplus1 = *k + 1; @@ -354,8 +354,6 @@ } } - return 0; - /* End of SSBMV . */ } /* ssbmv_ */ diff --git a/blas/f2c/sspmv.c b/blas/f2c/sspmv.c index cc4d02d6c..ea9db339b 100644 --- a/blas/f2c/sspmv.c +++ b/blas/f2c/sspmv.c @@ -12,16 +12,16 @@ #include "datatypes.h" -/* Subroutine */ int sspmv_(char *uplo, integer *n, real *alpha, real *ap, real *x, integer *incx, real *beta, real *y, - integer *incy, ftnlen uplo_len) { +/* Subroutine */ void sspmv_(char *uplo, integer *n, real *alpha, real *ap, real *x, integer *incx, real *beta, real *y, + integer *incy) { /* System generated locals */ integer i__1, i__2; /* Local variables */ integer i__, j, k, kk, ix, iy, jx, jy, kx, ky, info; real temp1, temp2; - extern logical lsame_(char *, char *, ftnlen, ftnlen); - extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen); + extern logical lsame_(char *, char *); + extern /* Subroutine */ void xerbla_(const char *, integer *); /* .. Scalar Arguments .. */ /* .. */ @@ -135,7 +135,7 @@ /* Function Body */ info = 0; - if (!lsame_(uplo, "U", (ftnlen)1, (ftnlen)1) && !lsame_(uplo, "L", (ftnlen)1, (ftnlen)1)) { + if (!lsame_(uplo, "U") && !lsame_(uplo, "L")) { info = 1; } else if (*n < 0) { info = 2; @@ -145,14 +145,14 @@ info = 9; } if (info != 0) { - xerbla_("SSPMV ", &info, (ftnlen)6); - return 0; + xerbla_("SSPMV ", &info); + return; } /* Quick return if possible. */ if (*n == 0 || (*alpha == 0.f && *beta == 1.f)) { - return 0; + return; } /* Set up the start points in X and Y. */ @@ -208,10 +208,10 @@ } } if (*alpha == 0.f) { - return 0; + return; } kk = 1; - if (lsame_(uplo, "U", (ftnlen)1, (ftnlen)1)) { + if (lsame_(uplo, "U")) { /* Form y when AP contains the upper triangle. */ if (*incx == 1 && *incy == 1) { @@ -303,8 +303,6 @@ } } - return 0; - /* End of SSPMV . */ } /* sspmv_ */ diff --git a/blas/f2c/stbmv.c b/blas/f2c/stbmv.c index f31c5ba94..43329f620 100644 --- a/blas/f2c/stbmv.c +++ b/blas/f2c/stbmv.c @@ -12,17 +12,17 @@ #include "datatypes.h" -/* Subroutine */ int stbmv_(char *uplo, char *trans, char *diag, integer *n, integer *k, real *a, integer *lda, real *x, - integer *incx, ftnlen uplo_len, ftnlen trans_len, ftnlen diag_len) { +/* Subroutine */ void stbmv_(char *uplo, char *trans, char *diag, integer *n, integer *k, real *a, integer *lda, + real *x, integer *incx) { /* System generated locals */ integer a_dim1, a_offset, i__1, i__2, i__3, i__4; /* Local variables */ integer i__, j, l, ix, jx, kx, info; real temp; - extern logical lsame_(char *, char *, ftnlen, ftnlen); + extern logical lsame_(char *, char *); integer kplus1; - extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen); + extern /* Subroutine */ void xerbla_(const char *, integer *); logical nounit; /* .. Scalar Arguments .. */ @@ -182,12 +182,11 @@ /* Function Body */ info = 0; - if (!lsame_(uplo, "U", (ftnlen)1, (ftnlen)1) && !lsame_(uplo, "L", (ftnlen)1, (ftnlen)1)) { + if (!lsame_(uplo, "U") && !lsame_(uplo, "L")) { info = 1; - } else if (!lsame_(trans, "N", (ftnlen)1, (ftnlen)1) && !lsame_(trans, "T", (ftnlen)1, (ftnlen)1) && - !lsame_(trans, "C", (ftnlen)1, (ftnlen)1)) { + } else if (!lsame_(trans, "N") && !lsame_(trans, "T") && !lsame_(trans, "C")) { info = 2; - } else if (!lsame_(diag, "U", (ftnlen)1, (ftnlen)1) && !lsame_(diag, "N", (ftnlen)1, (ftnlen)1)) { + } else if (!lsame_(diag, "U") && !lsame_(diag, "N")) { info = 3; } else if (*n < 0) { info = 4; @@ -199,17 +198,17 @@ info = 9; } if (info != 0) { - xerbla_("STBMV ", &info, (ftnlen)6); - return 0; + xerbla_("STBMV ", &info); + return; } /* Quick return if possible. */ if (*n == 0) { - return 0; + return; } - nounit = lsame_(diag, "N", (ftnlen)1, (ftnlen)1); + nounit = lsame_(diag, "N"); /* Set up the start point in X if the increment is not unity. This */ /* will be ( N - 1 )*INCX too small for descending loops. */ @@ -223,10 +222,10 @@ /* Start the operations. In this version the elements of A are */ /* accessed sequentially with one pass through A. */ - if (lsame_(trans, "N", (ftnlen)1, (ftnlen)1)) { + if (lsame_(trans, "N")) { /* Form x := A*x. */ - if (lsame_(uplo, "U", (ftnlen)1, (ftnlen)1)) { + if (lsame_(uplo, "U")) { kplus1 = *k + 1; if (*incx == 1) { i__1 = *n; @@ -324,7 +323,7 @@ } else { /* Form x := A'*x. */ - if (lsame_(uplo, "U", (ftnlen)1, (ftnlen)1)) { + if (lsame_(uplo, "U")) { kplus1 = *k + 1; if (*incx == 1) { for (j = *n; j >= 1; --j) { @@ -413,8 +412,6 @@ } } - return 0; - /* End of STBMV . */ } /* stbmv_ */ diff --git a/blas/f2c/zhbmv.c b/blas/f2c/zhbmv.c index 43862a66b..cef111737 100644 --- a/blas/f2c/zhbmv.c +++ b/blas/f2c/zhbmv.c @@ -17,9 +17,8 @@ static inline void d_cnjg(doublecomplex *r, doublecomplex *z) { r->i = -(z->i); } -/* Subroutine */ int zhbmv_(char *uplo, integer *n, integer *k, doublecomplex *alpha, doublecomplex *a, integer *lda, - doublecomplex *x, integer *incx, doublecomplex *beta, doublecomplex *y, integer *incy, - ftnlen uplo_len) { +/* Subroutine */ void zhbmv_(char *uplo, integer *n, integer *k, doublecomplex *alpha, doublecomplex *a, integer *lda, + doublecomplex *x, integer *incx, doublecomplex *beta, doublecomplex *y, integer *incy) { /* System generated locals */ integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5; doublereal d__1; @@ -28,9 +27,9 @@ static inline void d_cnjg(doublecomplex *r, doublecomplex *z) { /* Local variables */ integer i__, j, l, ix, iy, jx, jy, kx, ky, info; doublecomplex temp1, temp2; - extern logical lsame_(char *, char *, ftnlen, ftnlen); + extern logical lsame_(char *, char *); integer kplus1; - extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen); + extern /* Subroutine */ void xerbla_(const char *, integer *); /* .. Scalar Arguments .. */ /* .. */ @@ -184,7 +183,7 @@ static inline void d_cnjg(doublecomplex *r, doublecomplex *z) { /* Function Body */ info = 0; - if (!lsame_(uplo, "U", (ftnlen)1, (ftnlen)1) && !lsame_(uplo, "L", (ftnlen)1, (ftnlen)1)) { + if (!lsame_(uplo, "U") && !lsame_(uplo, "L")) { info = 1; } else if (*n < 0) { info = 2; @@ -198,14 +197,14 @@ static inline void d_cnjg(doublecomplex *r, doublecomplex *z) { info = 11; } if (info != 0) { - xerbla_("ZHBMV ", &info, (ftnlen)6); - return 0; + xerbla_("ZHBMV ", &info); + return; } /* Quick return if possible. */ if (*n == 0 || (alpha->r == 0. && alpha->i == 0. && (beta->r == 1. && beta->i == 0.))) { - return 0; + return; } /* Set up the start points in X and Y. */ @@ -269,9 +268,9 @@ static inline void d_cnjg(doublecomplex *r, doublecomplex *z) { } } if (alpha->r == 0. && alpha->i == 0.) { - return 0; + return; } - if (lsame_(uplo, "U", (ftnlen)1, (ftnlen)1)) { + if (lsame_(uplo, "U")) { /* Form y when upper triangle of A is stored. */ kplus1 = *k + 1; @@ -452,8 +451,6 @@ static inline void d_cnjg(doublecomplex *r, doublecomplex *z) { } } - return 0; - /* End of ZHBMV . */ } /* zhbmv_ */ diff --git a/blas/f2c/zhpmv.c b/blas/f2c/zhpmv.c index d61307f28..6b9a00049 100644 --- a/blas/f2c/zhpmv.c +++ b/blas/f2c/zhpmv.c @@ -17,8 +17,8 @@ static inline void d_cnjg(doublecomplex *r, doublecomplex *z) { r->i = -(z->i); } -/* Subroutine */ int zhpmv_(char *uplo, integer *n, doublecomplex *alpha, doublecomplex *ap, doublecomplex *x, - integer *incx, doublecomplex *beta, doublecomplex *y, integer *incy, ftnlen uplo_len) { +/* Subroutine */ void zhpmv_(char *uplo, integer *n, doublecomplex *alpha, doublecomplex *ap, doublecomplex *x, + integer *incx, doublecomplex *beta, doublecomplex *y, integer *incy) { /* System generated locals */ integer i__1, i__2, i__3, i__4, i__5; doublereal d__1; @@ -27,8 +27,8 @@ static inline void d_cnjg(doublecomplex *r, doublecomplex *z) { /* Local variables */ integer i__, j, k, kk, ix, iy, jx, jy, kx, ky, info; doublecomplex temp1, temp2; - extern logical lsame_(char *, char *, ftnlen, ftnlen); - extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen); + extern logical lsame_(char *, char *); + extern /* Subroutine */ void xerbla_(const char *, integer *); /* .. Scalar Arguments .. */ /* .. */ @@ -146,7 +146,7 @@ static inline void d_cnjg(doublecomplex *r, doublecomplex *z) { /* Function Body */ info = 0; - if (!lsame_(uplo, "U", (ftnlen)1, (ftnlen)1) && !lsame_(uplo, "L", (ftnlen)1, (ftnlen)1)) { + if (!lsame_(uplo, "U") && !lsame_(uplo, "L")) { info = 1; } else if (*n < 0) { info = 2; @@ -156,14 +156,14 @@ static inline void d_cnjg(doublecomplex *r, doublecomplex *z) { info = 9; } if (info != 0) { - xerbla_("ZHPMV ", &info, (ftnlen)6); - return 0; + xerbla_("ZHPMV ", &info); + return; } /* Quick return if possible. */ if (*n == 0 || (alpha->r == 0. && alpha->i == 0. && (beta->r == 1. && beta->i == 0.))) { - return 0; + return; } /* Set up the start points in X and Y. */ @@ -227,10 +227,10 @@ static inline void d_cnjg(doublecomplex *r, doublecomplex *z) { } } if (alpha->r == 0. && alpha->i == 0.) { - return 0; + return; } kk = 1; - if (lsame_(uplo, "U", (ftnlen)1, (ftnlen)1)) { + if (lsame_(uplo, "U")) { /* Form y when AP contains the upper triangle. */ if (*incx == 1 && *incy == 1) { @@ -402,8 +402,6 @@ static inline void d_cnjg(doublecomplex *r, doublecomplex *z) { } } - return 0; - /* End of ZHPMV . */ } /* zhpmv_ */ diff --git a/blas/f2c/ztbmv.c b/blas/f2c/ztbmv.c index 157c49180..2fbfa0012 100644 --- a/blas/f2c/ztbmv.c +++ b/blas/f2c/ztbmv.c @@ -17,8 +17,8 @@ static inline void d_cnjg(doublecomplex *r, doublecomplex *z) { r->i = -(z->i); } -/* Subroutine */ int ztbmv_(char *uplo, char *trans, char *diag, integer *n, integer *k, doublecomplex *a, integer *lda, - doublecomplex *x, integer *incx, ftnlen uplo_len, ftnlen trans_len, ftnlen diag_len) { +/* Subroutine */ void ztbmv_(char *uplo, char *trans, char *diag, integer *n, integer *k, doublecomplex *a, + integer *lda, doublecomplex *x, integer *incx) { /* System generated locals */ integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5; doublecomplex z__1, z__2, z__3; @@ -26,9 +26,9 @@ static inline void d_cnjg(doublecomplex *r, doublecomplex *z) { /* Local variables */ integer i__, j, l, ix, jx, kx, info; doublecomplex temp; - extern logical lsame_(char *, char *, ftnlen, ftnlen); + extern logical lsame_(char *, char *); integer kplus1; - extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen); + extern /* Subroutine */ void xerbla_(const char *, integer *); logical noconj, nounit; /* .. Scalar Arguments .. */ @@ -188,12 +188,11 @@ static inline void d_cnjg(doublecomplex *r, doublecomplex *z) { /* Function Body */ info = 0; - if (!lsame_(uplo, "U", (ftnlen)1, (ftnlen)1) && !lsame_(uplo, "L", (ftnlen)1, (ftnlen)1)) { + if (!lsame_(uplo, "U") && !lsame_(uplo, "L")) { info = 1; - } else if (!lsame_(trans, "N", (ftnlen)1, (ftnlen)1) && !lsame_(trans, "T", (ftnlen)1, (ftnlen)1) && - !lsame_(trans, "C", (ftnlen)1, (ftnlen)1)) { + } else if (!lsame_(trans, "N") && !lsame_(trans, "T") && !lsame_(trans, "C")) { info = 2; - } else if (!lsame_(diag, "U", (ftnlen)1, (ftnlen)1) && !lsame_(diag, "N", (ftnlen)1, (ftnlen)1)) { + } else if (!lsame_(diag, "U") && !lsame_(diag, "N")) { info = 3; } else if (*n < 0) { info = 4; @@ -205,18 +204,18 @@ static inline void d_cnjg(doublecomplex *r, doublecomplex *z) { info = 9; } if (info != 0) { - xerbla_("ZTBMV ", &info, (ftnlen)6); - return 0; + xerbla_("ZTBMV ", &info); + return; } /* Quick return if possible. */ if (*n == 0) { - return 0; + return; } - noconj = lsame_(trans, "T", (ftnlen)1, (ftnlen)1); - nounit = lsame_(diag, "N", (ftnlen)1, (ftnlen)1); + noconj = lsame_(trans, "T"); + nounit = lsame_(diag, "N"); /* Set up the start point in X if the increment is not unity. This */ /* will be ( N - 1 )*INCX too small for descending loops. */ @@ -230,10 +229,10 @@ static inline void d_cnjg(doublecomplex *r, doublecomplex *z) { /* Start the operations. In this version the elements of A are */ /* accessed sequentially with one pass through A. */ - if (lsame_(trans, "N", (ftnlen)1, (ftnlen)1)) { + if (lsame_(trans, "N")) { /* Form x := A*x. */ - if (lsame_(uplo, "U", (ftnlen)1, (ftnlen)1)) { + if (lsame_(uplo, "U")) { kplus1 = *k + 1; if (*incx == 1) { i__1 = *n; @@ -379,7 +378,7 @@ static inline void d_cnjg(doublecomplex *r, doublecomplex *z) { } else { /* Form x := A'*x or x := conjg( A' )*x. */ - if (lsame_(uplo, "U", (ftnlen)1, (ftnlen)1)) { + if (lsame_(uplo, "U")) { kplus1 = *k + 1; if (*incx == 1) { for (j = *n; j >= 1; --j) { @@ -582,8 +581,6 @@ static inline void d_cnjg(doublecomplex *r, doublecomplex *z) { } } - return 0; - /* End of ZTBMV . */ } /* ztbmv_ */ diff --git a/blas/level1_cplx_impl.h b/blas/level1_cplx_impl.h index 552b384bf..be88b92b1 100644 --- a/blas/level1_cplx_impl.h +++ b/blas/level1_cplx_impl.h @@ -24,7 +24,7 @@ struct functor_traits { // computes the sum of magnitudes of all vector elements or, for a complex vector x, the sum // res = |Rex1| + |Imx1| + |Rex2| + |Imx2| + ... + |Rexn| + |Imxn|, where x is a vector of order n -RealScalar EIGEN_CAT(REAL_SCALAR_SUFFIX, EIGEN_BLAS_FUNC(asum))(int *n, RealScalar *px, int *incx) { +extern "C" RealScalar EIGEN_CAT(REAL_SCALAR_SUFFIX, EIGEN_BLAS_FUNC_NAME(asum))(int *n, RealScalar *px, int *incx) { // std::cerr << "__asum " << *n << " " << *incx << "\n"; Complex *x = reinterpret_cast(px); @@ -36,7 +36,7 @@ RealScalar EIGEN_CAT(REAL_SCALAR_SUFFIX, EIGEN_BLAS_FUNC(asum))(int *n, RealScal return make_vector(x, *n, std::abs(*incx)).unaryExpr().sum(); } -int EIGEN_CAT(i, EIGEN_BLAS_FUNC(amax))(int *n, RealScalar *px, int *incx) { +extern "C" int EIGEN_CAT(i, EIGEN_BLAS_FUNC_NAME(amax))(int *n, RealScalar *px, int *incx) { if (*n <= 0) return 0; Scalar *x = reinterpret_cast(px); @@ -48,7 +48,7 @@ int EIGEN_CAT(i, EIGEN_BLAS_FUNC(amax))(int *n, RealScalar *px, int *incx) { return int(ret) + 1; } -int EIGEN_CAT(i, EIGEN_BLAS_FUNC(amin))(int *n, RealScalar *px, int *incx) { +extern "C" int EIGEN_CAT(i, EIGEN_BLAS_FUNC_NAME(amin))(int *n, RealScalar *px, int *incx) { if (*n <= 0) return 0; Scalar *x = reinterpret_cast(px); @@ -61,13 +61,13 @@ int EIGEN_CAT(i, EIGEN_BLAS_FUNC(amin))(int *n, RealScalar *px, int *incx) { } // computes a dot product of a conjugated vector with another vector. -int EIGEN_BLAS_FUNC(dotcw)(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar *pres) { +EIGEN_BLAS_FUNC(dotcw)(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar *pres) { // std::cerr << "_dotc " << *n << " " << *incx << " " << *incy << "\n"; Scalar *res = reinterpret_cast(pres); if (*n <= 0) { *res = Scalar(0); - return 0; + return; } Scalar *x = reinterpret_cast(px); @@ -83,16 +83,15 @@ int EIGEN_BLAS_FUNC(dotcw)(int *n, RealScalar *px, int *incx, RealScalar *py, in *res = (make_vector(x, *n, *incx).dot(make_vector(y, *n, -*incy).reverse())); else if (*incx < 0 && *incy < 0) *res = (make_vector(x, *n, -*incx).reverse().dot(make_vector(y, *n, -*incy).reverse())); - return 0; } // computes a vector-vector dot product without complex conjugation. -int EIGEN_BLAS_FUNC(dotuw)(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar *pres) { +EIGEN_BLAS_FUNC(dotuw)(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar *pres) { Scalar *res = reinterpret_cast(pres); if (*n <= 0) { *res = Scalar(0); - return 0; + return; } Scalar *x = reinterpret_cast(px); @@ -108,10 +107,9 @@ int EIGEN_BLAS_FUNC(dotuw)(int *n, RealScalar *px, int *incx, RealScalar *py, in *res = (make_vector(x, *n, *incx).cwiseProduct(make_vector(y, *n, -*incy).reverse())).sum(); else if (*incx < 0 && *incy < 0) *res = (make_vector(x, *n, -*incx).reverse().cwiseProduct(make_vector(y, *n, -*incy).reverse())).sum(); - return 0; } -RealScalar EIGEN_CAT(REAL_SCALAR_SUFFIX, EIGEN_BLAS_FUNC(nrm2))(int *n, RealScalar *px, int *incx) { +extern "C" RealScalar EIGEN_CAT(REAL_SCALAR_SUFFIX, EIGEN_BLAS_FUNC_NAME(nrm2))(int *n, RealScalar *px, int *incx) { // std::cerr << "__nrm2 " << *n << " " << *incx << "\n"; if (*n <= 0) return 0; @@ -122,9 +120,9 @@ RealScalar EIGEN_CAT(REAL_SCALAR_SUFFIX, EIGEN_BLAS_FUNC(nrm2))(int *n, RealScal return make_vector(x, *n, *incx).stableNorm(); } -int EIGEN_BLAS_FUNC(EIGEN_CAT(REAL_SCALAR_SUFFIX, rot))(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy, - RealScalar *pc, RealScalar *ps) { - if (*n <= 0) return 0; +EIGEN_BLAS_FUNC(EIGEN_CAT(REAL_SCALAR_SUFFIX, rot)) +(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar *pc, RealScalar *ps) { + if (*n <= 0) return; Scalar *x = reinterpret_cast(px); Scalar *y = reinterpret_cast(py); @@ -144,12 +142,10 @@ int EIGEN_BLAS_FUNC(EIGEN_CAT(REAL_SCALAR_SUFFIX, rot))(int *n, RealScalar *px, internal::apply_rotation_in_the_plane(vx, rvy, JacobiRotation(c, s)); else internal::apply_rotation_in_the_plane(vx, vy, JacobiRotation(c, s)); - - return 0; } -int EIGEN_BLAS_FUNC(EIGEN_CAT(REAL_SCALAR_SUFFIX, scal))(int *n, RealScalar *palpha, RealScalar *px, int *incx) { - if (*n <= 0) return 0; +EIGEN_BLAS_FUNC(EIGEN_CAT(REAL_SCALAR_SUFFIX, scal))(int *n, RealScalar *palpha, RealScalar *px, int *incx) { + if (*n <= 0) return; Scalar *x = reinterpret_cast(px); RealScalar alpha = *palpha; @@ -160,6 +156,4 @@ int EIGEN_BLAS_FUNC(EIGEN_CAT(REAL_SCALAR_SUFFIX, scal))(int *n, RealScalar *pal make_vector(x, *n) *= alpha; else make_vector(x, *n, std::abs(*incx)) *= alpha; - - return 0; } diff --git a/blas/level1_impl.h b/blas/level1_impl.h index f1ff3cc78..2422d1017 100644 --- a/blas/level1_impl.h +++ b/blas/level1_impl.h @@ -9,13 +9,13 @@ #include "common.h" -int EIGEN_BLAS_FUNC(axpy)(const int *n, const RealScalar *palpha, const RealScalar *px, const int *incx, RealScalar *py, - const int *incy) { +EIGEN_BLAS_FUNC(axpy) +(const int *n, const RealScalar *palpha, const RealScalar *px, const int *incx, RealScalar *py, const int *incy) { const Scalar *x = reinterpret_cast(px); Scalar *y = reinterpret_cast(py); Scalar alpha = *reinterpret_cast(palpha); - if (*n <= 0) return 0; + if (*n <= 0) return; if (*incx == 1 && *incy == 1) make_vector(y, *n) += alpha * make_vector(x, *n); @@ -27,12 +27,10 @@ int EIGEN_BLAS_FUNC(axpy)(const int *n, const RealScalar *palpha, const RealScal make_vector(y, *n, *incy) += alpha * make_vector(x, *n, -*incx).reverse(); else if (*incx < 0 && *incy < 0) make_vector(y, *n, -*incy).reverse() += alpha * make_vector(x, *n, -*incx).reverse(); - - return 0; } -int EIGEN_BLAS_FUNC(copy)(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy) { - if (*n <= 0) return 0; +EIGEN_BLAS_FUNC(copy)(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy) { + if (*n <= 0) return; Scalar *x = reinterpret_cast(px); Scalar *y = reinterpret_cast(py); @@ -49,11 +47,9 @@ int EIGEN_BLAS_FUNC(copy)(int *n, RealScalar *px, int *incx, RealScalar *py, int y += *incy; } } - - return 0; } -int EIGEN_BLAS_FUNC(rotg)(RealScalar *pa, RealScalar *pb, RealScalar *pc, RealScalar *ps) { +EIGEN_BLAS_FUNC(rotg)(RealScalar *pa, RealScalar *pb, RealScalar *pc, RealScalar *ps) { using std::abs; using std::sqrt; @@ -104,12 +100,10 @@ int EIGEN_BLAS_FUNC(rotg)(RealScalar *pa, RealScalar *pb, RealScalar *pc, RealSc // r.makeGivens(a,b); // *c = r.c(); // *s = r.s(); - - return 0; } -int EIGEN_BLAS_FUNC(scal)(int *n, RealScalar *palpha, RealScalar *px, int *incx) { - if (*n <= 0) return 0; +EIGEN_BLAS_FUNC(scal)(int *n, RealScalar *palpha, RealScalar *px, int *incx) { + if (*n <= 0) return; Scalar *x = reinterpret_cast(px); Scalar alpha = *reinterpret_cast(palpha); @@ -118,12 +112,10 @@ int EIGEN_BLAS_FUNC(scal)(int *n, RealScalar *palpha, RealScalar *px, int *incx) make_vector(x, *n) *= alpha; else make_vector(x, *n, std::abs(*incx)) *= alpha; - - return 0; } -int EIGEN_BLAS_FUNC(swap)(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy) { - if (*n <= 0) return 0; +EIGEN_BLAS_FUNC(swap)(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy) { + if (*n <= 0) return; Scalar *x = reinterpret_cast(px); Scalar *y = reinterpret_cast(py); @@ -138,6 +130,4 @@ int EIGEN_BLAS_FUNC(swap)(int *n, RealScalar *px, int *incx, RealScalar *py, int make_vector(y, *n, *incy).swap(make_vector(x, *n, -*incx).reverse()); else if (*incx < 0 && *incy < 0) make_vector(y, *n, -*incy).reverse().swap(make_vector(x, *n, -*incx).reverse()); - - return 1; } diff --git a/blas/level1_real_impl.h b/blas/level1_real_impl.h index d5cb57338..cd9c1899b 100644 --- a/blas/level1_real_impl.h +++ b/blas/level1_real_impl.h @@ -11,7 +11,7 @@ // computes the sum of magnitudes of all vector elements or, for a complex vector x, the sum // res = |Rex1| + |Imx1| + |Rex2| + |Imx2| + ... + |Rexn| + |Imxn|, where x is a vector of order n -RealScalar EIGEN_BLAS_FUNC(asum)(int *n, RealScalar *px, int *incx) { +extern "C" RealScalar EIGEN_BLAS_FUNC_NAME(asum)(int *n, Scalar *px, int *incx) { // std::cerr << "_asum " << *n << " " << *incx << "\n"; Scalar *x = reinterpret_cast(px); @@ -24,7 +24,7 @@ RealScalar EIGEN_BLAS_FUNC(asum)(int *n, RealScalar *px, int *incx) { return make_vector(x, *n, std::abs(*incx)).cwiseAbs().sum(); } -int EIGEN_CAT(i, EIGEN_BLAS_FUNC(amax))(int *n, RealScalar *px, int *incx) { +extern "C" int EIGEN_CAT(i, EIGEN_BLAS_FUNC_NAME(amax))(int *n, Scalar *px, int *incx) { if (*n <= 0) return 0; Scalar *x = reinterpret_cast(px); @@ -36,7 +36,7 @@ int EIGEN_CAT(i, EIGEN_BLAS_FUNC(amax))(int *n, RealScalar *px, int *incx) { return int(ret) + 1; } -int EIGEN_CAT(i, EIGEN_BLAS_FUNC(amin))(int *n, RealScalar *px, int *incx) { +extern "C" int EIGEN_CAT(i, EIGEN_BLAS_FUNC_NAME(amin))(int *n, Scalar *px, int *incx) { if (*n <= 0) return 0; Scalar *x = reinterpret_cast(px); @@ -49,7 +49,7 @@ int EIGEN_CAT(i, EIGEN_BLAS_FUNC(amin))(int *n, RealScalar *px, int *incx) { } // computes a vector-vector dot product. -Scalar EIGEN_BLAS_FUNC(dot)(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy) { +extern "C" Scalar EIGEN_BLAS_FUNC_NAME(dot)(int *n, Scalar *px, int *incx, Scalar *py, int *incy) { // std::cerr << "_dot " << *n << " " << *incx << " " << *incy << "\n"; if (*n <= 0) return 0; @@ -73,7 +73,7 @@ Scalar EIGEN_BLAS_FUNC(dot)(int *n, RealScalar *px, int *incx, RealScalar *py, i // computes the Euclidean norm of a vector. // FIXME -Scalar EIGEN_BLAS_FUNC(nrm2)(int *n, RealScalar *px, int *incx) { +extern "C" Scalar EIGEN_BLAS_FUNC_NAME(nrm2)(int *n, Scalar *px, int *incx) { // std::cerr << "_nrm2 " << *n << " " << *incx << "\n"; if (*n <= 0) return 0; @@ -85,9 +85,9 @@ Scalar EIGEN_BLAS_FUNC(nrm2)(int *n, RealScalar *px, int *incx) { return make_vector(x, *n, std::abs(*incx)).stableNorm(); } -int EIGEN_BLAS_FUNC(rot)(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar *pc, RealScalar *ps) { +EIGEN_BLAS_FUNC(rot)(int *n, Scalar *px, int *incx, Scalar *py, int *incy, Scalar *pc, Scalar *ps) { // std::cerr << "_rot " << *n << " " << *incx << " " << *incy << "\n"; - if (*n <= 0) return 0; + if (*n <= 0) return; Scalar *x = reinterpret_cast(px); Scalar *y = reinterpret_cast(py); @@ -106,13 +106,11 @@ int EIGEN_BLAS_FUNC(rot)(int *n, RealScalar *px, int *incx, RealScalar *py, int internal::apply_rotation_in_the_plane(vx, rvy, JacobiRotation(c, s)); else internal::apply_rotation_in_the_plane(vx, vy, JacobiRotation(c, s)); - - return 0; } /* // performs rotation of points in the modified plane. -int EIGEN_BLAS_FUNC(rotm)(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar *param) +EIGEN_BLAS_FUNC(rotm)(int *n, Scalar *px, int *incx, Scalar *py, int *incy, Scalar *param) { Scalar* x = reinterpret_cast(px); Scalar* y = reinterpret_cast(py); @@ -123,7 +121,7 @@ int EIGEN_BLAS_FUNC(rotm)(int *n, RealScalar *px, int *incx, RealScalar *py, int } // computes the modified parameters for a Givens rotation. -int EIGEN_BLAS_FUNC(rotmg)(RealScalar *d1, RealScalar *d2, RealScalar *x1, RealScalar *x2, RealScalar *param) +EIGEN_BLAS_FUNC(rotmg)(Scalar *d1, Scalar *d2, Scalar *x1, Scalar *x2, Scalar *param) { // TODO diff --git a/blas/level2_cplx_impl.h b/blas/level2_cplx_impl.h index 8c56a6f8c..f04dda120 100644 --- a/blas/level2_cplx_impl.h +++ b/blas/level2_cplx_impl.h @@ -16,9 +16,9 @@ * where alpha and beta are scalars, x and y are n element vectors and * A is an n by n hermitian matrix. */ -int EIGEN_BLAS_FUNC(hemv)(const char *uplo, const int *n, const RealScalar *palpha, const RealScalar *pa, - const int *lda, const RealScalar *px, const int *incx, const RealScalar *pbeta, - RealScalar *py, const int *incy) { +EIGEN_BLAS_FUNC(hemv) +(const char *uplo, const int *n, const RealScalar *palpha, const RealScalar *pa, const int *lda, const RealScalar *px, + const int *incx, const RealScalar *pbeta, RealScalar *py, const int *incy) { typedef void (*functype)(int, const Scalar *, int, const Scalar *, Scalar *, Scalar); static const functype func[2] = { // array index: UP @@ -45,9 +45,9 @@ int EIGEN_BLAS_FUNC(hemv)(const char *uplo, const int *n, const RealScalar *palp info = 7; else if (*incy == 0) info = 10; - if (info) return xerbla_(SCALAR_SUFFIX_UP "HEMV ", &info, 6); + if (info) return xerbla_(SCALAR_SUFFIX_UP "HEMV ", &info); - if (*n == 0) return 1; + if (*n == 0) return; const Scalar *actual_x = get_compact_vector(x, *n, *incx); Scalar *actual_y = get_compact_vector(y, *n, *incy); @@ -61,15 +61,13 @@ int EIGEN_BLAS_FUNC(hemv)(const char *uplo, const int *n, const RealScalar *palp if (alpha != Scalar(0)) { int code = UPLO(*uplo); - if (code >= 2 || func[code] == 0) return 0; + if (code >= 2 || func[code] == 0) return; func[code](*n, a, *lda, actual_x, actual_y, alpha); } if (actual_x != x) delete[] actual_x; if (actual_y != y) delete[] copy_back(actual_y, y, *n, *incy); - - return 1; } /** ZHBMV performs the matrix-vector operation @@ -79,7 +77,7 @@ int EIGEN_BLAS_FUNC(hemv)(const char *uplo, const int *n, const RealScalar *palp * where alpha and beta are scalars, x and y are n element vectors and * A is an n by n hermitian band matrix, with k super-diagonals. */ -// int EIGEN_BLAS_FUNC(hbmv)(char *uplo, int *n, int *k, RealScalar *alpha, RealScalar *a, int *lda, +// EIGEN_BLAS_FUNC(hbmv)(char *uplo, int *n, int *k, RealScalar *alpha, RealScalar *a, int *lda, // RealScalar *x, int *incx, RealScalar *beta, RealScalar *y, int *incy) // { // return 1; @@ -92,7 +90,7 @@ int EIGEN_BLAS_FUNC(hemv)(const char *uplo, const int *n, const RealScalar *palp * where alpha and beta are scalars, x and y are n element vectors and * A is an n by n hermitian matrix, supplied in packed form. */ -// int EIGEN_BLAS_FUNC(hpmv)(char *uplo, int *n, RealScalar *alpha, RealScalar *ap, RealScalar *x, int *incx, RealScalar +// EIGEN_BLAS_FUNC(hpmv)(char *uplo, int *n, RealScalar *alpha, RealScalar *ap, RealScalar *x, int *incx, RealScalar // *beta, RealScalar *y, int *incy) // { // return 1; @@ -105,7 +103,7 @@ int EIGEN_BLAS_FUNC(hemv)(const char *uplo, const int *n, const RealScalar *palp * where alpha is a real scalar, x is an n element vector and A is an * n by n hermitian matrix, supplied in packed form. */ -int EIGEN_BLAS_FUNC(hpr)(char *uplo, int *n, RealScalar *palpha, RealScalar *px, int *incx, RealScalar *pap) { +EIGEN_BLAS_FUNC(hpr)(char *uplo, int *n, RealScalar *palpha, RealScalar *px, int *incx, RealScalar *pap) { typedef void (*functype)(int, Scalar *, const Scalar *, RealScalar); static const functype func[2] = { // array index: UP @@ -125,20 +123,18 @@ int EIGEN_BLAS_FUNC(hpr)(char *uplo, int *n, RealScalar *palpha, RealScalar *px, info = 2; else if (*incx == 0) info = 5; - if (info) return xerbla_(SCALAR_SUFFIX_UP "HPR ", &info, 6); + if (info) return xerbla_(SCALAR_SUFFIX_UP "HPR ", &info); - if (alpha == Scalar(0)) return 1; + if (alpha == Scalar(0)) return; Scalar *x_cpy = get_compact_vector(x, *n, *incx); int code = UPLO(*uplo); - if (code >= 2 || func[code] == 0) return 0; + if (code >= 2 || func[code] == 0) return; func[code](*n, ap, x_cpy, alpha); if (x_cpy != x) delete[] x_cpy; - - return 1; } /** ZHPR2 performs the hermitian rank 2 operation @@ -148,8 +144,8 @@ int EIGEN_BLAS_FUNC(hpr)(char *uplo, int *n, RealScalar *palpha, RealScalar *px, * where alpha is a scalar, x and y are n element vectors and A is an * n by n hermitian matrix, supplied in packed form. */ -int EIGEN_BLAS_FUNC(hpr2)(char *uplo, int *n, RealScalar *palpha, RealScalar *px, int *incx, RealScalar *py, int *incy, - RealScalar *pap) { +EIGEN_BLAS_FUNC(hpr2) +(char *uplo, int *n, RealScalar *palpha, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar *pap) { typedef void (*functype)(int, Scalar *, const Scalar *, const Scalar *, Scalar); static const functype func[2] = { // array index: UP @@ -172,22 +168,20 @@ int EIGEN_BLAS_FUNC(hpr2)(char *uplo, int *n, RealScalar *palpha, RealScalar *px info = 5; else if (*incy == 0) info = 7; - if (info) return xerbla_(SCALAR_SUFFIX_UP "HPR2 ", &info, 6); + if (info) return xerbla_(SCALAR_SUFFIX_UP "HPR2 ", &info); - if (alpha == Scalar(0)) return 1; + if (alpha == Scalar(0)) return; Scalar *x_cpy = get_compact_vector(x, *n, *incx); Scalar *y_cpy = get_compact_vector(y, *n, *incy); int code = UPLO(*uplo); - if (code >= 2 || func[code] == 0) return 0; + if (code >= 2 || func[code] == 0) return; func[code](*n, ap, x_cpy, y_cpy, alpha); if (x_cpy != x) delete[] x_cpy; if (y_cpy != y) delete[] y_cpy; - - return 1; } /** ZHER performs the hermitian rank 1 operation @@ -197,7 +191,7 @@ int EIGEN_BLAS_FUNC(hpr2)(char *uplo, int *n, RealScalar *palpha, RealScalar *px * where alpha is a real scalar, x is an n element vector and A is an * n by n hermitian matrix. */ -int EIGEN_BLAS_FUNC(her)(char *uplo, int *n, RealScalar *palpha, RealScalar *px, int *incx, RealScalar *pa, int *lda) { +EIGEN_BLAS_FUNC(her)(char *uplo, int *n, RealScalar *palpha, RealScalar *px, int *incx, RealScalar *pa, int *lda) { typedef void (*functype)(int, Scalar *, int, const Scalar *, const Scalar *, const Scalar &); static const functype func[2] = { // array index: UP @@ -219,22 +213,20 @@ int EIGEN_BLAS_FUNC(her)(char *uplo, int *n, RealScalar *palpha, RealScalar *px, info = 5; else if (*lda < std::max(1, *n)) info = 7; - if (info) return xerbla_(SCALAR_SUFFIX_UP "HER ", &info, 6); + if (info) return xerbla_(SCALAR_SUFFIX_UP "HER ", &info); - if (alpha == RealScalar(0)) return 1; + if (alpha == RealScalar(0)) return; Scalar *x_cpy = get_compact_vector(x, *n, *incx); int code = UPLO(*uplo); - if (code >= 2 || func[code] == 0) return 0; + if (code >= 2 || func[code] == 0) return; func[code](*n, a, *lda, x_cpy, x_cpy, alpha); matrix(a, *n, *n, *lda).diagonal().imag().setZero(); if (x_cpy != x) delete[] x_cpy; - - return 1; } /** ZHER2 performs the hermitian rank 2 operation @@ -244,8 +236,9 @@ int EIGEN_BLAS_FUNC(her)(char *uplo, int *n, RealScalar *palpha, RealScalar *px, * where alpha is a scalar, x and y are n element vectors and A is an n * by n hermitian matrix. */ -int EIGEN_BLAS_FUNC(her2)(char *uplo, int *n, RealScalar *palpha, RealScalar *px, int *incx, RealScalar *py, int *incy, - RealScalar *pa, int *lda) { +EIGEN_BLAS_FUNC(her2) +(char *uplo, int *n, RealScalar *palpha, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar *pa, + int *lda) { typedef void (*functype)(int, Scalar *, int, const Scalar *, const Scalar *, Scalar); static const functype func[2] = { // array index: UP @@ -270,15 +263,15 @@ int EIGEN_BLAS_FUNC(her2)(char *uplo, int *n, RealScalar *palpha, RealScalar *px info = 7; else if (*lda < std::max(1, *n)) info = 9; - if (info) return xerbla_(SCALAR_SUFFIX_UP "HER2 ", &info, 6); + if (info) return xerbla_(SCALAR_SUFFIX_UP "HER2 ", &info); - if (alpha == Scalar(0)) return 1; + if (alpha == Scalar(0)) return; Scalar *x_cpy = get_compact_vector(x, *n, *incx); Scalar *y_cpy = get_compact_vector(y, *n, *incy); int code = UPLO(*uplo); - if (code >= 2 || func[code] == 0) return 0; + if (code >= 2 || func[code] == 0) return; func[code](*n, a, *lda, x_cpy, y_cpy, alpha); @@ -286,8 +279,6 @@ int EIGEN_BLAS_FUNC(her2)(char *uplo, int *n, RealScalar *palpha, RealScalar *px if (x_cpy != x) delete[] x_cpy; if (y_cpy != y) delete[] y_cpy; - - return 1; } /** ZGERU performs the rank 1 operation @@ -297,8 +288,8 @@ int EIGEN_BLAS_FUNC(her2)(char *uplo, int *n, RealScalar *palpha, RealScalar *px * where alpha is a scalar, x is an m element vector, y is an n element * vector and A is an m by n matrix. */ -int EIGEN_BLAS_FUNC(geru)(int *m, int *n, RealScalar *palpha, RealScalar *px, int *incx, RealScalar *py, int *incy, - RealScalar *pa, int *lda) { +EIGEN_BLAS_FUNC(geru) +(int *m, int *n, RealScalar *palpha, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar *pa, int *lda) { Scalar *x = reinterpret_cast(px); Scalar *y = reinterpret_cast(py); Scalar *a = reinterpret_cast(pa); @@ -315,9 +306,9 @@ int EIGEN_BLAS_FUNC(geru)(int *m, int *n, RealScalar *palpha, RealScalar *px, in info = 7; else if (*lda < std::max(1, *m)) info = 9; - if (info) return xerbla_(SCALAR_SUFFIX_UP "GERU ", &info, 6); + if (info) return xerbla_(SCALAR_SUFFIX_UP "GERU ", &info); - if (alpha == Scalar(0)) return 1; + if (alpha == Scalar(0)) return; Scalar *x_cpy = get_compact_vector(x, *m, *incx); Scalar *y_cpy = get_compact_vector(y, *n, *incy); @@ -326,8 +317,6 @@ int EIGEN_BLAS_FUNC(geru)(int *m, int *n, RealScalar *palpha, RealScalar *px, in if (x_cpy != x) delete[] x_cpy; if (y_cpy != y) delete[] y_cpy; - - return 1; } /** ZGERC performs the rank 1 operation @@ -337,8 +326,8 @@ int EIGEN_BLAS_FUNC(geru)(int *m, int *n, RealScalar *palpha, RealScalar *px, in * where alpha is a scalar, x is an m element vector, y is an n element * vector and A is an m by n matrix. */ -int EIGEN_BLAS_FUNC(gerc)(int *m, int *n, RealScalar *palpha, RealScalar *px, int *incx, RealScalar *py, int *incy, - RealScalar *pa, int *lda) { +EIGEN_BLAS_FUNC(gerc) +(int *m, int *n, RealScalar *palpha, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar *pa, int *lda) { Scalar *x = reinterpret_cast(px); Scalar *y = reinterpret_cast(py); Scalar *a = reinterpret_cast(pa); @@ -355,9 +344,9 @@ int EIGEN_BLAS_FUNC(gerc)(int *m, int *n, RealScalar *palpha, RealScalar *px, in info = 7; else if (*lda < std::max(1, *m)) info = 9; - if (info) return xerbla_(SCALAR_SUFFIX_UP "GERC ", &info, 6); + if (info) return xerbla_(SCALAR_SUFFIX_UP "GERC ", &info); - if (alpha == Scalar(0)) return 1; + if (alpha == Scalar(0)) return; Scalar *x_cpy = get_compact_vector(x, *m, *incx); Scalar *y_cpy = get_compact_vector(y, *n, *incy); @@ -366,6 +355,4 @@ int EIGEN_BLAS_FUNC(gerc)(int *m, int *n, RealScalar *palpha, RealScalar *px, in if (x_cpy != x) delete[] x_cpy; if (y_cpy != y) delete[] y_cpy; - - return 1; } diff --git a/blas/level2_impl.h b/blas/level2_impl.h index 0138a9ce9..5721ee603 100644 --- a/blas/level2_impl.h +++ b/blas/level2_impl.h @@ -22,9 +22,9 @@ struct general_matrix_vector_product_wrapper { } }; -int EIGEN_BLAS_FUNC(gemv)(const char *opa, const int *m, const int *n, const RealScalar *palpha, const RealScalar *pa, - const int *lda, const RealScalar *pb, const int *incb, const RealScalar *pbeta, - RealScalar *pc, const int *incc) { +EIGEN_BLAS_FUNC(gemv) +(const char *opa, const int *m, const int *n, const RealScalar *palpha, const RealScalar *pa, const int *lda, + const RealScalar *pb, const int *incb, const RealScalar *pbeta, RealScalar *pc, const int *incc) { typedef void (*functype)(int, int, const Scalar *, int, const Scalar *, int, Scalar *, int, Scalar); static const functype func[4] = {// array index: NOTR (general_matrix_vector_product_wrapper::run), @@ -53,9 +53,9 @@ int EIGEN_BLAS_FUNC(gemv)(const char *opa, const int *m, const int *n, const Rea info = 8; else if (*incc == 0) info = 11; - if (info) return xerbla_(SCALAR_SUFFIX_UP "GEMV ", &info, 6); + if (info) return xerbla_(SCALAR_SUFFIX_UP "GEMV ", &info); - if (*m == 0 || *n == 0 || (alpha == Scalar(0) && beta == Scalar(1))) return 0; + if (*m == 0 || *n == 0 || (alpha == Scalar(0) && beta == Scalar(1))) return; int actual_m = *m; int actual_n = *n; @@ -72,18 +72,17 @@ int EIGEN_BLAS_FUNC(gemv)(const char *opa, const int *m, const int *n, const Rea make_vector(actual_c, actual_m) *= beta; } - if (code >= 4 || func[code] == 0) return 0; + if (code >= 4 || func[code] == 0) return; func[code](actual_m, actual_n, a, *lda, actual_b, 1, actual_c, 1, alpha); if (actual_b != b) delete[] actual_b; if (actual_c != c) delete[] copy_back(actual_c, c, actual_m, *incc); - - return 1; } -int EIGEN_BLAS_FUNC(trsv)(const char *uplo, const char *opa, const char *diag, const int *n, const RealScalar *pa, - const int *lda, RealScalar *pb, const int *incb) { +EIGEN_BLAS_FUNC(trsv) +(const char *uplo, const char *opa, const char *diag, const int *n, const RealScalar *pa, const int *lda, + RealScalar *pb, const int *incb) { typedef void (*functype)(int, const Scalar *, int, Scalar *); static const functype func[16] = { // array index: NOTR | (UP << 2) | (NUNIT << 3) @@ -127,7 +126,7 @@ int EIGEN_BLAS_FUNC(trsv)(const char *uplo, const char *opa, const char *diag, c info = 6; else if (*incb == 0) info = 8; - if (info) return xerbla_(SCALAR_SUFFIX_UP "TRSV ", &info, 6); + if (info) return xerbla_(SCALAR_SUFFIX_UP "TRSV ", &info); Scalar *actual_b = get_compact_vector(b, *n, *incb); @@ -135,12 +134,11 @@ int EIGEN_BLAS_FUNC(trsv)(const char *uplo, const char *opa, const char *diag, c func[code](*n, a, *lda, actual_b); if (actual_b != b) delete[] copy_back(actual_b, b, *n, *incb); - - return 0; } -int EIGEN_BLAS_FUNC(trmv)(const char *uplo, const char *opa, const char *diag, const int *n, const RealScalar *pa, - const int *lda, RealScalar *pb, const int *incb) { +EIGEN_BLAS_FUNC(trmv) +(const char *uplo, const char *opa, const char *diag, const int *n, const RealScalar *pa, const int *lda, + RealScalar *pb, const int *incb) { typedef void (*functype)(int, int, const Scalar *, int, const Scalar *, int, Scalar *, int, const Scalar &); static const functype func[16] = { // array index: NOTR | (UP << 2) | (NUNIT << 3) @@ -186,23 +184,21 @@ int EIGEN_BLAS_FUNC(trmv)(const char *uplo, const char *opa, const char *diag, c info = 6; else if (*incb == 0) info = 8; - if (info) return xerbla_(SCALAR_SUFFIX_UP "TRMV ", &info, 6); + if (info) return xerbla_(SCALAR_SUFFIX_UP "TRMV ", &info); - if (*n == 0) return 1; + if (*n == 0) return; Scalar *actual_b = get_compact_vector(b, *n, *incb); Matrix res(*n); res.setZero(); int code = OP(*opa) | (UPLO(*uplo) << 2) | (DIAG(*diag) << 3); - if (code >= 16 || func[code] == 0) return 0; + if (code >= 16 || func[code] == 0) return; func[code](*n, *n, a, *lda, actual_b, 1, res.data(), 1, Scalar(1)); copy_back(res.data(), b, *n, *incb); if (actual_b != b) delete[] actual_b; - - return 1; } /** GBMV performs one of the matrix-vector operations @@ -212,8 +208,9 @@ int EIGEN_BLAS_FUNC(trmv)(const char *uplo, const char *opa, const char *diag, c * where alpha and beta are scalars, x and y are vectors and A is an * m by n band matrix, with kl sub-diagonals and ku super-diagonals. */ -int EIGEN_BLAS_FUNC(gbmv)(char *trans, int *m, int *n, int *kl, int *ku, RealScalar *palpha, RealScalar *pa, int *lda, - RealScalar *px, int *incx, RealScalar *pbeta, RealScalar *py, int *incy) { +EIGEN_BLAS_FUNC(gbmv) +(char *trans, int *m, int *n, int *kl, int *ku, RealScalar *palpha, RealScalar *pa, int *lda, RealScalar *px, int *incx, + RealScalar *pbeta, RealScalar *py, int *incy) { const Scalar *a = reinterpret_cast(pa); const Scalar *x = reinterpret_cast(px); Scalar *y = reinterpret_cast(py); @@ -238,9 +235,9 @@ int EIGEN_BLAS_FUNC(gbmv)(char *trans, int *m, int *n, int *kl, int *ku, RealSca info = 10; else if (*incy == 0) info = 13; - if (info) return xerbla_(SCALAR_SUFFIX_UP "GBMV ", &info, 6); + if (info) return xerbla_(SCALAR_SUFFIX_UP "GBMV ", &info); - if (*m == 0 || *n == 0 || (alpha == Scalar(0) && beta == Scalar(1))) return 0; + if (*m == 0 || *n == 0 || (alpha == Scalar(0) && beta == Scalar(1))) return; int actual_m = *m; int actual_n = *n; @@ -276,8 +273,6 @@ int EIGEN_BLAS_FUNC(gbmv)(char *trans, int *m, int *n, int *kl, int *ku, RealSca if (actual_x != x) delete[] actual_x; if (actual_y != y) delete[] copy_back(actual_y, y, actual_m, *incy); - - return 0; } #if 0 @@ -288,7 +283,7 @@ int EIGEN_BLAS_FUNC(gbmv)(char *trans, int *m, int *n, int *kl, int *ku, RealSca * where x is an n element vector and A is an n by n unit, or non-unit, * upper or lower triangular band matrix, with ( k + 1 ) diagonals. */ -int EIGEN_BLAS_FUNC(tbmv)(char *uplo, char *opa, char *diag, int *n, int *k, RealScalar *pa, int *lda, RealScalar *px, int *incx) +EIGEN_BLAS_FUNC(tbmv)(char *uplo, char *opa, char *diag, int *n, int *k, RealScalar *pa, int *lda, RealScalar *px, int *incx) { Scalar* a = reinterpret_cast(pa); Scalar* x = reinterpret_cast(px); @@ -305,8 +300,7 @@ int EIGEN_BLAS_FUNC(tbmv)(char *uplo, char *opa, char *diag, int *n, int *k, Rea if(info) return xerbla_(SCALAR_SUFFIX_UP"TBMV ",&info,6); - if(*n==0) - return 0; + if(*n==0) return; int actual_n = *n; @@ -334,8 +328,6 @@ int EIGEN_BLAS_FUNC(tbmv)(char *uplo, char *opa, char *diag, int *n, int *k, Rea if(actual_x!=x) delete[] actual_x; if(actual_y!=y) delete[] copy_back(actual_y,y,actual_m,*incy); - - return 0; } #endif @@ -350,8 +342,8 @@ int EIGEN_BLAS_FUNC(tbmv)(char *uplo, char *opa, char *diag, int *n, int *k, Rea * No test for singularity or near-singularity is included in this * routine. Such tests must be performed before calling this routine. */ -int EIGEN_BLAS_FUNC(tbsv)(char *uplo, char *op, char *diag, int *n, int *k, RealScalar *pa, int *lda, RealScalar *px, - int *incx) { +EIGEN_BLAS_FUNC(tbsv) +(char *uplo, char *op, char *diag, int *n, int *k, RealScalar *pa, int *lda, RealScalar *px, int *incx) { typedef void (*functype)(int, int, const Scalar *, int, Scalar *); static const functype func[16] = { // array index: NOTR | (UP << 2) | (NUNIT << 3) @@ -403,22 +395,20 @@ int EIGEN_BLAS_FUNC(tbsv)(char *uplo, char *op, char *diag, int *n, int *k, Real info = 7; else if (*incx == 0) info = 9; - if (info) return xerbla_(SCALAR_SUFFIX_UP "TBSV ", &info, 6); + if (info) return xerbla_(SCALAR_SUFFIX_UP "TBSV ", &info); - if (*n == 0 || (*k == 0 && DIAG(*diag) == UNIT)) return 0; + if (*n == 0 || (*k == 0 && DIAG(*diag) == UNIT)) return; int actual_n = *n; Scalar *actual_x = get_compact_vector(x, actual_n, *incx); int code = OP(*op) | (UPLO(*uplo) << 2) | (DIAG(*diag) << 3); - if (code >= 16 || func[code] == 0) return 0; + if (code >= 16 || func[code] == 0) return; func[code](*n, *k, a, *lda, actual_x); if (actual_x != x) delete[] copy_back(actual_x, x, actual_n, *incx); - - return 0; } /** DTPMV performs one of the matrix-vector operations @@ -428,7 +418,7 @@ int EIGEN_BLAS_FUNC(tbsv)(char *uplo, char *op, char *diag, int *n, int *k, Real * where x is an n element vector and A is an n by n unit, or non-unit, * upper or lower triangular matrix, supplied in packed form. */ -int EIGEN_BLAS_FUNC(tpmv)(char *uplo, char *opa, char *diag, int *n, RealScalar *pap, RealScalar *px, int *incx) { +EIGEN_BLAS_FUNC(tpmv)(char *uplo, char *opa, char *diag, int *n, RealScalar *pap, RealScalar *px, int *incx) { typedef void (*functype)(int, const Scalar *, const Scalar *, Scalar *, Scalar); static const functype func[16] = { // array index: NOTR | (UP << 2) | (NUNIT << 3) @@ -480,23 +470,21 @@ int EIGEN_BLAS_FUNC(tpmv)(char *uplo, char *opa, char *diag, int *n, RealScalar info = 4; else if (*incx == 0) info = 7; - if (info) return xerbla_(SCALAR_SUFFIX_UP "TPMV ", &info, 6); + if (info) return xerbla_(SCALAR_SUFFIX_UP "TPMV ", &info); - if (*n == 0) return 1; + if (*n == 0) return; Scalar *actual_x = get_compact_vector(x, *n, *incx); Matrix res(*n); res.setZero(); int code = OP(*opa) | (UPLO(*uplo) << 2) | (DIAG(*diag) << 3); - if (code >= 16 || func[code] == 0) return 0; + if (code >= 16 || func[code] == 0) return; func[code](*n, ap, actual_x, res.data(), Scalar(1)); copy_back(res.data(), x, *n, *incx); if (actual_x != x) delete[] actual_x; - - return 1; } /** DTPSV solves one of the systems of equations @@ -509,7 +497,7 @@ int EIGEN_BLAS_FUNC(tpmv)(char *uplo, char *opa, char *diag, int *n, RealScalar * No test for singularity or near-singularity is included in this * routine. Such tests must be performed before calling this routine. */ -int EIGEN_BLAS_FUNC(tpsv)(char *uplo, char *opa, char *diag, int *n, RealScalar *pap, RealScalar *px, int *incx) { +EIGEN_BLAS_FUNC(tpsv)(char *uplo, char *opa, char *diag, int *n, RealScalar *pap, RealScalar *px, int *incx) { typedef void (*functype)(int, const Scalar *, Scalar *); static const functype func[16] = { // array index: NOTR | (UP << 2) | (NUNIT << 3) @@ -557,7 +545,7 @@ int EIGEN_BLAS_FUNC(tpsv)(char *uplo, char *opa, char *diag, int *n, RealScalar info = 4; else if (*incx == 0) info = 7; - if (info) return xerbla_(SCALAR_SUFFIX_UP "TPSV ", &info, 6); + if (info) return xerbla_(SCALAR_SUFFIX_UP "TPSV ", &info); Scalar *actual_x = get_compact_vector(x, *n, *incx); @@ -565,6 +553,4 @@ int EIGEN_BLAS_FUNC(tpsv)(char *uplo, char *opa, char *diag, int *n, RealScalar func[code](*n, ap, actual_x); if (actual_x != x) delete[] copy_back(actual_x, x, *n, *incx); - - return 1; } diff --git a/blas/level2_real_impl.h b/blas/level2_real_impl.h index 29f5a564e..5653767d2 100644 --- a/blas/level2_real_impl.h +++ b/blas/level2_real_impl.h @@ -10,9 +10,9 @@ #include "common.h" // y = alpha*A*x + beta*y -int EIGEN_BLAS_FUNC(symv)(const char *uplo, const int *n, const RealScalar *palpha, const RealScalar *pa, - const int *lda, const RealScalar *px, const int *incx, const RealScalar *pbeta, - RealScalar *py, const int *incy) { +EIGEN_BLAS_FUNC(symv) +(const char *uplo, const int *n, const RealScalar *palpha, const RealScalar *pa, const int *lda, const RealScalar *px, + const int *incx, const RealScalar *pbeta, RealScalar *py, const int *incy) { typedef void (*functype)(int, const Scalar *, int, const Scalar *, Scalar *, Scalar); static const functype func[2] = { // array index: UP @@ -39,9 +39,9 @@ int EIGEN_BLAS_FUNC(symv)(const char *uplo, const int *n, const RealScalar *palp info = 7; else if (*incy == 0) info = 10; - if (info) return xerbla_(SCALAR_SUFFIX_UP "SYMV ", &info, 6); + if (info) return xerbla_(SCALAR_SUFFIX_UP "SYMV ", &info); - if (*n == 0) return 0; + if (*n == 0) return; const Scalar *actual_x = get_compact_vector(x, *n, *incx); Scalar *actual_y = get_compact_vector(y, *n, *incy); @@ -54,19 +54,18 @@ int EIGEN_BLAS_FUNC(symv)(const char *uplo, const int *n, const RealScalar *palp } int code = UPLO(*uplo); - if (code >= 2 || func[code] == 0) return 0; + if (code >= 2 || func[code] == 0) return; func[code](*n, a, *lda, actual_x, actual_y, alpha); if (actual_x != x) delete[] actual_x; if (actual_y != y) delete[] copy_back(actual_y, y, *n, *incy); - - return 1; } // C := alpha*x*x' + C -int EIGEN_BLAS_FUNC(syr)(const char *uplo, const int *n, const RealScalar *palpha, const RealScalar *px, - const int *incx, RealScalar *pc, const int *ldc) { +EIGEN_BLAS_FUNC(syr) +(const char *uplo, const int *n, const RealScalar *palpha, const RealScalar *px, const int *incx, RealScalar *pc, + const int *ldc) { typedef void (*functype)(int, Scalar *, int, const Scalar *, const Scalar *, const Scalar &); static const functype func[2] = { // array index: UP @@ -88,26 +87,25 @@ int EIGEN_BLAS_FUNC(syr)(const char *uplo, const int *n, const RealScalar *palph info = 5; else if (*ldc < std::max(1, *n)) info = 7; - if (info) return xerbla_(SCALAR_SUFFIX_UP "SYR ", &info, 6); + if (info) return xerbla_(SCALAR_SUFFIX_UP "SYR ", &info); - if (*n == 0 || alpha == Scalar(0)) return 1; + if (*n == 0 || alpha == Scalar(0)) return; // if the increment is not 1, let's copy it to a temporary vector to enable vectorization const Scalar *x_cpy = get_compact_vector(x, *n, *incx); int code = UPLO(*uplo); - if (code >= 2 || func[code] == 0) return 0; + if (code >= 2 || func[code] == 0) return; func[code](*n, c, *ldc, x_cpy, x_cpy, alpha); if (x_cpy != x) delete[] x_cpy; - - return 1; } // C := alpha*x*y' + alpha*y*x' + C -int EIGEN_BLAS_FUNC(syr2)(const char *uplo, const int *n, const RealScalar *palpha, const RealScalar *px, - const int *incx, const RealScalar *py, const int *incy, RealScalar *pc, const int *ldc) { +EIGEN_BLAS_FUNC(syr2) +(const char *uplo, const int *n, const RealScalar *palpha, const RealScalar *px, const int *incx, const RealScalar *py, + const int *incy, RealScalar *pc, const int *ldc) { typedef void (*functype)(int, Scalar *, int, const Scalar *, const Scalar *, Scalar); static const functype func[2] = { // array index: UP @@ -132,15 +130,15 @@ int EIGEN_BLAS_FUNC(syr2)(const char *uplo, const int *n, const RealScalar *palp info = 7; else if (*ldc < std::max(1, *n)) info = 9; - if (info) return xerbla_(SCALAR_SUFFIX_UP "SYR2 ", &info, 6); + if (info) return xerbla_(SCALAR_SUFFIX_UP "SYR2 ", &info); - if (alpha == Scalar(0)) return 1; + if (alpha == Scalar(0)) return; const Scalar *x_cpy = get_compact_vector(x, *n, *incx); const Scalar *y_cpy = get_compact_vector(y, *n, *incy); int code = UPLO(*uplo); - if (code >= 2 || func[code] == 0) return 0; + if (code >= 2 || func[code] == 0) return; func[code](*n, c, *ldc, x_cpy, y_cpy, alpha); @@ -152,7 +150,6 @@ int EIGEN_BLAS_FUNC(syr2)(const char *uplo, const int *n, const RealScalar *palp // return 0; // func[code](*n, a, *inca, b, *incb, c, *ldc, alpha); - return 1; } /** DSBMV performs the matrix-vector operation @@ -162,7 +159,7 @@ int EIGEN_BLAS_FUNC(syr2)(const char *uplo, const int *n, const RealScalar *palp * where alpha and beta are scalars, x and y are n element vectors and * A is an n by n symmetric band matrix, with k super-diagonals. */ -// int EIGEN_BLAS_FUNC(sbmv)( char *uplo, int *n, int *k, RealScalar *alpha, RealScalar *a, int *lda, +// EIGEN_BLAS_FUNC(sbmv)( char *uplo, int *n, int *k, RealScalar *alpha, RealScalar *a, int *lda, // RealScalar *x, int *incx, RealScalar *beta, RealScalar *y, int *incy) // { // return 1; @@ -176,7 +173,7 @@ int EIGEN_BLAS_FUNC(syr2)(const char *uplo, const int *n, const RealScalar *palp * A is an n by n symmetric matrix, supplied in packed form. * */ -// int EIGEN_BLAS_FUNC(spmv)(char *uplo, int *n, RealScalar *alpha, RealScalar *ap, RealScalar *x, int *incx, RealScalar +// EIGEN_BLAS_FUNC(spmv)(char *uplo, int *n, RealScalar *alpha, RealScalar *ap, RealScalar *x, int *incx, RealScalar // *beta, RealScalar *y, int *incy) // { // return 1; @@ -189,7 +186,7 @@ int EIGEN_BLAS_FUNC(syr2)(const char *uplo, const int *n, const RealScalar *palp * where alpha is a real scalar, x is an n element vector and A is an * n by n symmetric matrix, supplied in packed form. */ -int EIGEN_BLAS_FUNC(spr)(char *uplo, int *n, Scalar *palpha, Scalar *px, int *incx, Scalar *pap) { +EIGEN_BLAS_FUNC(spr)(char *uplo, int *n, Scalar *palpha, Scalar *px, int *incx, Scalar *pap) { typedef void (*functype)(int, Scalar *, const Scalar *, Scalar); static const functype func[2] = { // array index: UP @@ -209,20 +206,18 @@ int EIGEN_BLAS_FUNC(spr)(char *uplo, int *n, Scalar *palpha, Scalar *px, int *in info = 2; else if (*incx == 0) info = 5; - if (info) return xerbla_(SCALAR_SUFFIX_UP "SPR ", &info, 6); + if (info) return xerbla_(SCALAR_SUFFIX_UP "SPR ", &info); - if (alpha == Scalar(0)) return 1; + if (alpha == Scalar(0)) return; Scalar *x_cpy = get_compact_vector(x, *n, *incx); int code = UPLO(*uplo); - if (code >= 2 || func[code] == 0) return 0; + if (code >= 2 || func[code] == 0) return; func[code](*n, ap, x_cpy, alpha); if (x_cpy != x) delete[] x_cpy; - - return 1; } /** DSPR2 performs the symmetric rank 2 operation @@ -232,8 +227,8 @@ int EIGEN_BLAS_FUNC(spr)(char *uplo, int *n, Scalar *palpha, Scalar *px, int *in * where alpha is a scalar, x and y are n element vectors and A is an * n by n symmetric matrix, supplied in packed form. */ -int EIGEN_BLAS_FUNC(spr2)(char *uplo, int *n, RealScalar *palpha, RealScalar *px, int *incx, RealScalar *py, int *incy, - RealScalar *pap) { +EIGEN_BLAS_FUNC(spr2) +(char *uplo, int *n, RealScalar *palpha, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar *pap) { typedef void (*functype)(int, Scalar *, const Scalar *, const Scalar *, Scalar); static const functype func[2] = { // array index: UP @@ -256,22 +251,20 @@ int EIGEN_BLAS_FUNC(spr2)(char *uplo, int *n, RealScalar *palpha, RealScalar *px info = 5; else if (*incy == 0) info = 7; - if (info) return xerbla_(SCALAR_SUFFIX_UP "SPR2 ", &info, 6); + if (info) return xerbla_(SCALAR_SUFFIX_UP "SPR2 ", &info); - if (alpha == Scalar(0)) return 1; + if (alpha == Scalar(0)) return; Scalar *x_cpy = get_compact_vector(x, *n, *incx); Scalar *y_cpy = get_compact_vector(y, *n, *incy); int code = UPLO(*uplo); - if (code >= 2 || func[code] == 0) return 0; + if (code >= 2 || func[code] == 0) return; func[code](*n, ap, x_cpy, y_cpy, alpha); if (x_cpy != x) delete[] x_cpy; if (y_cpy != y) delete[] y_cpy; - - return 1; } /** DGER performs the rank 1 operation @@ -281,8 +274,8 @@ int EIGEN_BLAS_FUNC(spr2)(char *uplo, int *n, RealScalar *palpha, RealScalar *px * where alpha is a scalar, x is an m element vector, y is an n element * vector and A is an m by n matrix. */ -int EIGEN_BLAS_FUNC(ger)(int *m, int *n, Scalar *palpha, Scalar *px, int *incx, Scalar *py, int *incy, Scalar *pa, - int *lda) { +EIGEN_BLAS_FUNC(ger) +(int *m, int *n, Scalar *palpha, Scalar *px, int *incx, Scalar *py, int *incy, Scalar *pa, int *lda) { Scalar *x = reinterpret_cast(px); Scalar *y = reinterpret_cast(py); Scalar *a = reinterpret_cast(pa); @@ -299,9 +292,9 @@ int EIGEN_BLAS_FUNC(ger)(int *m, int *n, Scalar *palpha, Scalar *px, int *incx, info = 7; else if (*lda < std::max(1, *m)) info = 9; - if (info) return xerbla_(SCALAR_SUFFIX_UP "GER ", &info, 6); + if (info) return xerbla_(SCALAR_SUFFIX_UP "GER ", &info); - if (alpha == Scalar(0)) return 1; + if (alpha == Scalar(0)) return; Scalar *x_cpy = get_compact_vector(x, *m, *incx); Scalar *y_cpy = get_compact_vector(y, *n, *incy); @@ -310,6 +303,4 @@ int EIGEN_BLAS_FUNC(ger)(int *m, int *n, Scalar *palpha, Scalar *px, int *incx, if (x_cpy != x) delete[] x_cpy; if (y_cpy != y) delete[] y_cpy; - - return 1; } diff --git a/blas/level3_impl.h b/blas/level3_impl.h index 5af5027de..a6ddf2614 100644 --- a/blas/level3_impl.h +++ b/blas/level3_impl.h @@ -9,13 +9,14 @@ #include #include "common.h" -int EIGEN_BLAS_FUNC(gemm)(const char *opa, const char *opb, const int *m, const int *n, const int *k, - const RealScalar *palpha, const RealScalar *pa, const int *lda, const RealScalar *pb, - const int *ldb, const RealScalar *pbeta, RealScalar *pc, const int *ldc) { +EIGEN_BLAS_FUNC(gemm) +(const char *opa, const char *opb, const int *m, const int *n, const int *k, const RealScalar *palpha, + const RealScalar *pa, const int *lda, const RealScalar *pb, const int *ldb, const RealScalar *pbeta, RealScalar *pc, + const int *ldc) { // std::cerr << "in gemm " << *opa << " " << *opb << " " << *m << " " << *n << " " << *k << " " << *lda << " " << // *ldb << " " << *ldc << " " << *palpha << " " << *pbeta << "\n"; typedef void (*functype)(DenseIndex, DenseIndex, DenseIndex, const Scalar *, DenseIndex, const Scalar *, DenseIndex, - Scalar *, DenseIndex, DenseIndex, Scalar, internal::level3_blocking &, + Scalar *, DenseIndex, DenseIndex, Scalar, Eigen::internal::level3_blocking &, Eigen::internal::GemmParallelInfo *); static const functype func[12] = { // array index: NOTR | (NOTR << 2) @@ -72,9 +73,9 @@ int EIGEN_BLAS_FUNC(gemm)(const char *opa, const char *opb, const int *m, const info = 10; else if (*ldc < std::max(1, *m)) info = 13; - if (info) return xerbla_(SCALAR_SUFFIX_UP "GEMM ", &info, 6); + if (info) return xerbla_(SCALAR_SUFFIX_UP "GEMM ", &info); - if (*m == 0 || *n == 0) return 0; + if (*m == 0 || *n == 0) return; if (beta != Scalar(1)) { if (beta == Scalar(0)) @@ -83,22 +84,21 @@ int EIGEN_BLAS_FUNC(gemm)(const char *opa, const char *opb, const int *m, const matrix(c, *m, *n, *ldc) *= beta; } - if (*k == 0) return 0; + if (*k == 0) return; internal::gemm_blocking_space blocking(*m, *n, *k, 1, true); int code = OP(*opa) | (OP(*opb) << 2); func[code](*m, *n, *k, a, *lda, b, *ldb, c, 1, *ldc, alpha, blocking, 0); - return 0; } -int EIGEN_BLAS_FUNC(trsm)(const char *side, const char *uplo, const char *opa, const char *diag, const int *m, - const int *n, const RealScalar *palpha, const RealScalar *pa, const int *lda, RealScalar *pb, - const int *ldb) { +EIGEN_BLAS_FUNC(trsm) +(const char *side, const char *uplo, const char *opa, const char *diag, const int *m, const int *n, + const RealScalar *palpha, const RealScalar *pa, const int *lda, RealScalar *pb, const int *ldb) { // std::cerr << "in trsm " << *side << " " << *uplo << " " << *opa << " " << *diag << " " << *m << "," << *n << " " // << *palpha << " " << *lda << " " << *ldb<< "\n"; typedef void (*functype)(DenseIndex, DenseIndex, const Scalar *, DenseIndex, Scalar *, DenseIndex, DenseIndex, - internal::level3_blocking &); + Eigen::internal::level3_blocking &); static const functype func[32] = { // array index: NOTR | (LEFT << 2) | (UP << 3) | (NUNIT << 4) (internal::triangular_solve_matrix::run), @@ -190,9 +190,9 @@ int EIGEN_BLAS_FUNC(trsm)(const char *side, const char *uplo, const char *opa, c info = 9; else if (*ldb < std::max(1, *m)) info = 11; - if (info) return xerbla_(SCALAR_SUFFIX_UP "TRSM ", &info, 6); + if (info) return xerbla_(SCALAR_SUFFIX_UP "TRSM ", &info); - if (*m == 0 || *n == 0) return 0; + if (*m == 0 || *n == 0) return; int code = OP(*opa) | (SIDE(*side) << 2) | (UPLO(*uplo) << 3) | (DIAG(*diag) << 4); @@ -207,15 +207,13 @@ int EIGEN_BLAS_FUNC(trsm)(const char *side, const char *uplo, const char *opa, c } if (alpha != Scalar(1)) matrix(b, *m, *n, *ldb) *= alpha; - - return 0; } // b = alpha*op(a)*b for side = 'L'or'l' // b = alpha*b*op(a) for side = 'R'or'r' -int EIGEN_BLAS_FUNC(trmm)(const char *side, const char *uplo, const char *opa, const char *diag, const int *m, - const int *n, const RealScalar *palpha, const RealScalar *pa, const int *lda, RealScalar *pb, - const int *ldb) { +EIGEN_BLAS_FUNC(trmm) +(const char *side, const char *uplo, const char *opa, const char *diag, const int *m, const int *n, + const RealScalar *palpha, const RealScalar *pa, const int *lda, RealScalar *pb, const int *ldb) { // std::cerr << "in trmm " << *side << " " << *uplo << " " << *opa << " " << *diag << " " << *m << " " << *n << " " // << *lda << " " << *ldb << " " << *palpha << "\n"; typedef void (*functype)(DenseIndex, DenseIndex, DenseIndex, const Scalar *, DenseIndex, const Scalar *, DenseIndex, @@ -324,11 +322,11 @@ int EIGEN_BLAS_FUNC(trmm)(const char *side, const char *uplo, const char *opa, c info = 9; else if (*ldb < std::max(1, *m)) info = 11; - if (info) return xerbla_(SCALAR_SUFFIX_UP "TRMM ", &info, 6); + if (info) return xerbla_(SCALAR_SUFFIX_UP "TRMM ", &info); int code = OP(*opa) | (SIDE(*side) << 2) | (UPLO(*uplo) << 3) | (DIAG(*diag) << 4); - if (*m == 0 || *n == 0) return 1; + if (*m == 0 || *n == 0) return; // FIXME find a way to avoid this copy Matrix tmp = matrix(b, *m, *n, *ldb); @@ -343,14 +341,13 @@ int EIGEN_BLAS_FUNC(trmm)(const char *side, const char *uplo, const char *opa, c false); func[code](*m, *n, *n, tmp.data(), tmp.outerStride(), a, *lda, b, 1, *ldb, alpha, blocking); } - return 1; } // c = alpha*a*b + beta*c for side = 'L'or'l' // c = alpha*b*a + beta*c for side = 'R'or'r -int EIGEN_BLAS_FUNC(symm)(const char *side, const char *uplo, const int *m, const int *n, const RealScalar *palpha, - const RealScalar *pa, const int *lda, const RealScalar *pb, const int *ldb, - const RealScalar *pbeta, RealScalar *pc, const int *ldc) { +EIGEN_BLAS_FUNC(symm) +(const char *side, const char *uplo, const int *m, const int *n, const RealScalar *palpha, const RealScalar *pa, + const int *lda, const RealScalar *pb, const int *ldb, const RealScalar *pbeta, RealScalar *pc, const int *ldc) { // std::cerr << "in symm " << *side << " " << *uplo << " " << *m << "x" << *n << " lda:" << *lda << " ldb:" << *ldb // << " ldc:" << *ldc << " alpha:" << *palpha << " beta:" << *pbeta << "\n"; const Scalar *a = reinterpret_cast(pa); @@ -374,7 +371,7 @@ int EIGEN_BLAS_FUNC(symm)(const char *side, const char *uplo, const int *m, cons info = 9; else if (*ldc < std::max(1, *m)) info = 12; - if (info) return xerbla_(SCALAR_SUFFIX_UP "SYMM ", &info, 6); + if (info) return xerbla_(SCALAR_SUFFIX_UP "SYMM ", &info); if (beta != Scalar(1)) { if (beta == Scalar(0)) @@ -383,9 +380,7 @@ int EIGEN_BLAS_FUNC(symm)(const char *side, const char *uplo, const int *m, cons matrix(c, *m, *n, *ldc) *= beta; } - if (*m == 0 || *n == 0) { - return 1; - } + if (*m == 0 || *n == 0) return; int size = (SIDE(*side) == LEFT) ? (*m) : (*n); #if ISCOMPLEX @@ -413,7 +408,7 @@ int EIGEN_BLAS_FUNC(symm)(const char *side, const char *uplo, const int *m, cons internal::product_selfadjoint_matrix::run(*m, *n, a, *lda, b, *ldb, c, 1, *ldc, alpha, blocking); else - return 0; + return; else if (SIDE(*side) == RIGHT) if (UPLO(*uplo) == UP) internal::product_selfadjoint_matrix::run(*m, *n, b, *ldb, a, *lda, c, 1, *ldc, alpha, blocking); else - return 0; + return; else - return 0; + return; #endif - - return 0; } // c = alpha*a*a' + beta*c for op = 'N'or'n' // c = alpha*a'*a + beta*c for op = 'T'or't','C'or'c' -int EIGEN_BLAS_FUNC(syrk)(const char *uplo, const char *op, const int *n, const int *k, const RealScalar *palpha, - const RealScalar *pa, const int *lda, const RealScalar *pbeta, RealScalar *pc, - const int *ldc) { +EIGEN_BLAS_FUNC(syrk) +(const char *uplo, const char *op, const int *n, const int *k, const RealScalar *palpha, const RealScalar *pa, + const int *lda, const RealScalar *pbeta, RealScalar *pc, const int *ldc) { // std::cerr << "in syrk " << *uplo << " " << *op << " " << *n << " " << *k << " " << *palpha << " " << *lda << " " // << *pbeta << " " << *ldc << "\n"; #if !ISCOMPLEX @@ -481,7 +474,7 @@ int EIGEN_BLAS_FUNC(syrk)(const char *uplo, const char *op, const int *n, const info = 7; else if (*ldc < std::max(1, *n)) info = 10; - if (info) return xerbla_(SCALAR_SUFFIX_UP "SYRK ", &info, 6); + if (info) return xerbla_(SCALAR_SUFFIX_UP "SYRK ", &info); if (beta != Scalar(1)) { if (UPLO(*uplo) == UP) @@ -495,7 +488,7 @@ int EIGEN_BLAS_FUNC(syrk)(const char *uplo, const char *op, const int *n, const matrix(c, *n, *n, *ldc).triangularView() *= beta; } - if (*n == 0 || *k == 0) return 0; + if (*n == 0 || *k == 0) return; #if ISCOMPLEX // FIXME add support for symmetric complex matrix @@ -520,15 +513,13 @@ int EIGEN_BLAS_FUNC(syrk)(const char *uplo, const char *op, const int *n, const int code = OP(*op) | (UPLO(*uplo) << 2); func[code](*n, *k, a, *lda, a, *lda, c, 1, *ldc, alpha, blocking); #endif - - return 0; } // c = alpha*a*b' + alpha*b*a' + beta*c for op = 'N'or'n' // c = alpha*a'*b + alpha*b'*a + beta*c for op = 'T'or't' -int EIGEN_BLAS_FUNC(syr2k)(const char *uplo, const char *op, const int *n, const int *k, const RealScalar *palpha, - const RealScalar *pa, const int *lda, const RealScalar *pb, const int *ldb, - const RealScalar *pbeta, RealScalar *pc, const int *ldc) { +EIGEN_BLAS_FUNC(syr2k) +(const char *uplo, const char *op, const int *n, const int *k, const RealScalar *palpha, const RealScalar *pa, + const int *lda, const RealScalar *pb, const int *ldb, const RealScalar *pbeta, RealScalar *pc, const int *ldc) { const Scalar *a = reinterpret_cast(pa); const Scalar *b = reinterpret_cast(pb); Scalar *c = reinterpret_cast(pc); @@ -553,7 +544,7 @@ int EIGEN_BLAS_FUNC(syr2k)(const char *uplo, const char *op, const int *n, const info = 9; else if (*ldc < std::max(1, *n)) info = 12; - if (info) return xerbla_(SCALAR_SUFFIX_UP "SYR2K", &info, 6); + if (info) return xerbla_(SCALAR_SUFFIX_UP "SYR2K", &info); if (beta != Scalar(1)) { if (UPLO(*uplo) == UP) @@ -567,7 +558,7 @@ int EIGEN_BLAS_FUNC(syr2k)(const char *uplo, const char *op, const int *n, const matrix(c, *n, *n, *ldc).triangularView() *= beta; } - if (*k == 0) return 1; + if (*k == 0) return; if (OP(*op) == NOTR) { if (UPLO(*uplo) == UP) { @@ -588,17 +579,15 @@ int EIGEN_BLAS_FUNC(syr2k)(const char *uplo, const char *op, const int *n, const alpha * matrix(a, *k, *n, *lda).transpose() * matrix(b, *k, *n, *ldb) + alpha * matrix(b, *k, *n, *ldb).transpose() * matrix(a, *k, *n, *lda); } - - return 0; } #if ISCOMPLEX // c = alpha*a*b + beta*c for side = 'L'or'l' // c = alpha*b*a + beta*c for side = 'R'or'r -int EIGEN_BLAS_FUNC(hemm)(const char *side, const char *uplo, const int *m, const int *n, const RealScalar *palpha, - const RealScalar *pa, const int *lda, const RealScalar *pb, const int *ldb, - const RealScalar *pbeta, RealScalar *pc, const int *ldc) { +EIGEN_BLAS_FUNC(hemm) +(const char *side, const char *uplo, const int *m, const int *n, const RealScalar *palpha, const RealScalar *pa, + const int *lda, const RealScalar *pb, const int *ldb, const RealScalar *pbeta, RealScalar *pc, const int *ldc) { const Scalar *a = reinterpret_cast(pa); const Scalar *b = reinterpret_cast(pb); Scalar *c = reinterpret_cast(pc); @@ -623,16 +612,14 @@ int EIGEN_BLAS_FUNC(hemm)(const char *side, const char *uplo, const int *m, cons info = 9; else if (*ldc < std::max(1, *m)) info = 12; - if (info) return xerbla_(SCALAR_SUFFIX_UP "HEMM ", &info, 6); + if (info) return xerbla_(SCALAR_SUFFIX_UP "HEMM ", &info); if (beta == Scalar(0)) matrix(c, *m, *n, *ldc).setZero(); else if (beta != Scalar(1)) matrix(c, *m, *n, *ldc) *= beta; - if (*m == 0 || *n == 0) { - return 1; - } + if (*m == 0 || *n == 0) return; int size = (SIDE(*side) == LEFT) ? (*m) : (*n); internal::gemm_blocking_space blocking(*m, *n, size, 1, false); @@ -645,7 +632,7 @@ int EIGEN_BLAS_FUNC(hemm)(const char *side, const char *uplo, const int *m, cons internal::product_selfadjoint_matrix::run(*m, *n, a, *lda, b, *ldb, c, 1, *ldc, alpha, blocking); else - return 0; + return; } else if (SIDE(*side) == RIGHT) { if (UPLO(*uplo) == UP) matrix(c, *m, *n, *ldc) += @@ -658,24 +645,22 @@ RowMajor,true,Conj, ColMajor, 1> internal::product_selfadjoint_matrix::run(*m, *n, b, *ldb, a, *lda, c, 1, *ldc, alpha, blocking); else - return 0; + return; } else { - return 0; + return; } - - return 0; } // c = alpha*a*conj(a') + beta*c for op = 'N'or'n' // c = alpha*conj(a')*a + beta*c for op = 'C'or'c' -int EIGEN_BLAS_FUNC(herk)(const char *uplo, const char *op, const int *n, const int *k, const RealScalar *palpha, - const RealScalar *pa, const int *lda, const RealScalar *pbeta, RealScalar *pc, - const int *ldc) { +EIGEN_BLAS_FUNC(herk) +(const char *uplo, const char *op, const int *n, const int *k, const RealScalar *palpha, const RealScalar *pa, + const int *lda, const RealScalar *pbeta, RealScalar *pc, const int *ldc) { // std::cerr << "in herk " << *uplo << " " << *op << " " << *n << " " << *k << " " << *palpha << " " << *lda << " " // << *pbeta << " " << *ldc << "\n"; typedef void (*functype)(DenseIndex, DenseIndex, const Scalar *, DenseIndex, const Scalar *, DenseIndex, Scalar *, - DenseIndex, DenseIndex, const Scalar &, internal::level3_blocking &); + DenseIndex, DenseIndex, const Scalar &, Eigen::internal::level3_blocking &); static const functype func[8] = { // array index: NOTR | (UP << 2) (internal::general_matrix_matrix_triangular_product(pa); const Scalar *b = reinterpret_cast(pb); Scalar *c = reinterpret_cast(pc); @@ -773,7 +757,7 @@ int EIGEN_BLAS_FUNC(her2k)(const char *uplo, const char *op, const int *n, const info = 9; else if (*ldc < std::max(1, *n)) info = 12; - if (info) return xerbla_(SCALAR_SUFFIX_UP "HER2K", &info, 6); + if (info) return xerbla_(SCALAR_SUFFIX_UP "HER2K", &info); if (beta != RealScalar(1)) { if (UPLO(*uplo) == UP) @@ -793,7 +777,7 @@ int EIGEN_BLAS_FUNC(her2k)(const char *uplo, const char *op, const int *n, const } else if (*k > 0 && alpha != Scalar(0)) matrix(c, *n, *n, *ldc).diagonal().imag().setZero(); - if (*k == 0) return 1; + if (*k == 0) return; if (OP(*op) == NOTR) { if (UPLO(*uplo) == UP) { @@ -814,8 +798,6 @@ int EIGEN_BLAS_FUNC(her2k)(const char *uplo, const char *op, const int *n, const alpha * matrix(a, *k, *n, *lda).adjoint() * matrix(b, *k, *n, *ldb) + numext::conj(alpha) * matrix(b, *k, *n, *ldb).adjoint() * matrix(a, *k, *n, *lda); } - - return 1; } #endif // ISCOMPLEX diff --git a/blas/single.cpp b/blas/single.cpp index 9afea357e..fefb6954d 100644 --- a/blas/single.cpp +++ b/blas/single.cpp @@ -18,6 +18,6 @@ #include "level2_real_impl.h" #include "level3_impl.h" -float EIGEN_BLAS_FUNC(dsdot)(int* n, float* alpha, float* x, int* incx, float* y, int* incy) { +float EIGEN_BLAS_FUNC_NAME(dsdot)(int* n, float* alpha, float* x, int* incx, float* y, int* incy) { return double(*alpha) + BLASFUNC(dsdot)(n, x, incx, y, incy); } diff --git a/blas/xerbla.cpp b/blas/xerbla.cpp index 698e89f80..0b59c4a35 100644 --- a/blas/xerbla.cpp +++ b/blas/xerbla.cpp @@ -11,10 +11,7 @@ extern "C" { #endif -EIGEN_WEAK_LINKING int xerbla_(const char *msg, int *info, int) { - printf("Eigen BLAS ERROR #%i: %s\n", *info, msg); - return 0; -} +EIGEN_WEAK_LINKING void xerbla_(const char *msg, int *info) { printf("Eigen BLAS ERROR #%i: %s\n", *info, msg); } #ifdef __cplusplus } diff --git a/lapack/cholesky.inc b/lapack/cholesky.inc index d38a10d6b..dea5bf635 100644 --- a/lapack/cholesky.inc +++ b/lapack/cholesky.inc @@ -11,7 +11,7 @@ #include // POTRF computes the Cholesky factorization of a real symmetric positive definite matrix A. -EIGEN_LAPACK_FUNC(potrf, (char *uplo, int *n, RealScalar *pa, int *lda, int *info)) { +EIGEN_LAPACK_FUNC(potrf)(char *uplo, int *n, RealScalar *pa, int *lda, int *info) { *info = 0; if (UPLO(*uplo) == INVALID) *info = -1; @@ -21,7 +21,7 @@ EIGEN_LAPACK_FUNC(potrf, (char *uplo, int *n, RealScalar *pa, int *lda, int *inf *info = -4; if (*info != 0) { int e = -*info; - return xerbla_(SCALAR_SUFFIX_UP "POTRF", &e, 6); + return xerbla_(SCALAR_SUFFIX_UP "POTRF", &e); } Scalar *a = reinterpret_cast(pa); @@ -33,15 +33,12 @@ EIGEN_LAPACK_FUNC(potrf, (char *uplo, int *n, RealScalar *pa, int *lda, int *inf ret = int(internal::llt_inplace::blocked(A)); if (ret >= 0) *info = ret + 1; - - return 0; } // POTRS solves a system of linear equations A*X = B with a symmetric // positive definite matrix A using the Cholesky factorization // A = U**T*U or A = L*L**T computed by DPOTRF. -EIGEN_LAPACK_FUNC(potrs, - (char *uplo, int *n, int *nrhs, RealScalar *pa, int *lda, RealScalar *pb, int *ldb, int *info)) { +EIGEN_LAPACK_FUNC(potrs)(char *uplo, int *n, int *nrhs, RealScalar *pa, int *lda, RealScalar *pb, int *ldb, int *info) { *info = 0; if (UPLO(*uplo) == INVALID) *info = -1; @@ -55,7 +52,7 @@ EIGEN_LAPACK_FUNC(potrs, *info = -7; if (*info != 0) { int e = -*info; - return xerbla_(SCALAR_SUFFIX_UP "POTRS", &e, 6); + return xerbla_(SCALAR_SUFFIX_UP "POTRS", &e); } Scalar *a = reinterpret_cast(pa); @@ -70,6 +67,4 @@ EIGEN_LAPACK_FUNC(potrs, A.triangularView().solveInPlace(B); A.triangularView().adjoint().solveInPlace(B); } - - return 0; } diff --git a/lapack/eigenvalues.inc b/lapack/eigenvalues.inc index 62192f4b9..6f168de1a 100644 --- a/lapack/eigenvalues.inc +++ b/lapack/eigenvalues.inc @@ -11,8 +11,8 @@ #include // computes eigen values and vectors of a general N-by-N matrix A -EIGEN_LAPACK_FUNC(syev, (char* jobz, char* uplo, int* n, Scalar* a, int* lda, Scalar* w, Scalar* /*work*/, int* lwork, - int* info)) { +EIGEN_LAPACK_FUNC(syev) +(char* jobz, char* uplo, int* n, Scalar* a, int* lda, Scalar* w, Scalar* /*work*/, int* lwork, int* info) { // TODO exploit the work buffer bool query_size = *lwork == -1; @@ -30,15 +30,15 @@ EIGEN_LAPACK_FUNC(syev, (char* jobz, char* uplo, int* n, Scalar* a, int* lda, Sc if (*info != 0) { int e = -*info; - return xerbla_(SCALAR_SUFFIX_UP "SYEV ", &e, 6); + return xerbla_(SCALAR_SUFFIX_UP "SYEV ", &e); } if (query_size) { *lwork = 0; - return 0; + return; } - if (*n == 0) return 0; + if (*n == 0) return; PlainMatrixType mat(*n, *n); if (UPLO(*uplo) == UP) @@ -53,11 +53,9 @@ EIGEN_LAPACK_FUNC(syev, (char* jobz, char* uplo, int* n, Scalar* a, int* lda, Sc make_vector(w, *n).setZero(); if (computeVectors) matrix(a, *n, *n, *lda).setIdentity(); //*info = 1; - return 0; + return; } make_vector(w, *n) = eig.eigenvalues(); if (computeVectors) matrix(a, *n, *n, *lda) = eig.eigenvectors(); - - return 0; } diff --git a/lapack/lapack.h b/lapack/lapack.h index 9bb222bab..88fdb9895 100644 --- a/lapack/lapack.h +++ b/lapack/lapack.h @@ -7,127 +7,127 @@ extern "C" { #endif -int BLASFUNC(csymv)(const char *, const int *, const float *, const float *, const int *, const float *, const int *, - const float *, float *, const int *); -int BLASFUNC(zsymv)(const char *, const int *, const double *, const double *, const int *, const double *, const int *, - const double *, double *, const int *); -int BLASFUNC(xsymv)(const char *, const int *, const double *, const double *, const int *, const double *, const int *, - const double *, double *, const int *); +void BLASFUNC(csymv)(const char *, const int *, const float *, const float *, const int *, const float *, const int *, + const float *, float *, const int *); +void BLASFUNC(zsymv)(const char *, const int *, const double *, const double *, const int *, const double *, + const int *, const double *, double *, const int *); +void BLASFUNC(xsymv)(const char *, const int *, const double *, const double *, const int *, const double *, + const int *, const double *, double *, const int *); -int BLASFUNC(cspmv)(char *, int *, float *, float *, float *, int *, float *, float *, int *); -int BLASFUNC(zspmv)(char *, int *, double *, double *, double *, int *, double *, double *, int *); -int BLASFUNC(xspmv)(char *, int *, double *, double *, double *, int *, double *, double *, int *); +void BLASFUNC(cspmv)(char *, int *, float *, float *, float *, int *, float *, float *, int *); +void BLASFUNC(zspmv)(char *, int *, double *, double *, double *, int *, double *, double *, int *); +void BLASFUNC(xspmv)(char *, int *, double *, double *, double *, int *, double *, double *, int *); -int BLASFUNC(csyr)(char *, int *, float *, float *, int *, float *, int *); -int BLASFUNC(zsyr)(char *, int *, double *, double *, int *, double *, int *); -int BLASFUNC(xsyr)(char *, int *, double *, double *, int *, double *, int *); +void BLASFUNC(csyr)(char *, int *, float *, float *, int *, float *, int *); +void BLASFUNC(zsyr)(char *, int *, double *, double *, int *, double *, int *); +void BLASFUNC(xsyr)(char *, int *, double *, double *, int *, double *, int *); -int BLASFUNC(cspr)(char *, int *, float *, float *, int *, float *); -int BLASFUNC(zspr)(char *, int *, double *, double *, int *, double *); -int BLASFUNC(xspr)(char *, int *, double *, double *, int *, double *); +void BLASFUNC(cspr)(char *, int *, float *, float *, int *, float *); +void BLASFUNC(zspr)(char *, int *, double *, double *, int *, double *); +void BLASFUNC(xspr)(char *, int *, double *, double *, int *, double *); -int BLASFUNC(sgemt)(char *, int *, int *, float *, float *, int *, float *, int *); -int BLASFUNC(dgemt)(char *, int *, int *, double *, double *, int *, double *, int *); -int BLASFUNC(cgemt)(char *, int *, int *, float *, float *, int *, float *, int *); -int BLASFUNC(zgemt)(char *, int *, int *, double *, double *, int *, double *, int *); +void BLASFUNC(sgemt)(char *, int *, int *, float *, float *, int *, float *, int *); +void BLASFUNC(dgemt)(char *, int *, int *, double *, double *, int *, double *, int *); +void BLASFUNC(cgemt)(char *, int *, int *, float *, float *, int *, float *, int *); +void BLASFUNC(zgemt)(char *, int *, int *, double *, double *, int *, double *, int *); -int BLASFUNC(sgema)(char *, char *, int *, int *, float *, float *, int *, float *, float *, int *, float *, int *); -int BLASFUNC(dgema)(char *, char *, int *, int *, double *, double *, int *, double *, double *, int *, double *, - int *); -int BLASFUNC(cgema)(char *, char *, int *, int *, float *, float *, int *, float *, float *, int *, float *, int *); -int BLASFUNC(zgema)(char *, char *, int *, int *, double *, double *, int *, double *, double *, int *, double *, - int *); +void BLASFUNC(sgema)(char *, char *, int *, int *, float *, float *, int *, float *, float *, int *, float *, int *); +void BLASFUNC(dgema)(char *, char *, int *, int *, double *, double *, int *, double *, double *, int *, double *, + int *); +void BLASFUNC(cgema)(char *, char *, int *, int *, float *, float *, int *, float *, float *, int *, float *, int *); +void BLASFUNC(zgema)(char *, char *, int *, int *, double *, double *, int *, double *, double *, int *, double *, + int *); -int BLASFUNC(sgems)(char *, char *, int *, int *, float *, float *, int *, float *, float *, int *, float *, int *); -int BLASFUNC(dgems)(char *, char *, int *, int *, double *, double *, int *, double *, double *, int *, double *, - int *); -int BLASFUNC(cgems)(char *, char *, int *, int *, float *, float *, int *, float *, float *, int *, float *, int *); -int BLASFUNC(zgems)(char *, char *, int *, int *, double *, double *, int *, double *, double *, int *, double *, - int *); +void BLASFUNC(sgems)(char *, char *, int *, int *, float *, float *, int *, float *, float *, int *, float *, int *); +void BLASFUNC(dgems)(char *, char *, int *, int *, double *, double *, int *, double *, double *, int *, double *, + int *); +void BLASFUNC(cgems)(char *, char *, int *, int *, float *, float *, int *, float *, float *, int *, float *, int *); +void BLASFUNC(zgems)(char *, char *, int *, int *, double *, double *, int *, double *, double *, int *, double *, + int *); -int BLASFUNC(sgetf2)(int *, int *, float *, int *, int *, int *); -int BLASFUNC(dgetf2)(int *, int *, double *, int *, int *, int *); -int BLASFUNC(qgetf2)(int *, int *, double *, int *, int *, int *); -int BLASFUNC(cgetf2)(int *, int *, float *, int *, int *, int *); -int BLASFUNC(zgetf2)(int *, int *, double *, int *, int *, int *); -int BLASFUNC(xgetf2)(int *, int *, double *, int *, int *, int *); +void BLASFUNC(sgetf2)(int *, int *, float *, int *, int *, int *); +void BLASFUNC(dgetf2)(int *, int *, double *, int *, int *, int *); +void BLASFUNC(qgetf2)(int *, int *, double *, int *, int *, int *); +void BLASFUNC(cgetf2)(int *, int *, float *, int *, int *, int *); +void BLASFUNC(zgetf2)(int *, int *, double *, int *, int *, int *); +void BLASFUNC(xgetf2)(int *, int *, double *, int *, int *, int *); -int BLASFUNC(sgetrf)(int *, int *, float *, int *, int *, int *); -int BLASFUNC(dgetrf)(int *, int *, double *, int *, int *, int *); -int BLASFUNC(qgetrf)(int *, int *, double *, int *, int *, int *); -int BLASFUNC(cgetrf)(int *, int *, float *, int *, int *, int *); -int BLASFUNC(zgetrf)(int *, int *, double *, int *, int *, int *); -int BLASFUNC(xgetrf)(int *, int *, double *, int *, int *, int *); +void BLASFUNC(sgetrf)(int *, int *, float *, int *, int *, int *); +void BLASFUNC(dgetrf)(int *, int *, double *, int *, int *, int *); +void BLASFUNC(qgetrf)(int *, int *, double *, int *, int *, int *); +void BLASFUNC(cgetrf)(int *, int *, float *, int *, int *, int *); +void BLASFUNC(zgetrf)(int *, int *, double *, int *, int *, int *); +void BLASFUNC(xgetrf)(int *, int *, double *, int *, int *, int *); -int BLASFUNC(slaswp)(int *, float *, int *, int *, int *, int *, int *); -int BLASFUNC(dlaswp)(int *, double *, int *, int *, int *, int *, int *); -int BLASFUNC(qlaswp)(int *, double *, int *, int *, int *, int *, int *); -int BLASFUNC(claswp)(int *, float *, int *, int *, int *, int *, int *); -int BLASFUNC(zlaswp)(int *, double *, int *, int *, int *, int *, int *); -int BLASFUNC(xlaswp)(int *, double *, int *, int *, int *, int *, int *); +void BLASFUNC(slaswp)(int *, float *, int *, int *, int *, int *, int *); +void BLASFUNC(dlaswp)(int *, double *, int *, int *, int *, int *, int *); +void BLASFUNC(qlaswp)(int *, double *, int *, int *, int *, int *, int *); +void BLASFUNC(claswp)(int *, float *, int *, int *, int *, int *, int *); +void BLASFUNC(zlaswp)(int *, double *, int *, int *, int *, int *, int *); +void BLASFUNC(xlaswp)(int *, double *, int *, int *, int *, int *, int *); -int BLASFUNC(sgetrs)(char *, int *, int *, float *, int *, int *, float *, int *, int *); -int BLASFUNC(dgetrs)(char *, int *, int *, double *, int *, int *, double *, int *, int *); -int BLASFUNC(qgetrs)(char *, int *, int *, double *, int *, int *, double *, int *, int *); -int BLASFUNC(cgetrs)(char *, int *, int *, float *, int *, int *, float *, int *, int *); -int BLASFUNC(zgetrs)(char *, int *, int *, double *, int *, int *, double *, int *, int *); -int BLASFUNC(xgetrs)(char *, int *, int *, double *, int *, int *, double *, int *, int *); +void BLASFUNC(sgetrs)(char *, int *, int *, float *, int *, int *, float *, int *, int *); +void BLASFUNC(dgetrs)(char *, int *, int *, double *, int *, int *, double *, int *, int *); +void BLASFUNC(qgetrs)(char *, int *, int *, double *, int *, int *, double *, int *, int *); +void BLASFUNC(cgetrs)(char *, int *, int *, float *, int *, int *, float *, int *, int *); +void BLASFUNC(zgetrs)(char *, int *, int *, double *, int *, int *, double *, int *, int *); +void BLASFUNC(xgetrs)(char *, int *, int *, double *, int *, int *, double *, int *, int *); -int BLASFUNC(sgesv)(int *, int *, float *, int *, int *, float *, int *, int *); -int BLASFUNC(dgesv)(int *, int *, double *, int *, int *, double *, int *, int *); -int BLASFUNC(qgesv)(int *, int *, double *, int *, int *, double *, int *, int *); -int BLASFUNC(cgesv)(int *, int *, float *, int *, int *, float *, int *, int *); -int BLASFUNC(zgesv)(int *, int *, double *, int *, int *, double *, int *, int *); -int BLASFUNC(xgesv)(int *, int *, double *, int *, int *, double *, int *, int *); +void BLASFUNC(sgesv)(int *, int *, float *, int *, int *, float *, int *, int *); +void BLASFUNC(dgesv)(int *, int *, double *, int *, int *, double *, int *, int *); +void BLASFUNC(qgesv)(int *, int *, double *, int *, int *, double *, int *, int *); +void BLASFUNC(cgesv)(int *, int *, float *, int *, int *, float *, int *, int *); +void BLASFUNC(zgesv)(int *, int *, double *, int *, int *, double *, int *, int *); +void BLASFUNC(xgesv)(int *, int *, double *, int *, int *, double *, int *, int *); -int BLASFUNC(spotf2)(char *, int *, float *, int *, int *); -int BLASFUNC(dpotf2)(char *, int *, double *, int *, int *); -int BLASFUNC(qpotf2)(char *, int *, double *, int *, int *); -int BLASFUNC(cpotf2)(char *, int *, float *, int *, int *); -int BLASFUNC(zpotf2)(char *, int *, double *, int *, int *); -int BLASFUNC(xpotf2)(char *, int *, double *, int *, int *); +void BLASFUNC(spotf2)(char *, int *, float *, int *, int *); +void BLASFUNC(dpotf2)(char *, int *, double *, int *, int *); +void BLASFUNC(qpotf2)(char *, int *, double *, int *, int *); +void BLASFUNC(cpotf2)(char *, int *, float *, int *, int *); +void BLASFUNC(zpotf2)(char *, int *, double *, int *, int *); +void BLASFUNC(xpotf2)(char *, int *, double *, int *, int *); -int BLASFUNC(spotrf)(char *, int *, float *, int *, int *); -int BLASFUNC(dpotrf)(char *, int *, double *, int *, int *); -int BLASFUNC(qpotrf)(char *, int *, double *, int *, int *); -int BLASFUNC(cpotrf)(char *, int *, float *, int *, int *); -int BLASFUNC(zpotrf)(char *, int *, double *, int *, int *); -int BLASFUNC(xpotrf)(char *, int *, double *, int *, int *); +void BLASFUNC(spotrf)(char *, int *, float *, int *, int *); +void BLASFUNC(dpotrf)(char *, int *, double *, int *, int *); +void BLASFUNC(qpotrf)(char *, int *, double *, int *, int *); +void BLASFUNC(cpotrf)(char *, int *, float *, int *, int *); +void BLASFUNC(zpotrf)(char *, int *, double *, int *, int *); +void BLASFUNC(xpotrf)(char *, int *, double *, int *, int *); -int BLASFUNC(slauu2)(char *, int *, float *, int *, int *); -int BLASFUNC(dlauu2)(char *, int *, double *, int *, int *); -int BLASFUNC(qlauu2)(char *, int *, double *, int *, int *); -int BLASFUNC(clauu2)(char *, int *, float *, int *, int *); -int BLASFUNC(zlauu2)(char *, int *, double *, int *, int *); -int BLASFUNC(xlauu2)(char *, int *, double *, int *, int *); +void BLASFUNC(slauu2)(char *, int *, float *, int *, int *); +void BLASFUNC(dlauu2)(char *, int *, double *, int *, int *); +void BLASFUNC(qlauu2)(char *, int *, double *, int *, int *); +void BLASFUNC(clauu2)(char *, int *, float *, int *, int *); +void BLASFUNC(zlauu2)(char *, int *, double *, int *, int *); +void BLASFUNC(xlauu2)(char *, int *, double *, int *, int *); -int BLASFUNC(slauum)(char *, int *, float *, int *, int *); -int BLASFUNC(dlauum)(char *, int *, double *, int *, int *); -int BLASFUNC(qlauum)(char *, int *, double *, int *, int *); -int BLASFUNC(clauum)(char *, int *, float *, int *, int *); -int BLASFUNC(zlauum)(char *, int *, double *, int *, int *); -int BLASFUNC(xlauum)(char *, int *, double *, int *, int *); +void BLASFUNC(slauum)(char *, int *, float *, int *, int *); +void BLASFUNC(dlauum)(char *, int *, double *, int *, int *); +void BLASFUNC(qlauum)(char *, int *, double *, int *, int *); +void BLASFUNC(clauum)(char *, int *, float *, int *, int *); +void BLASFUNC(zlauum)(char *, int *, double *, int *, int *); +void BLASFUNC(xlauum)(char *, int *, double *, int *, int *); -int BLASFUNC(strti2)(char *, char *, int *, float *, int *, int *); -int BLASFUNC(dtrti2)(char *, char *, int *, double *, int *, int *); -int BLASFUNC(qtrti2)(char *, char *, int *, double *, int *, int *); -int BLASFUNC(ctrti2)(char *, char *, int *, float *, int *, int *); -int BLASFUNC(ztrti2)(char *, char *, int *, double *, int *, int *); -int BLASFUNC(xtrti2)(char *, char *, int *, double *, int *, int *); +void BLASFUNC(strti2)(char *, char *, int *, float *, int *, int *); +void BLASFUNC(dtrti2)(char *, char *, int *, double *, int *, int *); +void BLASFUNC(qtrti2)(char *, char *, int *, double *, int *, int *); +void BLASFUNC(ctrti2)(char *, char *, int *, float *, int *, int *); +void BLASFUNC(ztrti2)(char *, char *, int *, double *, int *, int *); +void BLASFUNC(xtrti2)(char *, char *, int *, double *, int *, int *); -int BLASFUNC(strtri)(char *, char *, int *, float *, int *, int *); -int BLASFUNC(dtrtri)(char *, char *, int *, double *, int *, int *); -int BLASFUNC(qtrtri)(char *, char *, int *, double *, int *, int *); -int BLASFUNC(ctrtri)(char *, char *, int *, float *, int *, int *); -int BLASFUNC(ztrtri)(char *, char *, int *, double *, int *, int *); -int BLASFUNC(xtrtri)(char *, char *, int *, double *, int *, int *); +void BLASFUNC(strtri)(char *, char *, int *, float *, int *, int *); +void BLASFUNC(dtrtri)(char *, char *, int *, double *, int *, int *); +void BLASFUNC(qtrtri)(char *, char *, int *, double *, int *, int *); +void BLASFUNC(ctrtri)(char *, char *, int *, float *, int *, int *); +void BLASFUNC(ztrtri)(char *, char *, int *, double *, int *, int *); +void BLASFUNC(xtrtri)(char *, char *, int *, double *, int *, int *); -int BLASFUNC(spotri)(char *, int *, float *, int *, int *); -int BLASFUNC(dpotri)(char *, int *, double *, int *, int *); -int BLASFUNC(qpotri)(char *, int *, double *, int *, int *); -int BLASFUNC(cpotri)(char *, int *, float *, int *, int *); -int BLASFUNC(zpotri)(char *, int *, double *, int *, int *); -int BLASFUNC(xpotri)(char *, int *, double *, int *, int *); +void BLASFUNC(spotri)(char *, int *, float *, int *, int *); +void BLASFUNC(dpotri)(char *, int *, double *, int *, int *); +void BLASFUNC(qpotri)(char *, int *, double *, int *, int *); +void BLASFUNC(cpotri)(char *, int *, float *, int *, int *); +void BLASFUNC(zpotri)(char *, int *, double *, int *, int *); +void BLASFUNC(xpotri)(char *, int *, double *, int *, int *); #ifdef __cplusplus } diff --git a/lapack/lapack_common.h b/lapack/lapack_common.h index 37d1f1435..726fabf55 100644 --- a/lapack/lapack_common.h +++ b/lapack/lapack_common.h @@ -13,19 +13,8 @@ #include "../blas/common.h" #include "lapack.h" -#define EIGEN_LAPACK_FUNC(FUNC, ARGLIST) \ - extern "C" { \ - int EIGEN_BLAS_FUNC(FUNC) ARGLIST; \ - } \ - int EIGEN_BLAS_FUNC(FUNC) \ - ARGLIST +#define EIGEN_LAPACK_FUNC(FUNC) EIGEN_BLAS_FUNC(FUNC) typedef Eigen::Map > PivotsType; -#if ISCOMPLEX -#define EIGEN_LAPACK_ARG_IF_COMPLEX(X) X, -#else -#define EIGEN_LAPACK_ARG_IF_COMPLEX(X) -#endif - #endif // EIGEN_LAPACK_COMMON_H diff --git a/lapack/lu.inc b/lapack/lu.inc index ca64d9096..d30c8cec6 100644 --- a/lapack/lu.inc +++ b/lapack/lu.inc @@ -11,7 +11,7 @@ #include // computes an LU factorization of a general M-by-N matrix A using partial pivoting with row interchanges -EIGEN_LAPACK_FUNC(getrf, (int *m, int *n, RealScalar *pa, int *lda, int *ipiv, int *info)) { +EIGEN_LAPACK_FUNC(getrf)(int *m, int *n, RealScalar *pa, int *lda, int *ipiv, int *info) { *info = 0; if (*m < 0) *info = -1; @@ -21,28 +21,26 @@ EIGEN_LAPACK_FUNC(getrf, (int *m, int *n, RealScalar *pa, int *lda, int *ipiv, i *info = -4; if (*info != 0) { int e = -*info; - return xerbla_(SCALAR_SUFFIX_UP "GETRF", &e, 6); + return xerbla_(SCALAR_SUFFIX_UP "GETRF", &e); } - if (*m == 0 || *n == 0) return 0; + if (*m == 0 || *n == 0) return; Scalar *a = reinterpret_cast(pa); int nb_transpositions; - int ret = int( - Eigen::internal::partial_lu_impl::blocked_lu(*m, *n, a, *lda, ipiv, nb_transpositions)); + int ret = int(Eigen::internal::partial_lu_impl::blocked_lu(*m, *n, a, *lda, ipiv, + nb_transpositions)); for (int i = 0; i < std::min(*m, *n); ++i) ipiv[i]++; if (ret >= 0) *info = ret + 1; - - return 0; } // GETRS solves a system of linear equations // A * X = B or A' * X = B // with a general N-by-N matrix A using the LU factorization computed by GETRF -EIGEN_LAPACK_FUNC(getrs, (char *trans, int *n, int *nrhs, RealScalar *pa, int *lda, int *ipiv, RealScalar *pb, int *ldb, - int *info)) { +EIGEN_LAPACK_FUNC(getrs) +(char *trans, int *n, int *nrhs, RealScalar *pa, int *lda, int *ipiv, RealScalar *pb, int *ldb, int *info) { *info = 0; if (OP(*trans) == INVALID) *info = -1; @@ -56,7 +54,7 @@ EIGEN_LAPACK_FUNC(getrs, (char *trans, int *n, int *nrhs, RealScalar *pa, int *l *info = -8; if (*info != 0) { int e = -*info; - return xerbla_(SCALAR_SUFFIX_UP "GETRS", &e, 6); + return xerbla_(SCALAR_SUFFIX_UP "GETRS", &e); } Scalar *a = reinterpret_cast(pa); @@ -79,6 +77,4 @@ EIGEN_LAPACK_FUNC(getrs, (char *trans, int *n, int *nrhs, RealScalar *pa, int *l B = PivotsType(ipiv, *n).transpose() * B; } for (int i = 0; i < *n; ++i) ipiv[i]++; - - return 0; } diff --git a/lapack/svd.inc b/lapack/svd.inc index a278cf0c6..8e453109f 100644 --- a/lapack/svd.inc +++ b/lapack/svd.inc @@ -10,10 +10,16 @@ #include "lapack_common.h" #include +#if ISCOMPLEX +#define EIGEN_LAPACK_ARG_IF_COMPLEX(X) X, +#else +#define EIGEN_LAPACK_ARG_IF_COMPLEX(X) +#endif + // computes the singular values/vectors a general M-by-N matrix A using divide-and-conquer -EIGEN_LAPACK_FUNC(gesdd, (char *jobz, int *m, int *n, Scalar *a, int *lda, RealScalar *s, Scalar *u, int *ldu, - Scalar *vt, int *ldvt, Scalar * /*work*/, int *lwork, - EIGEN_LAPACK_ARG_IF_COMPLEX(RealScalar * /*rwork*/) int * /*iwork*/, int *info)) { +EIGEN_LAPACK_FUNC(gesdd) +(char *jobz, int *m, int *n, Scalar *a, int *lda, RealScalar *s, Scalar *u, int *ldu, Scalar *vt, int *ldvt, + Scalar * /*work*/, int *lwork, EIGEN_LAPACK_ARG_IF_COMPLEX(RealScalar * /*rwork*/) int * /*iwork*/, int *info) { // TODO exploit the work buffer bool query_size = *lwork == -1; int diag_size = (std::min)(*m, *n); @@ -37,15 +43,15 @@ EIGEN_LAPACK_FUNC(gesdd, (char *jobz, int *m, int *n, Scalar *a, int *lda, RealS if (*info != 0) { int e = -*info; - return xerbla_(SCALAR_SUFFIX_UP "GESDD ", &e, 6); + return xerbla_(SCALAR_SUFFIX_UP "GESDD ", &e); } if (query_size) { *lwork = 0; - return 0; + return; } - if (*n == 0 || *m == 0) return 0; + if (*n == 0 || *m == 0) return; PlainMatrixType mat(*m, *n); mat = matrix(a, *m, *n, *lda); @@ -72,14 +78,12 @@ EIGEN_LAPACK_FUNC(gesdd, (char *jobz, int *m, int *n, Scalar *a, int *lda, RealS matrix(u, *m, *m, *ldu) = svd.matrixU(); matrix(a, diag_size, *n, *lda) = svd.matrixV().adjoint(); } - - return 0; } // computes the singular values/vectors a general M-by-N matrix A using two sided jacobi algorithm -EIGEN_LAPACK_FUNC(gesvd, (char *jobu, char *jobv, int *m, int *n, Scalar *a, int *lda, RealScalar *s, Scalar *u, - int *ldu, Scalar *vt, int *ldvt, Scalar * /*work*/, int *lwork, - EIGEN_LAPACK_ARG_IF_COMPLEX(RealScalar * /*rwork*/) int *info)) { +EIGEN_LAPACK_FUNC(gesvd) +(char *jobu, char *jobv, int *m, int *n, Scalar *a, int *lda, RealScalar *s, Scalar *u, int *ldu, Scalar *vt, int *ldvt, + Scalar * /*work*/, int *lwork, EIGEN_LAPACK_ARG_IF_COMPLEX(RealScalar * /*rwork*/) int *info) { // TODO exploit the work buffer bool query_size = *lwork == -1; int diag_size = (std::min)(*m, *n); @@ -102,15 +106,15 @@ EIGEN_LAPACK_FUNC(gesvd, (char *jobu, char *jobv, int *m, int *n, Scalar *a, int if (*info != 0) { int e = -*info; - return xerbla_(SCALAR_SUFFIX_UP "GESVD ", &e, 6); + return xerbla_(SCALAR_SUFFIX_UP "GESVD ", &e); } if (query_size) { *lwork = 0; - return 0; + return; } - if (*n == 0 || *m == 0) return 0; + if (*n == 0 || *m == 0) return; PlainMatrixType mat(*m, *n); mat = matrix(a, *m, *n, *lda); @@ -141,5 +145,6 @@ EIGEN_LAPACK_FUNC(gesvd, (char *jobu, char *jobv, int *m, int *n, Scalar *a, int else if (*jobv == 'O') matrix(a, diag_size, *n, *lda) = svd.matrixV().adjoint(); } - return 0; -} \ No newline at end of file +} + +#undef EIGEN_LAPACK_ARG_IF_COMPLEX \ No newline at end of file