14 #include "../PBpblas.h"
15 #include "../PBtools.h"
16 #include "../PBblacs.h"
17 #include "../PBblas.h"
20 void PB_Cbinfo(
int OFFD,
int M,
int N,
int IMB1,
int INB1,
int MB,
21 int NB,
int MRROW,
int MRCOL,
int * LCMT00,
int * MBLKS,
22 int * NBLKS,
int * IMBLOC,
int * INBLOC,
int * LMBLOC,
23 int * LNBLOC,
int * ILOW,
int * LOW,
int * IUPP,
int * UPP )
25 void PB_Cbinfo( OFFD, M, N, IMB1, INB1, MB, NB, MRROW, MRCOL, LCMT00,
26 MBLKS, NBLKS, IMBLOC, INBLOC, LMBLOC, LNBLOC, ILOW, LOW,
31 int * ILOW, IMB1, * IMBLOC, INB1, * INBLOC, * IUPP,
32 * LCMT00, * LMBLOC, * LNBLOC, * LOW, M, MB, * MBLKS,
33 MRCOL, MRROW, N, NB, * NBLKS, OFFD, * UPP;
175 if( ( M <= 0 ) || ( N <= 0 ) )
181 *IUPP = ( MRROW ? MB - 1 : ( IMB1 > 0 ? IMB1 - 1 : 0 ) );
186 *ILOW = ( MRCOL ? 1 - NB : ( INB1 > 0 ? 1 - INB1 : 0 ) );
191 *LCMT00 += ( *LOW - *ILOW + MRCOL * NB ) - ( *IUPP - *UPP + MRROW * MB );
202 *IMBLOC =
MIN( M, MB );
204 *LCMT00 -= IMB1 - MB + MRROW * MB;
205 *MBLKS = ( M - 1 ) / MB + 1;
206 *LMBLOC = M - ( M / MB ) * MB;
207 if( !( *LMBLOC ) ) *LMBLOC = MB;
215 *INBLOC =
MIN( N, NB );
217 *LCMT00 += INB1 - NB + MRCOL * NB;
218 *NBLKS = ( N - 1 ) / NB + 1;
219 *LNBLOC = N - ( N / NB ) * NB;
220 if( !( *LNBLOC ) ) *LNBLOC = NB;
237 *NBLKS = ( tmp1 - 1 ) / NB + 2;
238 *LNBLOC = tmp1 - ( tmp1 / NB ) * NB;
239 if( !( *LNBLOC ) ) *LNBLOC = NB;
266 *MBLKS = ( tmp1 - 1 ) / MB + 2;
267 *LMBLOC = tmp1 - ( tmp1 / MB ) * MB;
268 if( !( *LMBLOC ) ) *LMBLOC = MB;
285 *INBLOC =
MIN( N, NB );
287 *LCMT00 += INB1 - NB + MRCOL * NB;
288 *NBLKS = ( N - 1 ) / NB + 1;
289 *LNBLOC = N - ( N / NB ) * NB;
290 if( !( *LNBLOC ) ) *LNBLOC = NB;
307 *NBLKS = ( tmp1 - 1 ) / NB + 2;
308 *LNBLOC = tmp1 - ( tmp1 / NB ) * NB;
309 if( !( *LNBLOC ) ) *LNBLOC = NB;