Re: [eigen] eigen blas/lapack + suitesparse

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


On Fri, Jun 17, 2011 at 12:52 PM, Gael Guennebaud
<gael.guennebaud@xxxxxxxxx> wrote:
> yes, it is complete enough for all direct solver libraries that I've
> tried.

Was the Eigen BLAS intended to handle negative strides?  I've noticed
code like the following where incx < 0 looks like it behaves
incorrectly:

int EIGEN_BLAS_FUNC(scal)(int *n, RealScalar *palpha, RealScalar *px, int *incx)
{
  if(*n<=0) return 0;

  Scalar* x = reinterpret_cast<Scalar*>(px);
  Scalar alpha = *reinterpret_cast<Scalar*>(palpha);

  if(*incx==1)  vector(x,*n) *= alpha;
  else          vector(x,*n,std::abs(*incx)) *= alpha;

  return 0;
}

Has anyone run into such a problem in practice?

- Rhys



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/