1
SUBROUTINE GAL_DLASET( UPLO, M, N, ALPHA, BETA, A, LDA )
3
* -- LAPACK auxiliary routine (version 1.1) --
4
* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
5
* Courant Institute, Argonne National Lab, and Rice University
8
* .. Scalar Arguments ..
11
DOUBLE PRECISION ALPHA, BETA
13
* .. Array Arguments ..
14
DOUBLE PRECISION A( LDA, * )
20
* GAL_DLASET initializes an m-by-n matrix A to BETA on the diagonal and
21
* ALPHA on the offdiagonals.
26
* UPLO (input) CHARACTER*1
27
* Specifies the part of the matrix A to be set.
28
* = 'U': Upper triangular part is set; the strictly lower
29
* triangular part of A is not changed.
30
* = 'L': Lower triangular part is set; the strictly upper
31
* triangular part of A is not changed.
32
* Otherwise: All of the matrix A is set.
35
* The number of rows of the matrix A. M >= 0.
38
* The number of columns of the matrix A. N >= 0.
40
* ALPHA (input) DOUBLE PRECISION
41
* The constant to which the offdiagonal elements are to be set.
43
* BETA (input) DOUBLE PRECISION
44
* The constant to which the diagonal elements are to be set.
46
* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
47
* On exit, the leading m-by-n submatrix of A is set as follows:
49
* if UPLO = 'U', A(i,j) = ALPHA, 1<=i<=j-1, 1<=j<=n,
50
* if UPLO = 'L', A(i,j) = ALPHA, j+1<=i<=m, 1<=j<=n,
51
* otherwise, A(i,j) = ALPHA, 1<=i<=m, 1<=j<=n, i.ne.j,
53
* and, for all UPLO, A(i,i) = BETA, 1<=i<=min(m,n).
56
* The leading dimension of the array A. LDA >= max(1,M).
58
* =====================================================================
63
* .. External Functions ..
67
* .. Intrinsic Functions ..
70
* .. Executable Statements ..
72
IF( GAL_LSAME( UPLO, 'U' ) ) THEN
74
* Set the strictly upper triangular or trapezoidal part of the
78
DO 10 I = 1, MIN( J-1, M )
83
ELSE IF( GAL_LSAME( UPLO, 'L' ) ) THEN
85
* Set the strictly lower triangular or trapezoidal part of the
88
DO 40 J = 1, MIN( M, N )
96
* Set the leading m-by-n submatrix to ALPHA.
105
* Set the first min(M,N) diagonal elements to BETA.
107
DO 70 I = 1, MIN( M, N )