root / src / blas / csscal.f @ 4
Historique | Voir | Annoter | Télécharger (938 octet)
1 | 1 | pfleura2 | SUBROUTINE CSSCAL(N,SA,CX,INCX) |
---|---|---|---|
2 | 1 | pfleura2 | * .. Scalar Arguments .. |
3 | 1 | pfleura2 | REAL SA |
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 complex vector by a real 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 | * .. Intrinsic Functions .. |
23 | 1 | pfleura2 | INTRINSIC AIMAG,CMPLX,REAL |
24 | 1 | pfleura2 | * .. |
25 | 1 | pfleura2 | IF (N.LE.0 .OR. INCX.LE.0) RETURN |
26 | 1 | pfleura2 | IF (INCX.EQ.1) GO TO 20 |
27 | 1 | pfleura2 | * |
28 | 1 | pfleura2 | * code for increment not equal to 1 |
29 | 1 | pfleura2 | * |
30 | 1 | pfleura2 | NINCX = N*INCX |
31 | 1 | pfleura2 | DO 10 I = 1,NINCX,INCX |
32 | 1 | pfleura2 | CX(I) = CMPLX(SA*REAL(CX(I)),SA*AIMAG(CX(I))) |
33 | 1 | pfleura2 | 10 CONTINUE |
34 | 1 | pfleura2 | RETURN |
35 | 1 | pfleura2 | * |
36 | 1 | pfleura2 | * code for increment equal to 1 |
37 | 1 | pfleura2 | * |
38 | 1 | pfleura2 | 20 DO 30 I = 1,N |
39 | 1 | pfleura2 | CX(I) = CMPLX(SA*REAL(CX(I)),SA*AIMAG(CX(I))) |
40 | 1 | pfleura2 | 30 CONTINUE |
41 | 1 | pfleura2 | RETURN |
42 | 1 | pfleura2 | END |