LAPACK  3.9.0
LAPACK: Linear Algebra PACKage

◆ 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 REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
[in]INCX
          INCX is INTEGER
         storage spacing between elements of CX
[in]CY
          CY is REAL 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.
Date
November 2017
Further Details:
     jack dongarra, linpack,  3/11/78.
     modified 12/3/93, array(1) declarations changed to array(*)

Definition at line 85 of file cdotc.f.

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