Annotation of rpl/lapack/blas/zdotc.f, revision 1.3

1.1       bertrand    1:       DOUBLE COMPLEX FUNCTION ZDOTC(N,ZX,INCX,ZY,INCY)
                      2: *     .. Scalar Arguments ..
                      3:       INTEGER INCX,INCY,N
                      4: *     ..
                      5: *     .. Array Arguments ..
                      6:       DOUBLE COMPLEX ZX(*),ZY(*)
                      7: *     ..
                      8: *
                      9: *  Purpose
                     10: *  =======
                     11: *
                     12: *  ZDOTC forms the dot product of a vector.
                     13: *
                     14: *  Further Details
                     15: *  ===============
                     16: *
                     17: *     jack dongarra, 3/11/78.
                     18: *     modified 12/3/93, array(1) declarations changed to array(*)
                     19: *
                     20: *  =====================================================================
                     21: *
                     22: *     .. Local Scalars ..
                     23:       DOUBLE COMPLEX ZTEMP
                     24:       INTEGER I,IX,IY
                     25: *     ..
                     26: *     .. Intrinsic Functions ..
                     27:       INTRINSIC DCONJG
                     28: *     ..
                     29:       ZTEMP = (0.0d0,0.0d0)
                     30:       ZDOTC = (0.0d0,0.0d0)
                     31:       IF (N.LE.0) RETURN
                     32:       IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20
                     33: *
                     34: *        code for unequal increments or equal increments
                     35: *          not equal to 1
                     36: *
                     37:       IX = 1
                     38:       IY = 1
                     39:       IF (INCX.LT.0) IX = (-N+1)*INCX + 1
                     40:       IF (INCY.LT.0) IY = (-N+1)*INCY + 1
                     41:       DO 10 I = 1,N
                     42:           ZTEMP = ZTEMP + DCONJG(ZX(IX))*ZY(IY)
                     43:           IX = IX + INCX
                     44:           IY = IY + INCY
                     45:    10 CONTINUE
                     46:       ZDOTC = ZTEMP
                     47:       RETURN
                     48: *
                     49: *        code for both increments equal to 1
                     50: *
                     51:    20 DO 30 I = 1,N
                     52:           ZTEMP = ZTEMP + DCONJG(ZX(I))*ZY(I)
                     53:    30 CONTINUE
                     54:       ZDOTC = ZTEMP
                     55:       RETURN
                     56:       END

CVSweb interface <joel.bertrand@systella.fr>