01:       SUBROUTINE SSCAL(N,SA,SX,INCX)
02: *     .. Scalar Arguments ..
03:       REAL SA
04:       INTEGER INCX,N
05: *     ..
06: *     .. Array Arguments ..
07:       REAL SX(*)
08: *     ..
09: *
10: *  Purpose
11: *  =======
12: *
13: *     scales a vector by a constant.
14: *     uses unrolled loops for increment equal to 1.
15: *
16: *  Further Details
17: *  ===============
18: *
19: *     jack dongarra, linpack, 3/11/78.
20: *     modified 3/93 to return if incx .le. 0.
21: *     modified 12/3/93, array(1) declarations changed to array(*)
22: *
23: *  =====================================================================
24: *
25: *     .. Local Scalars ..
26:       INTEGER I,M,MP1,NINCX
27: *     ..
28: *     .. Intrinsic Functions ..
29:       INTRINSIC MOD
30: *     ..
31:       IF (N.LE.0 .OR. INCX.LE.0) RETURN
32:       IF (INCX.EQ.1) GO TO 20
33: *
34: *        code for increment not equal to 1
35: *
36:       NINCX = N*INCX
37:       DO 10 I = 1,NINCX,INCX
38:           SX(I) = SA*SX(I)
39:    10 CONTINUE
40:       RETURN
41: *
42: *        code for increment equal to 1
43: *
44: *
45: *        clean-up loop
46: *
47:    20 M = MOD(N,5)
48:       IF (M.EQ.0) GO TO 40
49:       DO 30 I = 1,M
50:           SX(I) = SA*SX(I)
51:    30 CONTINUE
52:       IF (N.LT.5) RETURN
53:    40 MP1 = M + 1
54:       DO 50 I = MP1,N,5
55:           SX(I) = SA*SX(I)
56:           SX(I+1) = SA*SX(I+1)
57:           SX(I+2) = SA*SX(I+2)
58:           SX(I+3) = SA*SX(I+3)
59:           SX(I+4) = SA*SX(I+4)
60:    50 CONTINUE
61:       RETURN
62:       END
63: