1DTFSM(1)LAPACK routine (version 3.2) DTFSM(1)
2
3
4
6 DTFSM - 3 BLAS like routine for A in RFP Format
7
9 SUBROUTINE DTFSM( TRANSR, SIDE, UPLO, TRANS, DIAG, M, N, ALPHA, A,
10
11 + B, LDB )
12
13 CHARACTER TRANSR, DIAG, SIDE, TRANS, UPLO
14
15 INTEGER LDB, M, N
16
17 DOUBLE PRECISION ALPHA
18
19 DOUBLE PRECISION A( 0: * ), B( 0: LDB-1, 0: * )
20
22 Level 3 BLAS like routine for A in RFP Format. DTFSM solves the
23 matrix equation
24 op( A )*X = alpha*B or X*op( A ) = alpha*B
25 where alpha is a scalar, X and B are m by n matrices, A is a unit, or
26 non-unit, upper or lower triangular matrix and op( A ) is one of
27 op( A ) = A or op( A ) = A'.
28 A is in Rectangular Full Packed (RFP) Format.
29 The matrix X is overwritten on B.
30
32 TRANSR - (input) CHARACTER = 'N': The Normal Form of RFP A is stored;
33 = 'T': The Transpose Form of RFP A is stored.
34
35 SIDE - (input) CHARACTER
36 On entry, SIDE specifies whether op( A ) appears on the left or
37 right of X as follows: SIDE = 'L' or 'l' op( A )*X = alpha*B.
38 SIDE = 'R' or 'r' X*op( A ) = alpha*B. Unchanged on exit.
39
40 UPLO - (input) CHARACTER
41 On entry, UPLO specifies whether the RFP matrix A came from an
42 upper or lower triangular matrix as follows: UPLO = 'U' or 'u'
43 RFP A came from an upper triangular matrix UPLO = 'L' or 'l' RFP
44 A came from a lower triangular matrix Unchanged on exit.
45
46 TRANS - (input) CHARACTER
47 On entry, TRANS specifies the form of op( A ) to be used in the
48 matrix multiplication as follows:
49
50 TRANS = 'N' or 'n' op( A ) = A.
51
52 TRANS = 'T' or 't' op( A ) = A'.
53 Unchanged on exit.
54
55 DIAG - (input) CHARACTER
56 On entry, DIAG specifies whether or not RFP A is unit triangular
57 as follows: DIAG = 'U' or 'u' A is assumed to be unit triangu‐
58 lar. DIAG = 'N' or 'n' A is not assumed to be unit triangu‐
59 lar. Unchanged on exit.
60
61 M - (input) INTEGER.
62 On entry, M specifies the number of rows of B. M must be at
63 least zero. Unchanged on exit.
64
65 N - (input) INTEGER.
66 On entry, N specifies the number of columns of B. N must be at
67 least zero. Unchanged on exit.
68
69 ALPHA - (input) DOUBLE PRECISION.
70 On entry, ALPHA specifies the scalar alpha. When alpha is
71 zero then A is not referenced and B need not be set before
72 entry. Unchanged on exit.
73
74 A - (input) DOUBLE PRECISION array, dimension (NT);
75 NT = N*(N+1)/2. On entry, the matrix A in RFP Format. RFP For‐
76 mat is described by TRANSR, UPLO and N as follows:
77 If TRANSR='N' then RFP A is (0:N,0:K-1) when N is even;
78 K=N/2. RFP A is (0:N-1,0:K) when N is odd; K=N/2. If TRANSR =
79 'T' then RFP is the transpose of RFP A as defined when TRANSR =
80 'N'. The contents of RFP A are defined by UPLO as follows: If
81 UPLO = 'U' the RFP A contains the NT elements of upper packed A
82 either in normal or transpose Format. If UPLO = 'L' the RFP A
83 contains the NT elements of lower packed A either in normal or
84 transpose Format. The LDA of RFP A is (N+1)/2 when TRANSR = 'T'.
85 When TRANSR is 'N' the LDA is N+1 when N is even and is N when
86 is odd. See the Note below for more details. Unchanged on exit.
87
88 B - (input/ouptut) DOUBLE PRECISION array, DIMENSION (LDB,N)
89 Before entry, the leading m by n part of the array B must
90 contain the right-hand side matrix B, and on exit is
91 overwritten by the solution matrix X.
92
93 LDB - (input) INTEGER.
94 On entry, LDB specifies the first dimension of B as declared in
95 the calling (sub) program. LDB must be at least max( 1,
96 m ). Unchanged on exit.
97
99 We first consider Rectangular Full Packed (RFP) Format when N is even.
100 We give an example where N = 6.
101 AP is Upper AP is Lower
102 00 01 02 03 04 05 00
103 11 12 13 14 15 10 11
104 22 23 24 25 20 21 22
105 33 34 35 30 31 32 33
106 44 45 40 41 42 43 44
107 55 50 51 52 53 54 55
108 Let TRANSR = 'N'. RFP holds AP as follows:
109 For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
110 three columns of AP upper. The lower triangle A(4:6,0:2) consists of
111 the transpose of the first three columns of AP upper.
112 For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
113 three columns of AP lower. The upper triangle A(0:2,0:2) consists of
114 the transpose of the last three columns of AP lower.
115 This covers the case N even and TRANSR = 'N'.
116 RFP A RFP A
117 03 04 05 33 43 53
118 13 14 15 00 44 54
119 23 24 25 10 11 55
120 33 34 35 20 21 22
121 00 44 45 30 31 32
122 01 11 55 40 41 42
123 02 12 22 50 51 52
124 Now let TRANSR = 'T'. RFP A in both UPLO cases is just the transpose of
125 RFP A above. One therefore gets:
126 RFP A RFP A
127 03 13 23 33 00 01 02 33 00 10 20 30 40 50
128 04 14 24 34 44 11 12 43 44 11 21 31 41 51
129 05 15 25 35 45 55 22 53 54 55 22 32 42 52
130 We first consider Rectangular Full Packed (RFP) Format when N is odd.
131 We give an example where N = 5.
132 AP is Upper AP is Lower
133 00 01 02 03 04 00
134 11 12 13 14 10 11
135 22 23 24 20 21 22
136 33 34 30 31 32 33
137 44 40 41 42 43 44
138 Let TRANSR = 'N'. RFP holds AP as follows:
139 For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
140 three columns of AP upper. The lower triangle A(3:4,0:1) consists of
141 the transpose of the first two columns of AP upper.
142 For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
143 three columns of AP lower. The upper triangle A(0:1,1:2) consists of
144 the transpose of the last two columns of AP lower.
145 This covers the case N odd and TRANSR = 'N'.
146 RFP A RFP A
147 02 03 04 00 33 43
148 12 13 14 10 11 44
149 22 23 24 20 21 22
150 00 33 34 30 31 32
151 01 11 44 40 41 42
152 Now let TRANSR = 'T'. RFP A in both UPLO cases is just the transpose of
153 RFP A above. One therefore gets:
154 RFP A RFP A
155 02 12 22 00 01 00 10 20 30 40 50
156 03 13 23 33 11 33 11 21 31 41 51
157 04 14 24 34 44 43 44 22 32 42 52
158 Reference
159 =========
160
161
162
163 LAPACK routine (version 3.2) November 2008 DTFSM(1)