LAPACK 3.3.0
|
00001 SUBROUTINE ZSCAL(N,ZA,ZX,INCX) 00002 * .. Scalar Arguments .. 00003 DOUBLE COMPLEX ZA 00004 INTEGER INCX,N 00005 * .. 00006 * .. Array Arguments .. 00007 DOUBLE COMPLEX ZX(*) 00008 * .. 00009 * 00010 * Purpose 00011 * ======= 00012 * 00013 * ZSCAL scales a vector by a constant. 00014 * 00015 * Further Details 00016 * =============== 00017 * 00018 * jack dongarra, 3/11/78. 00019 * modified 3/93 to return if incx .le. 0. 00020 * modified 12/3/93, array(1) declarations changed to array(*) 00021 * 00022 * ===================================================================== 00023 * 00024 * .. Local Scalars .. 00025 INTEGER I,IX 00026 * .. 00027 IF (N.LE.0 .OR. INCX.LE.0) RETURN 00028 IF (INCX.EQ.1) GO TO 20 00029 * 00030 * code for increment not equal to 1 00031 * 00032 IX = 1 00033 DO 10 I = 1,N 00034 ZX(IX) = ZA*ZX(IX) 00035 IX = IX + INCX 00036 10 CONTINUE 00037 RETURN 00038 * 00039 * code for increment equal to 1 00040 * 00041 20 DO 30 I = 1,N 00042 ZX(I) = ZA*ZX(I) 00043 30 CONTINUE 00044 RETURN 00045 END