LAPACK 3.3.0

csscal.f

Go to the documentation of this file.
00001       SUBROUTINE CSSCAL(N,SA,CX,INCX)
00002 *     .. Scalar Arguments ..
00003       REAL SA
00004       INTEGER INCX,N
00005 *     ..
00006 *     .. Array Arguments ..
00007       COMPLEX CX(*)
00008 *     ..
00009 *
00010 *  Purpose
00011 *  =======
00012 *
00013 *     CSSCAL scales a complex vector by a real constant.
00014 *
00015 *  Further Details
00016 *  ===============
00017 *
00018 *     jack dongarra, linpack, 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 AIMAG,CMPLX,REAL
00029 *     ..
00030       IF (N.LE.0 .OR. INCX.LE.0) RETURN
00031       IF (INCX.EQ.1) GO TO 20
00032 *
00033 *        code for increment not equal to 1
00034 *
00035       NINCX = N*INCX
00036       DO 10 I = 1,NINCX,INCX
00037           CX(I) = CMPLX(SA*REAL(CX(I)),SA*AIMAG(CX(I)))
00038    10 CONTINUE
00039       RETURN
00040 *
00041 *        code for increment equal to 1
00042 *
00043    20 DO 30 I = 1,N
00044           CX(I) = CMPLX(SA*REAL(CX(I)),SA*AIMAG(CX(I)))
00045    30 CONTINUE
00046       RETURN
00047       END
 All Files Functions