1SDSDOT(1) BLAS routine SDSDOT(1)
2
3
4
7 REAL FUNCTION SDSDOT(N,SB,SX,INCX,SY,INCY)
8
9 REAL SB
10
11 INTEGER INCX,INCY,N
12
13 REAL SX(*),SY(*)
14
15 DOUBLE PRECISION DSDOT
16
17 INTEGER I,KX,KY,NS
18
19 INTRINSIC DBLE
20
21 DSDOT = SB
22
23 IF (N.LE.0) GO TO 30
24
25 IF (INCX.EQ.INCY .AND. INCX.GT.0) GO TO 40
26
27 KX = 1
28
29 KY = 1
30
31 IF (INCX.LT.0) KX = 1 + (1-N)*INCX
32
33 IF (INCY.LT.0) KY = 1 + (1-N)*INCY
34
35 DO 10 I = 1,N
36
37 DSDOT = DSDOT + DBLE(SX(KX))*DBLE(SY(KY))
38
39 KX = KX + INCX
40
41 KY = KY + INCY
42
43 10 CONTINUE
44
45 30 SDSDOT = DSDOT
46
47 RETURN
48
49 40 NS = N*INCX
50
51 DO 50 I = 1,NS,INCX
52
53 DSDOT = DSDOT + DBLE(SX(I))*DBLE(SY(I))
54
55 50 CONTINUE
56
57 SDSDOT = DSDOT
58
59 RETURN
60
61 END
62
64BLAS routine February 2007 SDSDOT(1)