LAPACK  3.6.1
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 * Authors:
32 * ========
33 *
34 *> \author Univ. of Tennessee
35 *> \author Univ. of California Berkeley
36 *> \author Univ. of Colorado Denver
37 *> \author NAG Ltd.
38 *
39 *> \date November 2015
40 *
41 *> \ingroup complex16_blas_level1
42 *
43 *> \par Further Details:
44 * =====================
45 *>
46 *> \verbatim
47 *>
48 *> jack dongarra, 3/11/78.
49 *> modified 12/3/93, array(1) declarations changed to array(*)
50 *> \endverbatim
51 *>
52 * =====================================================================
53  COMPLEX*16 FUNCTION zdotc(N,ZX,INCX,ZY,INCY)
54 *
55 * -- Reference BLAS level1 routine (version 3.6.0) --
56 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
57 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
58 * November 2015
59 *
60 * .. Scalar Arguments ..
61  INTEGER INCX,INCY,N
62 * ..
63 * .. Array Arguments ..
64  COMPLEX*16 ZX(*),ZY(*)
65 * ..
66 *
67 * =====================================================================
68 *
69 * .. Local Scalars ..
70  COMPLEX*16 ZTEMP
71  INTEGER I,IX,IY
72 * ..
73 * .. Intrinsic Functions ..
74  INTRINSIC dconjg
75 * ..
76  ztemp = (0.0d0,0.0d0)
77  zdotc = (0.0d0,0.0d0)
78  IF (n.LE.0) RETURN
79  IF (incx.EQ.1 .AND. incy.EQ.1) THEN
80 *
81 * code for both increments equal to 1
82 *
83  DO i = 1,n
84  ztemp = ztemp + dconjg(zx(i))*zy(i)
85  END DO
86  ELSE
87 *
88 * code for unequal increments or equal increments
89 * not equal to 1
90 *
91  ix = 1
92  iy = 1
93  IF (incx.LT.0) ix = (-n+1)*incx + 1
94  IF (incy.LT.0) iy = (-n+1)*incy + 1
95  DO i = 1,n
96  ztemp = ztemp + dconjg(zx(ix))*zy(iy)
97  ix = ix + incx
98  iy = iy + incy
99  END DO
100  END IF
101  zdotc = ztemp
102  RETURN
103  END
complex *16 function zdotc(N, ZX, INCX, ZY, INCY)
ZDOTC
Definition: zdotc.f:54