From 5214466b7a38ec7684ea685d5d9c56ae2cae678e Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 8 Jul 2014 19:01:49 +0200 Subject: [PATCH] Fix implicit long to int conversions in blas interface --- blas/level1_impl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blas/level1_impl.h b/blas/level1_impl.h index 98e4c0963..e623bd178 100644 --- a/blas/level1_impl.h +++ b/blas/level1_impl.h @@ -59,7 +59,7 @@ int EIGEN_CAT(EIGEN_CAT(i,SCALAR_SUFFIX),amax_)(int *n, RealScalar *px, int *inc DenseIndex ret; if(*incx==1) make_vector(x,*n).cwiseAbs().maxCoeff(&ret); else make_vector(x,*n,std::abs(*incx)).cwiseAbs().maxCoeff(&ret); - return ret+1; + return int(ret)+1; } int EIGEN_CAT(EIGEN_CAT(i,SCALAR_SUFFIX),amin_)(int *n, RealScalar *px, int *incx) @@ -70,7 +70,7 @@ int EIGEN_CAT(EIGEN_CAT(i,SCALAR_SUFFIX),amin_)(int *n, RealScalar *px, int *inc DenseIndex ret; if(*incx==1) make_vector(x,*n).cwiseAbs().minCoeff(&ret); else make_vector(x,*n,std::abs(*incx)).cwiseAbs().minCoeff(&ret); - return ret+1; + return int(ret)+1; } int EIGEN_BLAS_FUNC(rotg)(RealScalar *pa, RealScalar *pb, RealScalar *pc, RealScalar *ps)