root / src / blas / cscal.f @ 4
Historique | Voir | Annoter | Télécharger (796 octet)
1 | 1 | pfleura2 | SUBROUTINE CSCAL(N,CA,CX,INCX) |
---|---|---|---|
2 | 1 | pfleura2 | * .. Scalar Arguments .. |
3 | 1 | pfleura2 | COMPLEX CA |
4 | 1 | pfleura2 | INTEGER INCX,N |
5 | 1 | pfleura2 | * .. |
6 | 1 | pfleura2 | * .. Array Arguments .. |
7 | 1 | pfleura2 | COMPLEX CX(*) |
8 | 1 | pfleura2 | * .. |
9 | 1 | pfleura2 | * |
10 | 1 | pfleura2 | * Purpose |
11 | 1 | pfleura2 | * ======= |
12 | 1 | pfleura2 | * |
13 | 1 | pfleura2 | * scales a vector by a constant. |
14 | 1 | pfleura2 | * jack dongarra, linpack, 3/11/78. |
15 | 1 | pfleura2 | * modified 3/93 to return if incx .le. 0. |
16 | 1 | pfleura2 | * modified 12/3/93, array(1) declarations changed to array(*) |
17 | 1 | pfleura2 | * |
18 | 1 | pfleura2 | * |
19 | 1 | pfleura2 | * .. Local Scalars .. |
20 | 1 | pfleura2 | INTEGER I,NINCX |
21 | 1 | pfleura2 | * .. |
22 | 1 | pfleura2 | IF (N.LE.0 .OR. INCX.LE.0) RETURN |
23 | 1 | pfleura2 | IF (INCX.EQ.1) GO TO 20 |
24 | 1 | pfleura2 | * |
25 | 1 | pfleura2 | * code for increment not equal to 1 |
26 | 1 | pfleura2 | * |
27 | 1 | pfleura2 | NINCX = N*INCX |
28 | 1 | pfleura2 | DO 10 I = 1,NINCX,INCX |
29 | 1 | pfleura2 | CX(I) = CA*CX(I) |
30 | 1 | pfleura2 | 10 CONTINUE |
31 | 1 | pfleura2 | RETURN |
32 | 1 | pfleura2 | * |
33 | 1 | pfleura2 | * code for increment equal to 1 |
34 | 1 | pfleura2 | * |
35 | 1 | pfleura2 | 20 DO 30 I = 1,N |
36 | 1 | pfleura2 | CX(I) = CA*CX(I) |
37 | 1 | pfleura2 | 30 CONTINUE |
38 | 1 | pfleura2 | RETURN |
39 | 1 | pfleura2 | END |