root / man / man3 / HPL_dgemm.3
Historique | Voir | Annoter | Télécharger (5,19 ko)
1 |
.TH HPL_dgemm 3 "September 10, 2008" "HPL 2.0" "HPL Library Functions" |
---|---|
2 |
.SH NAME |
3 |
HPL_dgemm \- C := alpha * op(A) * op(B) + beta * C. |
4 |
.SH SYNOPSIS |
5 |
\fB\&#include "hpl.h"\fR |
6 |
|
7 |
\fB\&void\fR |
8 |
\fB\&HPL_dgemm(\fR |
9 |
\fB\&const enum HPL_ORDER\fR |
10 |
\fI\&ORDER\fR, |
11 |
\fB\&const enum HPL_TRANS\fR |
12 |
\fI\&TRANSA\fR, |
13 |
\fB\&const enum HPL_TRANS\fR |
14 |
\fI\&TRANSB\fR, |
15 |
\fB\&const int\fR |
16 |
\fI\&M\fR, |
17 |
\fB\&const int\fR |
18 |
\fI\&N\fR, |
19 |
\fB\&const int\fR |
20 |
\fI\&K\fR, |
21 |
\fB\&const double\fR |
22 |
\fI\&ALPHA\fR, |
23 |
\fB\&const double *\fR |
24 |
\fI\&A\fR, |
25 |
\fB\&const int\fR |
26 |
\fI\&LDA\fR, |
27 |
\fB\&const double *\fR |
28 |
\fI\&B\fR, |
29 |
\fB\&const int\fR |
30 |
\fI\&LDB\fR, |
31 |
\fB\&const double\fR |
32 |
\fI\&BETA\fR, |
33 |
\fB\&double *\fR |
34 |
\fI\&C\fR, |
35 |
\fB\&const int\fR |
36 |
\fI\&LDC\fR |
37 |
\fB\&);\fR |
38 |
.SH DESCRIPTION |
39 |
\fB\&HPL_dgemm\fR |
40 |
performs one of the matrix-matrix operations |
41 |
|
42 |
C := alpha * op( A ) * op( B ) + beta * C |
43 |
|
44 |
where op( X ) is one of |
45 |
|
46 |
op( X ) = X or op( X ) = X^T. |
47 |
|
48 |
Alpha and beta are scalars, and A, B and C are matrices, with op(A) |
49 |
an m by k matrix, op(B) a k by n matrix and C an m by n matrix. |
50 |
.SH ARGUMENTS |
51 |
.TP 8 |
52 |
ORDER (local input) const enum HPL_ORDER |
53 |
On entry, ORDER specifies the storage format of the operands |
54 |
as follows: |
55 |
ORDER = HplRowMajor, |
56 |
ORDER = HplColumnMajor. |
57 |
.TP 8 |
58 |
TRANSA (local input) const enum HPL_TRANS |
59 |
On entry, TRANSA specifies the form of op(A) to be used in |
60 |
the matrix-matrix operation follows: |
61 |
TRANSA==HplNoTrans : op( A ) = A, |
62 |
TRANSA==HplTrans : op( A ) = A^T, |
63 |
TRANSA==HplConjTrans : op( A ) = A^T. |
64 |
.TP 8 |
65 |
TRANSB (local input) const enum HPL_TRANS |
66 |
On entry, TRANSB specifies the form of op(B) to be used in |
67 |
the matrix-matrix operation follows: |
68 |
TRANSB==HplNoTrans : op( B ) = B, |
69 |
TRANSB==HplTrans : op( B ) = B^T, |
70 |
TRANSB==HplConjTrans : op( B ) = B^T. |
71 |
.TP 8 |
72 |
M (local input) const int |
73 |
On entry, M specifies the number of rows of the matrix |
74 |
op(A) and of the matrix C. M must be at least zero. |
75 |
.TP 8 |
76 |
N (local input) const int |
77 |
On entry, N specifies the number of columns of the matrix |
78 |
op(B) and the number of columns of the matrix C. N must be |
79 |
at least zero. |
80 |
.TP 8 |
81 |
K (local input) const int |
82 |
On entry, K specifies the number of columns of the matrix |
83 |
op(A) and the number of rows of the matrix op(B). K must be |
84 |
be at least zero. |
85 |
.TP 8 |
86 |
ALPHA (local input) const double |
87 |
On entry, ALPHA specifies the scalar alpha. When ALPHA is |
88 |
supplied as zero then the elements of the matrices A and B |
89 |
need not be set on input. |
90 |
.TP 8 |
91 |
A (local input) const double * |
92 |
On entry, A is an array of dimension (LDA,ka), where ka is |
93 |
k when TRANSA==HplNoTrans, and is m otherwise. Before |
94 |
entry with TRANSA==HplNoTrans, the leading m by k part of |
95 |
the array A must contain the matrix A, otherwise the leading |
96 |
k by m part of the array A must contain the matrix A. |
97 |
.TP 8 |
98 |
LDA (local input) const int |
99 |
On entry, LDA specifies the first dimension of A as declared |
100 |
in the calling (sub) program. When TRANSA==HplNoTrans then |
101 |
LDA must be at least max(1,m), otherwise LDA must be at least |
102 |
max(1,k). |
103 |
.TP 8 |
104 |
B (local input) const double * |
105 |
On entry, B is an array of dimension (LDB,kb), where kb is |
106 |
n when TRANSB==HplNoTrans, and is k otherwise. Before |
107 |
entry with TRANSB==HplNoTrans, the leading k by n part of |
108 |
the array B must contain the matrix B, otherwise the leading |
109 |
n by k part of the array B must contain the matrix B. |
110 |
.TP 8 |
111 |
LDB (local input) const int |
112 |
On entry, LDB specifies the first dimension of B as declared |
113 |
in the calling (sub) program. When TRANSB==HplNoTrans then |
114 |
LDB must be at least max(1,k), otherwise LDB must be at least |
115 |
max(1,n). |
116 |
.TP 8 |
117 |
BETA (local input) const double |
118 |
On entry, BETA specifies the scalar beta. When BETA is |
119 |
supplied as zero then the elements of the matrix C need |
120 |
not be set on input. |
121 |
.TP 8 |
122 |
C (local input/output) double * |
123 |
On entry, C is an array of dimension (LDC,n). Before entry, |
124 |
the leading m by n part of the array C must contain the |
125 |
matrix C, except when beta is zero, in which case C need not |
126 |
be set on entry. On exit, the array C is overwritten by the |
127 |
m by n matrix ( alpha*op( A )*op( B ) + beta*C ). |
128 |
.TP 8 |
129 |
LDC (local input) const int |
130 |
On entry, LDC specifies the first dimension of C as declared |
131 |
in the calling (sub) program. LDC must be at least |
132 |
max(1,m). |
133 |
.SH EXAMPLE |
134 |
\fI\&#include "hpl.h"\fR |
135 |
|
136 |
int main(int argc, char *argv[]) |
137 |
.br |
138 |
{ |
139 |
.br |
140 |
double a[2*2], b[2*2], c[2*2]; |
141 |
.br |
142 |
a[0] = 1.0; a[1] = 2.0; a[2] = 3.0; a[3] = 3.0; |
143 |
.br |
144 |
b[0] = 2.0; b[1] = 1.0; b[2] = 1.0; b[3] = 2.0; |
145 |
.br |
146 |
c[0] = 4.0; c[1] = 3.0; c[2] = 2.0; c[3] = 1.0; |
147 |
.br |
148 |
HPL_dgemm( HplColumnMajor, HplNoTrans, HplNoTrans, |
149 |
.br |
150 |
2, 2, 2, 2.0, a, 2, b, 2, -1.0, c, 2 ); |
151 |
.br |
152 |
printf(" [%f,%f]\en", c[0], c[2]); |
153 |
.br |
154 |
printf("c=[%f,%f]\en", c[1], c[3]); |
155 |
.br |
156 |
exit(0); return(0); |
157 |
.br |
158 |
} |
159 |
.SH SEE ALSO |
160 |
.BR HPL_dtrsm \ (3). |