cdotu(3f) - [BLAS:COMPLEX_BLAS_LEVEL1] CDOTU := SUM CX * CY (unconjugated vector dot product)
complex function cdotu(n,cx,incx,cy,incy)
.. Scalar Arguments ..
integer,intent(in) :: incx,incy,n
..
.. Array Arguments ..
complex,intent(in) :: cx(*),cy(*)
..
CDOTU forms the dot product of two complex vectors
CDOTU = X^T * Y
N number of elements in input vector(s) CX array, dimension ( 1 + ( N - 1 )abs( INCX ) ) INCX storage spacing between elements of CX CY array, dimension ( 1 + ( N - 1 )abs( INCY ) ) INCY storage spacing between elements of CY
date:November 2017
FURTHER DETAILS jack dongarra, linpack, 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, | intent(in) | :: | cx(*) | |||
integer, | intent(in) | :: | incx | |||
complex, | intent(in) | :: | cy(*) | |||
integer, | intent(in) | :: | incy |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
complex, | public | :: | ctemp | ||||
integer, | public | :: | i | ||||
integer, | public | :: | ix | ||||
integer, | public | :: | iy |
complex function cdotu(n,cx,incx,cy,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 ..
integer,intent(in) :: incx,incy,n
! ..
! .. Array Arguments ..
complex,intent(in) :: cx(*),cy(*)
! ..
!
! =====================================================================
!
! .. Local Scalars ..
complex ctemp
integer i,ix,iy
! ..
ctemp = (0.0,0.0)
cdotu = (0.0,0.0)
if (n.le.0) return
if (incx.eq.1 .and. incy.eq.1) then
!
! code for both increments equal to 1
!
do i = 1,n
ctemp = ctemp + cx(i)*cy(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
ctemp = ctemp + cx(ix)*cy(iy)
ix = ix + incx
iy = iy + incy
enddo
endif
cdotu = ctemp
end function cdotu