From: Bureau Jerome
Date: Sun, 18 Mar 2007 19:32:12 +0100 (CET)
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
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
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 !
P.S. I apologize if this question has already been answered somewhere else, I
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
<Prev in Thread]
[Next in Thread>
[Lapack] extra multiplications in daxpy,