Improve constness of level2 blas API.

This commit is contained in:
Gael Guennebaud
2016-04-11 17:13:01 +02:00
parent 0483430283
commit 91bf925fc1
6 changed files with 50 additions and 46 deletions

View File

@@ -9,11 +9,11 @@
#include "common.h"
int EIGEN_BLAS_FUNC(axpy)(int *n, RealScalar *palpha, RealScalar *px, int *incx, RealScalar *py, int *incy)
int EIGEN_BLAS_FUNC(axpy)(const int *n, const RealScalar *palpha, const RealScalar *px, const int *incx, RealScalar *py, const int *incy)
{
Scalar* x = reinterpret_cast<Scalar*>(px);
const Scalar* x = reinterpret_cast<const Scalar*>(px);
Scalar* y = reinterpret_cast<Scalar*>(py);
Scalar alpha = *reinterpret_cast<Scalar*>(palpha);
Scalar alpha = *reinterpret_cast<const Scalar*>(palpha);
if(*n<=0) return 0;