LAPACK  3.8.0 LAPACK: Linear Algebra PACKage
zdotc.f
Go to the documentation of this file.
1 *> \brief \b ZDOTC
2 *
3 * =========== DOCUMENTATION ===========
4 *
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
7 *
8 * Definition:
9 * ===========
10 *
11 * COMPLEX*16 FUNCTION ZDOTC(N,ZX,INCX,ZY,INCY)
12 *
13 * .. Scalar Arguments ..
14 * INTEGER INCX,INCY,N
15 * ..
16 * .. Array Arguments ..
17 * COMPLEX*16 ZX(*),ZY(*)
18 * ..
19 *
20 *
21 *> \par Purpose:
22 * =============
23 *>
24 *> \verbatim
25 *>
26 *> ZDOTC forms the dot product of two complex vectors
27 *> ZDOTC = X^H * Y
28 *>
29 *> \endverbatim
30 *
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 *
62 * Authors:
63 * ========
64 *
65 *> \author Univ. of Tennessee
66 *> \author Univ. of California Berkeley
67 *> \author Univ. of Colorado Denver
68 *> \author NAG Ltd.
69 *
70 *> \date November 2017
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 *
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*16 ZX(*),ZY(*)
96 * ..
97 *
98 * =====================================================================
99 *
100 * .. Local Scalars ..
101  COMPLEX*16 ZTEMP
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
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
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  ztemp = ztemp + dconjg(zx(ix))*zy(iy)
128  ix = ix + incx
129  iy = iy + incy
130  END DO
131  END IF
132  zdotc = ztemp
133  RETURN
134  END
complex *16 function zdotc(N, ZX, INCX, ZY, INCY)
ZDOTC
Definition: zdotc.f:85