LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ csscal()

subroutine csscal ( integer  n,
real  sa,
complex, dimension(*)  cx,
integer  incx 
)

CSSCAL

Purpose:
    CSSCAL scales a complex vector by a real constant.
Parameters
[in]N
          N is INTEGER
         number of elements in input vector(s)
[in]SA
          SA is REAL
           On entry, SA specifies the scalar alpha.
[in,out]CX
          CX is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
[in]INCX
          INCX is INTEGER
         storage spacing between elements of CX
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Further Details:
     jack dongarra, linpack, 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 77 of file csscal.f.

78*
79* -- Reference BLAS level1 routine --
80* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
81* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
82*
83* .. Scalar Arguments ..
84 REAL SA
85 INTEGER INCX,N
86* ..
87* .. Array Arguments ..
88 COMPLEX CX(*)
89* ..
90*
91* =====================================================================
92*
93* .. Local Scalars ..
94 INTEGER I,NINCX
95* ..
96* .. Parameters ..
97 REAL ONE
98 parameter(one=1.0e+0)
99* ..
100* .. Intrinsic Functions ..
101 INTRINSIC aimag,cmplx,real
102* ..
103 IF (n.LE.0 .OR. incx.LE.0 .OR. sa.EQ.one) RETURN
104 IF (incx.EQ.1) THEN
105*
106* code for increment equal to 1
107*
108 DO i = 1,n
109 cx(i) = cmplx(sa*real(cx(i)),sa*aimag(cx(i)))
110 END DO
111 ELSE
112*
113* code for increment not equal to 1
114*
115 nincx = n*incx
116 DO i = 1,nincx,incx
117 cx(i) = cmplx(sa*real(cx(i)),sa*aimag(cx(i)))
118 END DO
119 END IF
120 RETURN
121*
122* End of CSSCAL
123*