LAPACK  3.4.1
LAPACK: Linear Algebra PACKage
zlascl2.f
Go to the documentation of this file.
00001 *> \brief \b ZLASCL2
00002 *
00003 *  =========== DOCUMENTATION ===========
00004 *
00005 * Online html documentation available at 
00006 *            http://www.netlib.org/lapack/explore-html/ 
00007 *
00008 *> \htmlonly
00009 *> Download ZLASCL2 + dependencies 
00010 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlascl2.f"> 
00011 *> [TGZ]</a> 
00012 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlascl2.f"> 
00013 *> [ZIP]</a> 
00014 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlascl2.f"> 
00015 *> [TXT]</a>
00016 *> \endhtmlonly 
00017 *
00018 *  Definition:
00019 *  ===========
00020 *
00021 *       SUBROUTINE ZLASCL2 ( M, N, D, X, LDX )
00022 * 
00023 *       .. Scalar Arguments ..
00024 *       INTEGER            M, N, LDX
00025 *       ..
00026 *       .. Array Arguments ..
00027 *       DOUBLE PRECISION   D( * )
00028 *       COMPLEX*16         X( LDX, * )
00029 *       ..
00030 *  
00031 *
00032 *> \par Purpose:
00033 *  =============
00034 *>
00035 *> \verbatim
00036 *>
00037 *> ZLASCL2 performs a diagonal scaling on a vector:
00038 *>   x <-- D * x
00039 *> where the DOUBLE PRECISION diagonal matrix D is stored as a vector.
00040 *>
00041 *> Eventually to be replaced by BLAS_zge_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 DOUBLE PRECISION 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*16 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 complex16OTHERcomputational
00090 *
00091 *  =====================================================================
00092       SUBROUTINE ZLASCL2 ( 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       DOUBLE PRECISION   D( * )
00104       COMPLEX*16         X( LDX, * )
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 
 All Files Functions