![]() |
LAPACK
3.4.1
LAPACK: Linear Algebra PACKage
|
00001 *> \brief \b CLARSCL2 00002 * 00003 * =========== DOCUMENTATION =========== 00004 * 00005 * Online html documentation available at 00006 * http://www.netlib.org/lapack/explore-html/ 00007 * 00008 *> \htmlonly 00009 *> Download CLARSCL2 + dependencies 00010 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/clarscl2.f"> 00011 *> [TGZ]</a> 00012 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/clarscl2.f"> 00013 *> [ZIP]</a> 00014 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/clarscl2.f"> 00015 *> [TXT]</a> 00016 *> \endhtmlonly 00017 * 00018 * Definition: 00019 * =========== 00020 * 00021 * SUBROUTINE CLARSCL2 ( M, N, D, X, LDX ) 00022 * 00023 * .. Scalar Arguments .. 00024 * INTEGER M, N, LDX 00025 * .. 00026 * .. Array Arguments .. 00027 * COMPLEX X( LDX, * ) 00028 * REAL D( * ) 00029 * .. 00030 * 00031 * 00032 *> \par Purpose: 00033 * ============= 00034 *> 00035 *> \verbatim 00036 *> 00037 *> CLARSCL2 performs a reciprocal diagonal scaling on an vector: 00038 *> x <-- inv(D) * x 00039 *> where the REAL diagonal matrix D is stored as a vector. 00040 *> 00041 *> Eventually to be replaced by BLAS_cge_diag_scale in the new BLAS 00042 *> standard. 00043 *> \endverbatim 00044 * 00045 * Arguments: 00046 * ========== 00047 * 00048 *> \param[in] M 00049 *> \verbatim 00050 *> M is INTEGER 00051 *> The number of rows of D and X. M >= 0. 00052 *> \endverbatim 00053 *> 00054 *> \param[in] N 00055 *> \verbatim 00056 *> N is INTEGER 00057 *> The number of columns of D and X. N >= 0. 00058 *> \endverbatim 00059 *> 00060 *> \param[in] D 00061 *> \verbatim 00062 *> D is REAL array, length M 00063 *> Diagonal matrix D, stored as a vector of length M. 00064 *> \endverbatim 00065 *> 00066 *> \param[in,out] X 00067 *> \verbatim 00068 *> X is COMPLEX array, dimension (LDX,N) 00069 *> On entry, the vector X to be scaled by D. 00070 *> On exit, the scaled vector. 00071 *> \endverbatim 00072 *> 00073 *> \param[in] LDX 00074 *> \verbatim 00075 *> LDX is INTEGER 00076 *> The leading dimension of the vector X. LDX >= 0. 00077 *> \endverbatim 00078 * 00079 * Authors: 00080 * ======== 00081 * 00082 *> \author Univ. of Tennessee 00083 *> \author Univ. of California Berkeley 00084 *> \author Univ. of Colorado Denver 00085 *> \author NAG Ltd. 00086 * 00087 *> \date November 2011 00088 * 00089 *> \ingroup complexOTHERcomputational 00090 * 00091 * ===================================================================== 00092 SUBROUTINE CLARSCL2 ( M, N, D, X, LDX ) 00093 * 00094 * -- LAPACK computational routine (version 3.4.0) -- 00095 * -- LAPACK is a software package provided by Univ. of Tennessee, -- 00096 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 00097 * November 2011 00098 * 00099 * .. Scalar Arguments .. 00100 INTEGER M, N, LDX 00101 * .. 00102 * .. Array Arguments .. 00103 COMPLEX X( LDX, * ) 00104 REAL D( * ) 00105 * .. 00106 * 00107 * ===================================================================== 00108 * 00109 * .. Local Scalars .. 00110 INTEGER I, J 00111 * .. 00112 * .. Executable Statements .. 00113 * 00114 DO J = 1, N 00115 DO I = 1, M 00116 X( I, J ) = X( I, J ) / D( I ) 00117 END DO 00118 END DO 00119 00120 RETURN 00121 END 00122