LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ cdotc()

complex function cdotc ( integer  n,
complex, dimension(*)  cx,
integer  incx,
complex, dimension(*)  cy,
integer  incy 
)

CDOTC

Purpose:
 CDOTC forms the dot product of two complex vectors
      CDOTC = X^H * 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 cdotc.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* .. Intrinsic Functions ..
102 INTRINSIC conjg
103* ..
104 ctemp = (0.0,0.0)
105 cdotc = (0.0,0.0)
106 IF (n.LE.0) RETURN
107 IF (incx.EQ.1 .AND. incy.EQ.1) THEN
108*
109* code for both increments equal to 1
110*
111 DO i = 1,n
112 ctemp = ctemp + conjg(cx(i))*cy(i)
113 END DO
114 ELSE
115*
116* code for unequal increments or equal increments
117* not equal to 1
118*
119 ix = 1
120 iy = 1
121 IF (incx.LT.0) ix = (-n+1)*incx + 1
122 IF (incy.LT.0) iy = (-n+1)*incy + 1
123 DO i = 1,n
124 ctemp = ctemp + conjg(cx(ix))*cy(iy)
125 ix = ix + incx
126 iy = iy + incy
127 END DO
128 END IF
129 cdotc = ctemp
130 RETURN
131*
132* End of CDOTC
133*
complex function cdotc(n, cx, incx, cy, incy)
CDOTC
Definition cdotc.f:83
Here is the call graph for this function:
Here is the caller graph for this function: