LAPACK  3.5.0
LAPACK: Linear Algebra PACKage
zdotc.f File Reference

Go to the source code of this file.

Functions/Subroutines

complex *16 function zdotc (N, ZX, INCX, ZY, INCY)
 ZDOTC More...
 

Function/Subroutine Documentation

complex*16 function zdotc ( integer  N,
complex*16, dimension(*)  ZX,
integer  INCX,
complex*16, dimension(*)  ZY,
integer  INCY 
)

ZDOTC

Purpose:
 ZDOTC forms the dot product of a vector.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011
Further Details:
     jack dongarra, 3/11/78.
     modified 12/3/93, array(1) declarations changed to array(*)

Definition at line 52 of file zdotc.f.

52 *
53 * -- Reference BLAS level1 routine (version 3.4.0) --
54 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
55 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
56 * November 2011
57 *
58 * .. Scalar Arguments ..
59  INTEGER incx,incy,n
60 * ..
61 * .. Array Arguments ..
62  COMPLEX*16 zx(*),zy(*)
63 * ..
64 *
65 * =====================================================================
66 *
67 * .. Local Scalars ..
68  COMPLEX*16 ztemp
69  INTEGER i,ix,iy
70 * ..
71 * .. Intrinsic Functions ..
72  INTRINSIC dconjg
73 * ..
74  ztemp = (0.0d0,0.0d0)
75  zdotc = (0.0d0,0.0d0)
76  IF (n.LE.0) RETURN
77  IF (incx.EQ.1 .AND. incy.EQ.1) THEN
78 *
79 * code for both increments equal to 1
80 *
81  DO i = 1,n
82  ztemp = ztemp + dconjg(zx(i))*zy(i)
83  END DO
84  ELSE
85 *
86 * code for unequal increments or equal increments
87 * not equal to 1
88 *
89  ix = 1
90  iy = 1
91  IF (incx.LT.0) ix = (-n+1)*incx + 1
92  IF (incy.LT.0) iy = (-n+1)*incy + 1
93  DO i = 1,n
94  ztemp = ztemp + dconjg(zx(ix))*zy(iy)
95  ix = ix + incx
96  iy = iy + incy
97  END DO
98  END IF
99  zdotc = ztemp
100  RETURN
complex *16 function zdotc(N, ZX, INCX, ZY, INCY)
ZDOTC
Definition: zdotc.f:52