Annotation of rpl/lapack/blas/zdotc.f, revision 1.16
1.8 bertrand 1: *> \brief \b ZDOTC
2: *
3: * =========== DOCUMENTATION ===========
4: *
1.14 bertrand 5: * Online html documentation available at
6: * http://www.netlib.org/lapack/explore-html/
1.8 bertrand 7: *
8: * Definition:
9: * ===========
10: *
11: * COMPLEX*16 FUNCTION ZDOTC(N,ZX,INCX,ZY,INCY)
1.14 bertrand 12: *
1.8 bertrand 13: * .. Scalar Arguments ..
14: * INTEGER INCX,INCY,N
15: * ..
16: * .. Array Arguments ..
17: * COMPLEX*16 ZX(*),ZY(*)
18: * ..
1.14 bertrand 19: *
1.8 bertrand 20: *
21: *> \par Purpose:
22: * =============
23: *>
24: *> \verbatim
25: *>
1.12 bertrand 26: *> ZDOTC forms the dot product of two complex vectors
27: *> ZDOTC = X^H * Y
28: *>
1.8 bertrand 29: *> \endverbatim
30: *
1.15 bertrand 31: * Arguments:
32: * ==========
33: *
34: *> \param[in] N
35: *> \verbatim
36: *> N is INTEGER
37: *> number of elements in input vector(s)
38: *> \endverbatim
39: *>
40: *> \param[in] ZX
41: *> \verbatim
42: *> ZX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
43: *> \endverbatim
44: *>
45: *> \param[in] INCX
46: *> \verbatim
47: *> INCX is INTEGER
48: *> storage spacing between elements of ZX
49: *> \endverbatim
50: *>
51: *> \param[in] ZY
52: *> \verbatim
53: *> ZY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
54: *> \endverbatim
55: *>
56: *> \param[in] INCY
57: *> \verbatim
58: *> INCY is INTEGER
59: *> storage spacing between elements of ZY
60: *> \endverbatim
61: *
1.8 bertrand 62: * Authors:
63: * ========
64: *
1.14 bertrand 65: *> \author Univ. of Tennessee
66: *> \author Univ. of California Berkeley
67: *> \author Univ. of Colorado Denver
68: *> \author NAG Ltd.
1.8 bertrand 69: *
1.15 bertrand 70: *> \date November 2017
1.8 bertrand 71: *
72: *> \ingroup complex16_blas_level1
73: *
74: *> \par Further Details:
75: * =====================
76: *>
77: *> \verbatim
78: *>
79: *> jack dongarra, 3/11/78.
80: *> modified 12/3/93, array(1) declarations changed to array(*)
81: *> \endverbatim
82: *>
83: * =====================================================================
84: COMPLEX*16 FUNCTION ZDOTC(N,ZX,INCX,ZY,INCY)
85: *
1.15 bertrand 86: * -- Reference BLAS level1 routine (version 3.8.0) --
1.8 bertrand 87: * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
88: * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
1.15 bertrand 89: * November 2017
1.8 bertrand 90: *
1.1 bertrand 91: * .. Scalar Arguments ..
92: INTEGER INCX,INCY,N
93: * ..
94: * .. Array Arguments ..
1.8 bertrand 95: COMPLEX*16 ZX(*),ZY(*)
1.1 bertrand 96: * ..
97: *
98: * =====================================================================
99: *
100: * .. Local Scalars ..
1.8 bertrand 101: COMPLEX*16 ZTEMP
1.1 bertrand 102: INTEGER I,IX,IY
103: * ..
104: * .. Intrinsic Functions ..
105: INTRINSIC DCONJG
106: * ..
107: ZTEMP = (0.0d0,0.0d0)
108: ZDOTC = (0.0d0,0.0d0)
109: IF (N.LE.0) RETURN
1.7 bertrand 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: ZTEMP = ZTEMP + DCONJG(ZX(I))*ZY(I)
116: END DO
117: ELSE
1.1 bertrand 118: *
119: * code for unequal increments or equal increments
120: * not equal to 1
121: *
1.7 bertrand 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: ZTEMP = ZTEMP + DCONJG(ZX(IX))*ZY(IY)
128: IX = IX + INCX
129: IY = IY + INCY
130: END DO
131: END IF
1.1 bertrand 132: ZDOTC = ZTEMP
133: RETURN
134: END
CVSweb interface <joel.bertrand@systella.fr>