1 *> \brief \b CLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download CLASET + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/claset.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/claset.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/claset.f">
21 * SUBROUTINE CLASET( UPLO, M, N, ALPHA, BETA, A, LDA )
23 * .. Scalar Arguments ..
28 * .. Array Arguments ..
38 *> CLASET initializes a 2-D array A to BETA on the diagonal and
39 *> ALPHA on the offdiagonals.
47 *> UPLO is CHARACTER*1
48 *> Specifies the part of the matrix A to be set.
49 *> = 'U': Upper triangular part is set. The lower triangle
51 *> = 'L': Lower triangular part is set. The upper triangle
53 *> Otherwise: All of the matrix A is set.
59 *> On entry, M specifies the number of rows of A.
65 *> On entry, N specifies the number of columns of A.
71 *> All the offdiagonal array elements are set to ALPHA.
77 *> All the diagonal array elements are set to BETA.
82 *> A is COMPLEX array, dimension (LDA,N)
83 *> On entry, the m by n matrix A.
84 *> On exit, A(i,j) = ALPHA, 1 <= i <= m, 1 <= j <= n, i.ne.j;
85 *> A(i,i) = BETA , 1 <= i <= min(m,n)
91 *> The leading dimension of the array A. LDA >= max(1,M).
97 *> \author Univ. of Tennessee
98 *> \author Univ. of California Berkeley
99 *> \author Univ. of Colorado Denver
102 *> \date November 2015
104 *> \ingroup complexOTHERauxiliary
106 * =====================================================================
107 SUBROUTINE CLASET( UPLO, M, N, ALPHA, BETA, A, LDA )
109 * -- LAPACK auxiliary routine (version 3.6.0) --
110 * -- LAPACK is a software package provided by Univ. of Tennessee, --
111 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
114 * .. Scalar Arguments ..
119 * .. Array Arguments ..
123 * =====================================================================
125 * .. Local Scalars ..
128 * .. External Functions ..
132 * .. Intrinsic Functions ..
135 * .. Executable Statements ..
137 IF( LSAME( UPLO, 'U' ) ) THEN
139 * Set the diagonal to BETA and the strictly upper triangular
140 * part of the array to ALPHA.
143 DO 10 I = 1, MIN( J-1, M )
147 DO 30 I = 1, MIN( N, M )
151 ELSE IF( LSAME( UPLO, 'L' ) ) THEN
153 * Set the diagonal to BETA and the strictly lower triangular
154 * part of the array to ALPHA.
156 DO 50 J = 1, MIN( M, N )
161 DO 60 I = 1, MIN( N, M )
167 * Set the array to BETA on the diagonal and ALPHA on the
175 DO 90 I = 1, MIN( M, N )