LAPACK  3.9.0
LAPACK: Linear Algebra PACKage

◆ zscal()

subroutine zscal ( integer  N,
complex*16  ZA,
complex*16, dimension(*)  ZX,
integer  INCX 
)

ZSCAL

Purpose:
    ZSCAL scales a vector by a constant.
Parameters
[in]N
          N is INTEGER
         number of elements in input vector(s)
[in]ZA
          ZA is COMPLEX*16
           On entry, ZA specifies the scalar alpha.
[in,out]ZX
          ZX is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
[in]INCX
          INCX is INTEGER
         storage spacing between elements of ZX
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2017
Further Details:
     jack dongarra, 3/11/78.
     modified 3/93 to return if incx .le. 0.
     modified 12/3/93, array(1) declarations changed to array(*)

Definition at line 80 of file zscal.f.

80 *
81 * -- Reference BLAS level1 routine (version 3.8.0) --
82 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
83 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
84 * November 2017
85 *
86 * .. Scalar Arguments ..
87  COMPLEX*16 ZA
88  INTEGER INCX,N
89 * ..
90 * .. Array Arguments ..
91  COMPLEX*16 ZX(*)
92 * ..
93 *
94 * =====================================================================
95 *
96 * .. Local Scalars ..
97  INTEGER I,NINCX
98 * ..
99  IF (n.LE.0 .OR. incx.LE.0) RETURN
100  IF (incx.EQ.1) THEN
101 *
102 * code for increment equal to 1
103 *
104  DO i = 1,n
105  zx(i) = za*zx(i)
106  END DO
107  ELSE
108 *
109 * code for increment not equal to 1
110 *
111  nincx = n*incx
112  DO i = 1,nincx,incx
113  zx(i) = za*zx(i)
114  END DO
115  END IF
116  RETURN