LAPACK  3.7.1
LAPACK: Linear Algebra PACKage
csscal.f
Go to the documentation of this file.
1 *> \brief \b CSSCAL
2 *
3 * =========== DOCUMENTATION ===========
4 *
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
7 *
8 * Definition:
9 * ===========
10 *
11 * SUBROUTINE CSSCAL(N,SA,CX,INCX)
12 *
13 * .. Scalar Arguments ..
14 * REAL SA
15 * INTEGER INCX,N
16 * ..
17 * .. Array Arguments ..
18 * COMPLEX CX(*)
19 * ..
20 *
21 *
22 *> \par Purpose:
23 * =============
24 *>
25 *> \verbatim
26 *>
27 *> CSSCAL scales a complex vector by a real constant.
28 *> \endverbatim
29 *
30 * Arguments:
31 * ==========
32 *
33 *> \param[in] N
34 *> \verbatim
35 *> N is INTEGER
36 *> number of elements in input vector(s)
37 *> \endverbatim
38 *>
39 *> \param[in] SA
40 *> \verbatim
41 *> SA is REAL
42 *> On entry, SA specifies the scalar alpha.
43 *> \endverbatim
44 *>
45 *> \param[in,out] CX
46 *> \verbatim
47 *> CX is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
48 *> \endverbatim
49 *>
50 *> \param[in] INCX
51 *> \verbatim
52 *> INCX is INTEGER
53 *> storage spacing between elements of CX
54 *> \endverbatim
55 *
56 * Authors:
57 * ========
58 *
59 *> \author Univ. of Tennessee
60 *> \author Univ. of California Berkeley
61 *> \author Univ. of Colorado Denver
62 *> \author NAG Ltd.
63 *
64 *> \date December 2016
65 *
66 *> \ingroup complex_blas_level1
67 *
68 *> \par Further Details:
69 * =====================
70 *>
71 *> \verbatim
72 *>
73 *> jack dongarra, linpack, 3/11/78.
74 *> modified 3/93 to return if incx .le. 0.
75 *> modified 12/3/93, array(1) declarations changed to array(*)
76 *> \endverbatim
77 *>
78 * =====================================================================
79  SUBROUTINE csscal(N,SA,CX,INCX)
80 *
81 * -- Reference BLAS level1 routine (version 3.7.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 * December 2016
85 *
86 * .. Scalar Arguments ..
87  REAL SA
88  INTEGER INCX,N
89 * ..
90 * .. Array Arguments ..
91  COMPLEX CX(*)
92 * ..
93 *
94 * =====================================================================
95 *
96 * .. Local Scalars ..
97  INTEGER I,NINCX
98 * ..
99 * .. Intrinsic Functions ..
100  INTRINSIC aimag,cmplx,real
101 * ..
102  IF (n.LE.0 .OR. incx.LE.0) RETURN
103  IF (incx.EQ.1) THEN
104 *
105 * code for increment equal to 1
106 *
107  DO i = 1,n
108  cx(i) = cmplx(sa*REAL(CX(I)),SA*AIMAG(cx(i)))
109  END DO
110  ELSE
111 *
112 * code for increment not equal to 1
113 *
114  nincx = n*incx
115  DO i = 1,nincx,incx
116  cx(i) = cmplx(sa*REAL(CX(I)),SA*AIMAG(cx(i)))
117  END DO
118  END IF
119  RETURN
120  END
subroutine csscal(N, SA, CX, INCX)
CSSCAL
Definition: csscal.f:80