14 #include "../PBpblas.h"
15 #include "../PBtools.h"
16 #include "../PBblacs.h"
17 #include "../PBblas.h"
21 int IOFFD,
char * ALPHA,
char * AC,
int LDAC,
22 char * BC,
int LDBC,
char * AR,
int LDAR,
char * BR,
23 int LDBR,
char * C,
int LDC )
25 void PB_Ctzsyr2k(
TYPE, UPLO, M, N, K, IOFFD, ALPHA, AC, LDAC, BC, LDBC,
26 AR, LDAR, BR, LDBR, C, LDC )
31 int IOFFD, K, LDAC, LDAR, LDBC, LDBR, LDC, M, N;
36 char * AC, * AR, * BC, * BR, * C;
174 int i1, j1, m1, mn, n1, size;
180 if( ( M <= 0 ) || ( N <= 0 ) )
return;
185 mn =
MAX( 0, -IOFFD );
186 if( ( n1 =
MIN( mn, N ) ) > 0 )
189 &LDAC, BR, &LDBR, one, C, &LDC );
191 &LDBC, AR, &LDAR, one, C, &LDC );
194 if( ( n1 =
MIN( n1, N ) - mn ) > 0 )
196 i1 = ( j1 = mn ) + IOFFD;
198 Mptr( AC, i1, 0, LDAC, size ), &LDAC,
Mptr( BC, i1, 0,
199 LDBC, size ), &LDBC, one,
Mptr( C, i1, j1, LDC, size ),
201 if( ( m1 = M - mn - n1 - IOFFD ) > 0 )
205 ALPHA,
Mptr( AC, i1, 0, LDAC, size ), &LDAC,
Mptr( BR,
206 0, j1, LDBR, size ), &LDBR, one,
Mptr( C, i1, j1, LDC,
209 ALPHA,
Mptr( BC, i1, 0, LDBC, size ), &LDBC,
Mptr( AR,
210 0, j1, LDAR, size ), &LDAR, one,
Mptr( C, i1, j1, LDC,
218 mn = M - IOFFD; mn =
MIN( mn, N );
219 if( ( n1 = mn -
MAX( 0, -IOFFD ) ) > 0 )
222 if( ( m1 =
MAX( 0, IOFFD ) ) > 0 )
225 AC, &LDAC, BR, &LDBR, one, C, &LDC );
227 BC, &LDBC, AR, &LDAR, one, C, &LDC );
230 Mptr( AC, m1, 0, LDAC, size ), &LDAC,
Mptr( BC, m1, 0,
231 LDBC, size ), &LDBC, one,
Mptr( C, m1, j1, LDC, size ),
234 if( ( n1 = N -
MAX( 0, mn ) ) > 0 )
238 &LDAC,
Mptr( BR, 0, j1, LDBR, size ), &LDBR, one,
Mptr( C, 0, j1,
241 &LDBC,
Mptr( AR, 0, j1, LDAR, size ), &LDAR, one,
Mptr( C, 0, j1,
247 one =
TYPE->one; gemm =
TYPE->Fgemm;
249 &LDAC, BR, &LDBR, one, C, &LDC );
251 &LDBC, AR, &LDAR, one, C, &LDC );