LAPACK Archives

### [Lapack] extra multiplications in daxpy

 ```Hello, I have a problem with subroutine daxpy. I would like to add simply two vectors x and y, without multiplying x or y by a constant coefficient da. If I use daxpy, I have to set da = 1.d0 The problem is that, even if da is equal to one, da is used to multiply the coefficient of the x vector: ... do 10 i = 1,n dy(iy) = dy(iy) + da*dx(ix) ... So, instead of n additions, the subroutine does n additions AND n multiplications. I would like to know the reason for these extra n multiplications.Why not a test comparing alpha to 1.d0 ? Is there another routine in BLAS to avoid these extra n multiplications ? The same problems arises when I need to compute the product of a matrix and a vector (dgemv) and the product of two matrix. (dgemm). Thank you very much for your answer to this question ! Yours faithfully, Jerome Bureau P.S. I apologize if this question has already been answered somewhere else, I wasn't able to find the answer. ___________________________________________________________________________ D??couvrez une nouvelle fa??on d'obtenir des r??ponses ?? toutes vos questions ! Profitez des connaissances, des opinions et des exp??riences des internautes sur Yahoo! Questions/R??ponses http://fr.answers.yahoo.com ```
 Current Thread [Lapack] extra multiplications in daxpy, Bureau Jerome <=

For additional information you may use the LAPACK/ScaLAPACK Forum.
Or one of the mailing lists, or