14 #include "../PBpblas.h"
15 #include "../PBtools.h"
16 #include "../PBblacs.h"
17 #include "../PBblas.h"
21 int IOFFD,
char * ALPHA,
char * XC,
int LDXC,
22 char * YC,
int LDYC,
char * XR,
int LDXR,
char * YR,
23 int LDYR,
char * A,
int LDA )
25 void PB_Ctzsyr2(
TYPE, UPLO, M, N, K, IOFFD, ALPHA, XC, LDXC, YC, LDYC,
26 XR, LDXR, YR, LDYR, A, LDA )
31 int IOFFD, K, LDA, LDXC, LDXR, LDYC, LDYR, M, N;
36 char * A, * XC, * XR, * YC, * YR;
173 int i1, ione=1, j1, m1, mn, n1, size;
179 if( ( M <= 0 ) || ( N <= 0 ) )
return;
183 size =
TYPE->size; geru =
TYPE->Fgeru;
184 mn =
MAX( 0, -IOFFD );
185 if( ( n1 =
MIN( mn, N ) ) > 0 )
187 geru( &M, &n1, ALPHA, XC, &ione, YR, &LDYR, A, &LDA );
188 geru( &M, &n1, ALPHA, YC, &ione, XR, &LDXR, A, &LDA );
191 if( ( n1 =
MIN( n1, N ) - mn ) > 0 )
193 i1 = ( j1 = mn ) + IOFFD;
195 size ), &ione,
Mptr( YR, 0, j1, LDYR, size ), &LDYR,
196 Mptr( A, i1, j1, LDA, size ), &LDA );
197 if( ( m1 = M - mn - n1 - IOFFD ) > 0 )
200 geru( &m1, &n1, ALPHA,
Mptr( XC, i1, 0, LDXC, size ),
201 &ione,
Mptr( YR, 0, j1, LDYR, size ), &LDYR,
202 Mptr( A, i1, j1, LDA, size ), &LDA );
203 geru( &m1, &n1, ALPHA,
Mptr( YC, i1, 0, LDYC, size ), &ione,
204 Mptr( XR, 0, j1, LDXR, size ), &LDXR,
Mptr( A, i1, j1, LDA,
211 size =
TYPE->size; geru =
TYPE->Fgeru;
212 mn = M - IOFFD; mn =
MIN( mn, N );
213 if( ( n1 = mn -
MAX( 0, -IOFFD ) ) > 0 )
216 if( ( m1 =
MAX( 0, IOFFD ) ) > 0 )
218 geru( &m1, &n1, ALPHA, XC, &ione, YR, &LDYR, A, &LDA );
219 geru( &m1, &n1, ALPHA, YC, &ione, XR, &LDXR, A, &LDA );
222 size ), &ione,
Mptr( YR, 0, j1, LDYR, size ), &LDYR,
223 Mptr( A, m1, j1, LDA, size ), &LDA );
225 if( ( n1 = N -
MAX( 0, mn ) ) > 0 )
228 geru( &M, &n1, ALPHA, XC, &ione,
Mptr( YR, 0, j1, LDYR, size ), &LDYR,
229 Mptr( A, 0, j1, LDA, size ), &LDA );
230 geru( &M, &n1, ALPHA, YC, &ione,
Mptr( XR, 0, j1, LDXR, size ), &LDXR,
231 Mptr( A, 0, j1, LDA, size ), &LDA );
237 geru( &M, &N, ALPHA, XC, &ione, YR, &LDYR, A, &LDA );
238 geru( &M, &N, ALPHA, YC, &ione, XR, &LDXR, A, &LDA );