LAPACK  3.10.0
LAPACK: Linear Algebra PACKage

◆ cdotu()

complex function cdotu ( integer  N,
complex, dimension(*)  CX,
integer  INCX,
complex, dimension(*)  CY,
integer  INCY 
)

CDOTU

Purpose:
 CDOTU forms the dot product of two complex vectors
      CDOTU = X^T * Y
Parameters
[in]N
          N is INTEGER
         number of elements in input vector(s)
[in]CX
          CX is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
[in]INCX
          INCX is INTEGER
         storage spacing between elements of CX
[in]CY
          CY is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
[in]INCY
          INCY is INTEGER
         storage spacing between elements of CY
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Further Details:
     jack dongarra, linpack, 3/11/78.
     modified 12/3/93, array(1) declarations changed to array(*)

Definition at line 82 of file cdotu.f.

83 *
84 * -- Reference BLAS level1 routine --
85 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
86 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
87 *
88 * .. Scalar Arguments ..
89  INTEGER INCX,INCY,N
90 * ..
91 * .. Array Arguments ..
92  COMPLEX CX(*),CY(*)
93 * ..
94 *
95 * =====================================================================
96 *
97 * .. Local Scalars ..
98  COMPLEX CTEMP
99  INTEGER I,IX,IY
100 * ..
101  ctemp = (0.0,0.0)
102  cdotu = (0.0,0.0)
103  IF (n.LE.0) RETURN
104  IF (incx.EQ.1 .AND. incy.EQ.1) THEN
105 *
106 * code for both increments equal to 1
107 *
108  DO i = 1,n
109  ctemp = ctemp + cx(i)*cy(i)
110  END DO
111  ELSE
112 *
113 * code for unequal increments or equal increments
114 * not equal to 1
115 *
116  ix = 1
117  iy = 1
118  IF (incx.LT.0) ix = (-n+1)*incx + 1
119  IF (incy.LT.0) iy = (-n+1)*incy + 1
120  DO i = 1,n
121  ctemp = ctemp + cx(ix)*cy(iy)
122  ix = ix + incx
123  iy = iy + incy
124  END DO
125  END IF
126  cdotu = ctemp
127  RETURN
128 *
129 * End of CDOTU
130 *
complex function cdotu(N, CX, INCX, CY, INCY)
CDOTU
Definition: cdotu.f:83
Here is the caller graph for this function: