LAPACK 3.3.1
Linear Algebra PACKage

zdscal.f

Go to the documentation of this file.
00001       SUBROUTINE ZDSCAL(N,DA,ZX,INCX)
00002 *     .. Scalar Arguments ..
00003       DOUBLE PRECISION DA
00004       INTEGER INCX,N
00005 *     ..
00006 *     .. Array Arguments ..
00007       DOUBLE COMPLEX ZX(*)
00008 *     ..
00009 *
00010 *  Purpose
00011 *  =======
00012 *
00013 *     ZDSCAL 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,NINCX
00026 *     ..
00027 *     .. Intrinsic Functions ..
00028       INTRINSIC DCMPLX
00029 *     ..
00030       IF (N.LE.0 .OR. INCX.LE.0) RETURN
00031       IF (INCX.EQ.1) THEN
00032 *
00033 *        code for increment equal to 1
00034 *
00035          DO I = 1,N
00036             ZX(I) = DCMPLX(DA,0.0d0)*ZX(I)
00037          END DO
00038       ELSE
00039 *
00040 *        code for increment not equal to 1
00041 *
00042          NINCX = N*INCX
00043          DO I = 1,NINCX,INCX
00044             ZX(I) = DCMPLX(DA,0.0d0)*ZX(I)
00045          END DO
00046       END IF
00047       RETURN
00048       END
 All Files Functions