root / man / man3 / HPL_dtrsm.3
Historique | Voir | Annoter | Télécharger (4,93 ko)
1 |
.TH HPL_dtrsm 3 "September 10, 2008" "HPL 2.0" "HPL Library Functions" |
---|---|
2 |
.SH NAME |
3 |
HPL_dtrsm \- B := A^{-1} * B or B := B * A^{-1}. |
4 |
.SH SYNOPSIS |
5 |
\fB\&#include "hpl.h"\fR |
6 |
|
7 |
\fB\&void\fR |
8 |
\fB\&HPL_dtrsm(\fR |
9 |
\fB\&const enum HPL_ORDER\fR |
10 |
\fI\&ORDER\fR, |
11 |
\fB\&const enum HPL_SIDE\fR |
12 |
\fI\&SIDE\fR, |
13 |
\fB\&const enum HPL_UPLO\fR |
14 |
\fI\&UPLO\fR, |
15 |
\fB\&const enum HPL_TRANS\fR |
16 |
\fI\&TRANS\fR, |
17 |
\fB\&const enum HPL_DIAG\fR |
18 |
\fI\&DIAG\fR, |
19 |
\fB\&const int\fR |
20 |
\fI\&M\fR, |
21 |
\fB\&const int\fR |
22 |
\fI\&N\fR, |
23 |
\fB\&const double\fR |
24 |
\fI\&ALPHA\fR, |
25 |
\fB\&const double *\fR |
26 |
\fI\&A\fR, |
27 |
\fB\&const int\fR |
28 |
\fI\&LDA\fR, |
29 |
\fB\&double *\fR |
30 |
\fI\&B\fR, |
31 |
\fB\&const int\fR |
32 |
\fI\&LDB\fR |
33 |
\fB\&);\fR |
34 |
.SH DESCRIPTION |
35 |
\fB\&HPL_dtrsm\fR |
36 |
solves one of the matrix equations |
37 |
|
38 |
op( A ) * X = alpha * B, or X * op( A ) = alpha * B, |
39 |
|
40 |
where alpha is a scalar, X and B are m by n matrices, A is a unit, or |
41 |
non-unit, upper or lower triangular matrix and op(A) is one of |
42 |
|
43 |
op( A ) = A or op( A ) = A^T. |
44 |
|
45 |
The matrix X is overwritten on B. |
46 |
|
47 |
No test for singularity or near-singularity is included in this |
48 |
routine. Such tests must be performed before calling this routine. |
49 |
.SH ARGUMENTS |
50 |
.TP 8 |
51 |
ORDER (local input) const enum HPL_ORDER |
52 |
On entry, ORDER specifies the storage format of the operands |
53 |
as follows: |
54 |
ORDER = HplRowMajor, |
55 |
ORDER = HplColumnMajor. |
56 |
.TP 8 |
57 |
SIDE (local input) const enum HPL_SIDE |
58 |
On entry, SIDE specifies whether op(A) appears on the left |
59 |
or right of X as follows: |
60 |
SIDE==HplLeft op( A ) * X = alpha * B, |
61 |
SIDE==HplRight X * op( A ) = alpha * B. |
62 |
.TP 8 |
63 |
UPLO (local input) const enum HPL_UPLO |
64 |
On entry, UPLO specifies whether the upper or lower |
65 |
triangular part of the array A is to be referenced. When |
66 |
UPLO==HplUpper, only the upper triangular part of A is to be |
67 |
referenced, otherwise only the lower triangular part of A is |
68 |
to be referenced. |
69 |
.TP 8 |
70 |
TRANS (local input) const enum HPL_TRANS |
71 |
On entry, TRANSA specifies the form of op(A) to be used in |
72 |
the matrix-matrix operation follows: |
73 |
TRANSA==HplNoTrans : op( A ) = A, |
74 |
TRANSA==HplTrans : op( A ) = A^T, |
75 |
TRANSA==HplConjTrans : op( A ) = A^T. |
76 |
.TP 8 |
77 |
DIAG (local input) const enum HPL_DIAG |
78 |
On entry, DIAG specifies whether A is unit triangular or |
79 |
not. When DIAG==HplUnit, A is assumed to be unit triangular, |
80 |
and otherwise, A is not assumed to be unit triangular. |
81 |
.TP 8 |
82 |
M (local input) const int |
83 |
On entry, M specifies the number of rows of the matrix B. |
84 |
M must be at least zero. |
85 |
.TP 8 |
86 |
N (local input) const int |
87 |
On entry, N specifies the number of columns of the matrix B. |
88 |
N must be at least zero. |
89 |
.TP 8 |
90 |
ALPHA (local input) const double |
91 |
On entry, ALPHA specifies the scalar alpha. When ALPHA is |
92 |
supplied as zero then the elements of the matrix B need not |
93 |
be set on input. |
94 |
.TP 8 |
95 |
A (local input) const double * |
96 |
On entry, A points to an array of size equal to or greater |
97 |
than LDA * k, where k is m when SIDE==HplLeft and is n |
98 |
otherwise. Before entry with UPLO==HplUpper, the leading |
99 |
k by k upper triangular part of the array A must contain the |
100 |
upper triangular matrix and the strictly lower triangular |
101 |
part of A is not referenced. When UPLO==HplLower on entry, |
102 |
the leading k by k lower triangular part of the array A must |
103 |
contain the lower triangular matrix and the strictly upper |
104 |
triangular part of A is not referenced. |
105 |
|
106 |
Note that when DIAG==HplUnit, the diagonal elements of A |
107 |
not referenced either, but are assumed to be unity. |
108 |
.TP 8 |
109 |
LDA (local input) const int |
110 |
On entry, LDA specifies the leading dimension of A as |
111 |
declared in the calling (sub) program. LDA must be at |
112 |
least MAX(1,m) when SIDE==HplLeft, and MAX(1,n) otherwise. |
113 |
.TP 8 |
114 |
B (local input/output) double * |
115 |
On entry, B points to an array of size equal to or greater |
116 |
than LDB * n. Before entry, the leading m by n part of the |
117 |
array B must contain the matrix B, except when beta is zero, |
118 |
in which case B need not be set on entry. On exit, the array |
119 |
B is overwritten by the m by n solution matrix. |
120 |
.TP 8 |
121 |
LDB (local input) const int |
122 |
On entry, LDB specifies the leading dimension of B as |
123 |
declared in the calling (sub) program. LDB must be at |
124 |
least MAX(1,m). |
125 |
.SH EXAMPLE |
126 |
\fI\&#include "hpl.h"\fR |
127 |
|
128 |
int main(int argc, char *argv[]) |
129 |
.br |
130 |
{ |
131 |
.br |
132 |
double a[2*2], b[2*2]; |
133 |
.br |
134 |
a[0] = 4.0; a[1] = 1.0; a[2] = 2.0; a[3] = 5.0; |
135 |
.br |
136 |
b[0] = 2.0; b[1] = 1.0; b[2] = 1.0; b[3] = 2.0; |
137 |
.br |
138 |
HPL_dtrsm( HplColumnMajor, HplLeft, HplUpper, |
139 |
.br |
140 |
HplNoTrans, HplNonUnit, 2, 2, 2.0, |
141 |
.br |
142 |
a, 2, b, 2 ); |
143 |
.br |
144 |
printf(" [%f,%f]\en", b[0], b[2]); |
145 |
.br |
146 |
printf("b=[%f,%f]\en", b[1], b[3]); |
147 |
.br |
148 |
exit(0); return(0); |
149 |
.br |
150 |
} |
151 |
.SH SEE ALSO |
152 |
.BR HPL_dgemm \ (3). |