Radu Stoenescu
Radu Stoenescu

Reputation: 3205

incx in BLAS routines

There are certain BLAS routines that take as parameter the increment of a vector X, namely incX. I can't find what the increment is and how it affects the result of the computation.

Can anyone provide some example or any other kind of info ?

Update:

I've found here the best info: Intel HPC mkl manual

Upvotes: 6

Views: 2668

Answers (1)

Michael M.
Michael M.

Reputation: 2584

This is quite simple actually.

Let take the example of axpy(n,a,*x,incx,*y,incy) which compute : y = ax + y

If, for example, you need to compute :

y[0] = ax[0] + y[0]; y[1] = ax[2] + y[1]; y[2] = ax[4] + y[2]

Then your call is : axpy(3,a,x,2,y,1)

But usually, for basic operations, you just have to specify incx = incy = 1

Upvotes: 12

Related Questions