PLASMA
2.4.5
PLASMA - Parallel Linear Algebra for Scalable Multi-core Architectures
Main Page
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
claset.f
Go to the documentation of this file.
1
SUBROUTINE
claset
( UPLO, M, N, ALPHA, BETA, A, LDA )
2
*
3
* -- LAPACK auxiliary routine (version 3.2) --
4
* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
5
* November 2006
6
*
7
* .. Scalar Arguments ..
8
CHARACTER
uplo
9
INTEGER
lda, m, n
10
COMPLEX
alpha, beta
11
* ..
12
* .. Array Arguments ..
13
COMPLEX
a( lda, * )
14
* ..
15
*
16
* Purpose
17
* =======
18
*
19
* CLASET initializes a 2-D array A to BETA on the diagonal and
20
* ALPHA on the offdiagonals.
21
*
22
* Arguments
23
* =========
24
*
25
* UPLO (input) CHARACTER*1
26
* Specifies the part of the matrix A to be set.
27
* = 'U': Upper triangular part is set. The lower triangle
28
* is unchanged.
29
* = 'L': Lower triangular part is set. The upper triangle
30
* is unchanged.
31
* Otherwise: All of the matrix A is set.
32
*
33
* M (input) INTEGER
34
* On entry, M specifies the number of rows of A.
35
*
36
* N (input) INTEGER
37
* On entry, N specifies the number of columns of A.
38
*
39
* ALPHA (input) COMPLEX
40
* All the offdiagonal array elements are set to ALPHA.
41
*
42
* BETA (input) COMPLEX
43
* All the diagonal array elements are set to BETA.
44
*
45
* A (input/output) COMPLEX array, dimension (LDA,N)
46
* On entry, the m by n matrix A.
47
* On exit, A(i,j) = ALPHA, 1 <= i <= m, 1 <= j <= n, i.ne.j;
48
* A(i,i) = BETA , 1 <= i <= min(m,n)
49
*
50
* LDA (input) INTEGER
51
* The leading dimension of the array A. LDA >= max(1,M).
52
*
53
* =====================================================================
54
*
55
* .. Local Scalars ..
56
INTEGER
i, j
57
* ..
58
* .. External Functions ..
59
LOGICAL
lsame
60
EXTERNAL
lsame
61
* ..
62
* .. Intrinsic Functions ..
63
INTRINSIC
min
64
* ..
65
* .. Executable Statements ..
66
*
67
IF
( lsame(
uplo
,
'U'
) )
THEN
68
*
69
* Set the diagonal to BETA and the strictly upper triangular
70
* part of the array to ALPHA.
71
*
72
DO
20 j = 2, n
73
DO
10 i = 1,
min
( j-1, m )
74
a( i, j ) = alpha
75
10 continue
76
20 continue
77
DO
30 i = 1,
min
( n, m )
78
a( i, i ) = beta
79
30 continue
80
*
81
ELSE
IF
( lsame(
uplo
,
'L'
) )
THEN
82
*
83
* Set the diagonal to BETA and the strictly lower triangular
84
* part of the array to ALPHA.
85
*
86
DO
50 j = 1,
min
( m, n )
87
DO
40 i = j + 1, m
88
a( i, j ) = alpha
89
40 continue
90
50 continue
91
DO
60 i = 1,
min
( n, m )
92
a( i, i ) = beta
93
60 continue
94
*
95
ELSE
96
*
97
* Set the array to BETA on the diagonal and ALPHA on the
98
* offdiagonal.
99
*
100
DO
80 j = 1, n
101
DO
70 i = 1, m
102
a( i, j ) = alpha
103
70 continue
104
80 continue
105
DO
90 i = 1,
min
( m, n )
106
a( i, i ) = beta
107
90 continue
108
END IF
109
*
110
return
111
*
112
* End of CLASET
113
*
114
END
plasma_2.4.5
testing
lin
claset.f
Generated on Mon Jul 9 2012 12:45:03 for PLASMA by
1.8.1