1 subroutine daxpy
(n
,da
,dx
,incx
,dy
,incy
)
3 c constant times a vector plus a vector.
4 c uses unrolled loops for increments equal to one.
5 c jack dongarra, linpack, 3/11/78.
6 c modified 12/3/93, array(1) declarations changed to array(*)
8 double precision dx
(*),dy
(*),da
9 integer i
,incx
,incy
,ix
,iy
,m
,mp1
,n
12 if (da
.eq
. 0.0d0
) return
13 if(incx
.eq
.1.and
.incy
.eq
.1)go to 20
15 c code for unequal increments or equal increments
20 if(incx
.lt
.0)ix
= (-n
+1)*incx
+ 1
21 if(incy
.lt
.0)iy
= (-n
+1)*incy
+ 1
23 dy
(iy
) = dy
(iy
) + da*dx
(ix
)
29 c code for both increments equal to 1
35 if( m
.eq
. 0 ) go to 40
37 dy
(i
) = dy
(i
) + da*dx
(i
)
42 dy
(i
) = dy
(i
) + da*dx
(i
)
43 dy
(i
+ 1) = dy
(i
+ 1) + da*dx
(i
+ 1)
44 dy
(i
+ 2) = dy
(i
+ 2) + da*dx
(i
+ 2)
45 dy
(i
+ 3) = dy
(i
+ 3) + da*dx
(i
+ 3)