zaxpy(3f) - [BLAS:COMPLEX16_BLAS_LEVEL1] ZY := ZY+ZA*ZX
complex constant times a complex vector plus a complex vector.
subroutine zaxpy(n,za,zx,incx,zy,incy)
! .. Scalar Arguments ..
complex(kind=real64),intent(in) :: za
integer,intent(in) :: incx,incy,n
! ..
! .. Array Arguments ..
complex(kind=real64),intent(in) :: zx(*)
complex(kind=real64),intent(inout) :: zy(*)
! ..
ZAXPY constant times a vector plus a vector.
ZY := ZY+ZA*ZX
N number of elements in input vector(s) ZA On entry, ZA specifies the scalar alpha. ZX ZX is complex(kind=real64) array, dimension ( 1 + ( N - 1 )abs( INCX ) ) INCX storage spacing between elements of ZX ZY ZY is complex(kind=real64) array, dimension ( 1 + ( N - 1 )abs( INCY ) ) INCY storage spacing between elements of ZY
date:November 2017
FURTHER DETAILS
jack dongarra, 3/11/78.
modified 12/3/93, array(1) declarations changed to array(*)
Online html documentation available at
http://www.netlib.org/lapack/explore-html/
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | n | |||
complex(kind=real64), | intent(in) | :: | za | |||
complex(kind=real64), | intent(in) | :: | zx(*) | |||
integer, | intent(in) | :: | incx | |||
complex(kind=real64), | intent(inout) | :: | zy(*) | |||
integer, | intent(in) | :: | incy |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | i | ||||
integer, | public | :: | ix | ||||
integer, | public | :: | iy |
subroutine zaxpy(n,za,zx,incx,zy,incy)
implicit none
!
! -- Reference BLAS level1 routine (version 3.8.0) --
! -- Reference BLAS is a software package provided by Univ. of Tennessee, --
! -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
! November 2017
!
! .. Scalar Arguments ..
complex(kind=real64),intent(in) :: za
integer,intent(in) :: incx,incy,n
! ..
! .. Array Arguments ..
complex(kind=real64),intent(in) :: zx(*)
complex(kind=real64),intent(inout) :: zy(*)
! ..
!
! =====================================================================
!
! .. Local Scalars ..
integer i,ix,iy
! ..
! .. External Functions ..
! double precision dcabs1
! external dcabs1
! ..
if (n.le.0) return
if (dcabs1(za).eq.0.0d0) return
if (incx.eq.1 .and. incy.eq.1) then
!
! code for both increments equal to 1
!
do i = 1,n
zy(i) = zy(i) + za*zx(i)
enddo
else
!
! code for unequal increments or equal increments
! not equal to 1
!
ix = 1
iy = 1
if (incx.lt.0) ix = (-n+1)*incx + 1
if (incy.lt.0) iy = (-n+1)*incy + 1
do i = 1,n
zy(iy) = zy(iy) + za*zx(ix)
ix = ix + incx
iy = iy + incy
enddo
endif
!
end subroutine zaxpy