You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

zaxpycf.f 910 B

123456789101112131415161718192021222324252627282930313233343536
  1. subroutine zaxpycf(n,za,zx,incx,zy,incy)
  2. c
  3. c constant times a vector plus a vector.
  4. c jack dongarra, 3/11/78.
  5. c modified 12/3/93, array(1) declarations changed to array(*)
  6. c
  7. double complex zx(*),zy(*),za
  8. integer i,incx,incy,ix,iy,n
  9. double precision dcabs1
  10. INTRINSIC dconjg
  11. if(n.le.0)return
  12. if (dcabs1(za) .eq. 0.0d0) return
  13. if (incx.eq.1.and.incy.eq.1)go to 20
  14. c
  15. c code for unequal increments or equal increments
  16. c not equal to 1
  17. c
  18. ix = 1
  19. iy = 1
  20. if(incx.lt.0)ix = (-n+1)*incx + 1
  21. if(incy.lt.0)iy = (-n+1)*incy + 1
  22. do 10 i = 1,n
  23. zy(iy) = zy(iy) + za*dconjg(zx(ix))
  24. ix = ix + incx
  25. iy = iy + incy
  26. 10 continue
  27. return
  28. c
  29. c code for both increments equal to 1
  30. c
  31. 20 do 30 i = 1,n
  32. zy(i) = zy(i) + za*dconjg(zx(i))
  33. 30 continue
  34. return
  35. end