Go to the documentation of this file.00001 DOUBLE COMPLEX FUNCTION ZDOTU(N,ZX,INCX,ZY,INCY)
00002
00003 INTEGER INCX,INCY,N
00004
00005
00006 DOUBLE COMPLEX ZX(*),ZY(*)
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 DOUBLE COMPLEX ZTEMP
00024 INTEGER I,IX,IY
00025
00026 ZTEMP = (0.0d0,0.0d0)
00027 ZDOTU = (0.0d0,0.0d0)
00028 IF (N.LE.0) RETURN
00029 IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20
00030
00031
00032
00033
00034 IX = 1
00035 IY = 1
00036 IF (INCX.LT.0) IX = (-N+1)*INCX + 1
00037 IF (INCY.LT.0) IY = (-N+1)*INCY + 1
00038 DO 10 I = 1,N
00039 ZTEMP = ZTEMP + ZX(IX)*ZY(IY)
00040 IX = IX + INCX
00041 IY = IY + INCY
00042 10 CONTINUE
00043 ZDOTU = ZTEMP
00044 RETURN
00045
00046
00047
00048 20 DO 30 I = 1,N
00049 ZTEMP = ZTEMP + ZX(I)*ZY(I)
00050 30 CONTINUE
00051 ZDOTU = ZTEMP
00052 RETURN
00053 END