[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] Why is Negative Stride in GSL not allowed?
From: |
Michael Lehn |
Subject: |
Re: [Help-gsl] Why is Negative Stride in GSL not allowed? |
Date: |
Mon, 19 Nov 2012 12:01:01 +0100 |
Am 19.11.2012 um 11:52 schrieb Stephan Petzchen:
> But there is no such code in ATLAS. I did look up
> It is not only taking the absolut value of incX also the reference starting
> point should be the end of the vector.
>
>
> In all there testcases they set the incX value to absolute (i.e. Mabs( INCX
> )), which simply follow the rule in one of your former messages: *(X +
> abs(incX)*i) which is not considering the BLAS standard with starting point
> at the end of the vector: X(1 + (n-i) * abs(INCX)).
>
> So, my opinion now is: they do not comply with the BLAS standard document for
> negative stride.
>
> I hope you or someone other can show me that I am wrong. PLEASE... ;-)
>
I just downloaded ATLAS 3.10. Have a look into
ATLAS/interfaces/blas/C/src/cblas_daxpy.c. There
you find
//---- SNIP
---------------------------------------------------------------------
void cblas_daxpy(const int N, const double alpha, const double *X,
const int incX, double *Y, const int incY)
{
if (N > 0)
{
if (incX < 0)
{
if (incY < 0) ATL_daxpy(N, alpha, X, -incX, Y, -incY);
else ATL_daxpy(N, alpha, X+(1-N)*incX, incX, Y, incY);
}
else if (incY < 0) ATL_daxpy(N, alpha, X+(N-1)*incX, -incX, Y, -incY);
else ATL_daxpy(N, alpha, X, incX, Y, incY);
}
}
//---- SNAP
---------------------------------------------------------------------
Cheers,
Michael
- [Help-gsl] Why is Negative Stride in GSL not allowed?, Stephan Petzchen, 2012/11/19
- Message not available
- Re: [Help-gsl] Why is Negative Stride in GSL not allowed?, Michael Lehn, 2012/11/19
- Re: [Help-gsl] Why is Negative Stride in GSL not allowed?, Stephan Petzchen, 2012/11/19
- Re: [Help-gsl] Why is Negative Stride in GSL not allowed?, Michael Lehn, 2012/11/19
- Re: [Help-gsl] Why is Negative Stride in GSL not allowed?, Stephan Petzchen, 2012/11/19
- Re: [Help-gsl] Why is Negative Stride in GSL not allowed?,
Michael Lehn <=
- Re: [Help-gsl] Why is Negative Stride in GSL not allowed?, Stephan Petzchen, 2012/11/19
- Re: [Help-gsl] Why is Negative Stride in GSL not allowed?, Michael Lehn, 2012/11/19
- Re: [Help-gsl] Why is Negative Stride in GSL not allowed?, Michael Lehn, 2012/11/19