SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
All Classes Files Functions Variables Typedefs Macros
ccdotu.f
Go to the documentation of this file.
1 SUBROUTINE ccdotu( N, DOTU, X, INCX, Y, INCY )
2*
3* -- ScaLAPACK tools routine (version 1.7) --
4* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
5* and University of California, Berkeley.
6* May 1, 1997
7*
8* .. Scalar Arguments ..
9 INTEGER INCX, INCY, N
10 COMPLEX DOTU
11* ..
12* .. Array Arguments ..
13 COMPLEX X( * ), Y( * )
14* ..
15*
16* Purpose
17* =======
18*
19* CCDOTU is a simple FORTRAN wrapper around the BLAS function
20* CDOTU returning the result in the parameter list instead.
21*
22* =====================================================================
23*
24* .. Local Scalars ..
25 COMPLEX CTEMP
26 INTEGER I,IX,IY
27* ..
28* .. Executable Statements ..
29*
30 ctemp = (0.0d0,0.0d0)
31 dotu = (0.0d0,0.0d0)
32 IF (n.LE.0) RETURN
33 IF (incx.EQ.1 .AND. incy.EQ.1) THEN
34*
35* code for both increments equal to 1
36*
37 DO i = 1,n
38 ctemp = ctemp + x(i)*y(i)
39 END DO
40 ELSE
41*
42* code for unequal increments or equal increments
43* not equal to 1
44*
45 ix = 1
46 iy = 1
47 IF (incx.LT.0) ix = (-n+1)*incx + 1
48 IF (incy.LT.0) iy = (-n+1)*incy + 1
49 DO i = 1,n
50 ctemp = ctemp + x(ix)*y(iy)
51 ix = ix + incx
52 iy = iy + incy
53 END DO
54 END IF
55 dotu = ctemp
56*
57 RETURN
58*
59* End of CCDOTU
60*
61 END
subroutine ccdotu(n, dotu, x, incx, y, incy)
Definition ccdotu.f:2