14 #include "../PBpblas.h"
15 #include "../PBtools.h"
16 #include "../PBblacs.h"
17 #include "../PBblas.h"
21 char * TRANSA,
char * DIAG,
int M,
int N,
char * ALPHA,
22 char * A,
int IA,
int JA,
int * DESCA,
char * B,
int IB,
25 void PB_CptrsmAB(
TYPE, VARIANT, SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A,
26 IA, JA, DESCA, B, IB, JB, DESCB )
30 char * DIAG, * SIDE, * TRANSA, * UPLO, * VARIANT;
31 int IA, IB, JA, JB, M, N;
257 char conjg, * negone, * one, * talph, top, * zero;
258 int Afr, Bcol, Bcurcol, Bcurimb1, Bcurinb1, Bcurrow, Bfr, Bii,
259 Bimb, Bimb1, Binb, Binb1, Bjj, Bld, Bmb, Bmp, Bmp0, Bnb, Bnq,
260 Bnq0, Brow, WAfr, WAoff, WBfr, WBsum, ctxt, k, kb, kbb, kmax,
261 ktmp, lside, mn, mycol, myrow, notran, npcol, nprow, size,
270 char * Aptr = NULL, * Bptr = NULL, * Bptr0 = NULL, * WA = NULL,
279 size =
TYPE->size; negone =
TYPE->negone; one =
TYPE->one;
280 zero =
TYPE->zero; gsum2d =
TYPE->Cgsum2d; gemm =
TYPE->Fgemm;
290 Bimb = DESCB[
IMB_]; Binb = DESCB[
INB_];
291 Bmb = DESCB[
MB_ ]; Bnb = DESCB[
NB_ ]; Bld = DESCB[
LLD_];
292 PB_Cinfog2l( IB, JB, DESCB, nprow, npcol, myrow, mycol, &Bii, &Bjj, &Brow,
296 Bmp0 =
PB_Cnumroc( M, 0, Bimb1, Bmb, myrow, Brow, nprow );
298 Bnq0 =
PB_Cnumroc( N, 0, Binb1, Bnb, mycol, Bcol, npcol );
299 if( ( Bmp0 > 0 ) && ( Bnq0 > 0 ) ) Bptr0 =
Mptr( B, Bii, Bjj, Bld, size );
307 kmax = ( ( M - 1 ) / kb ) * kb;
309 for( k = kmax; k >= 0; k -= kb )
311 kbb = M - k; kbb =
MIN( kbb, kb ); ktmp = k + kbb;
316 DESCA,
COLUMN, &Aptr, DBUFA, &Afr );
320 PB_Cdescset( Bd0, ktmp, N, Bimb1, Binb1, Bmb, Bnb, Brow, Bcol,
322 PB_CInV(
TYPE,
NOCONJG,
COLUMN, ktmp, N, Bd0, kbb, Aptr, 0, 0,
323 DBUFA,
COLUMN, &WA, WAd, &WAfr );
327 PB_CptrsmAB0(
TYPE, SIDE, UPLO, DIAG, kbb, N, talph, WA, k, 0,
328 WAd, B, IB+k, JB, DESCB, &Bptr, DBUFB, &Bfr );
337 PB_Cdescset( Bd0, k, N, Bimb1, Binb1, Bmb, Bnb, Brow, Bcol,
339 PB_CInV(
TYPE,
NOCONJG,
ROW, k, N, Bd0, kbb, Bptr, 0, 0,
340 DBUFB,
ROW, &WB, WBd, &WBfr );
344 Bmp =
PB_Cnumroc( k, 0, Bimb1, Bmb, myrow, Brow, nprow );
345 if( ( Bmp > 0 ) && ( Bnq0 > 0 ) )
347 &kbb, negone, WA, &WAd[
LLD_], WB, &WBd[
LLD_], talph,
349 if( WBfr ) free( WB );
352 if( WAfr ) free( WA );
353 if( Bfr ) free( Bptr );
354 if( Afr ) free( Aptr );
359 for( k = 0; k < M; k += kb )
361 ktmp = M - k; kbb =
MIN( ktmp, kb );
366 DESCA,
COLUMN, &Aptr, DBUFA, &Afr );
371 Bcurrow =
PB_Cindxg2p( k, Bimb1, Bmb, Brow, Brow, nprow );
372 PB_Cdescset( Bd0, ktmp, N, Bcurimb1, Binb1, Bmb, Bnb, Bcurrow,
374 PB_CInV(
TYPE,
NOCONJG,
COLUMN, ktmp, N, Bd0, kbb, Aptr, 0, 0,
375 DBUFA,
COLUMN, &WA, WAd, &WAfr );
379 PB_CptrsmAB0(
TYPE, SIDE, UPLO, DIAG, kbb, N, talph, WA, 0, 0,
380 WAd, B, IB+k, JB, DESCB, &Bptr, DBUFB, &Bfr );
384 if( ( ktmp = ktmp - kbb ) > 0 )
389 Bcurimb1 =
PB_Cfirstnb( ktmp, IB+k+kbb, Bimb, Bmb );
390 Bcurrow =
PB_Cindxg2p( k+kbb, Bimb1, Bmb, Brow, Brow,
392 PB_Cdescset( Bd0, ktmp, N, Bcurimb1, Binb1, Bmb, Bnb, Bcurrow,
394 PB_CInV(
TYPE,
NOCONJG,
ROW, ktmp, N, Bd0, kbb, Bptr, 0, 0,
395 DBUFB,
ROW, &WB, WBd, &WBfr );
399 Bmp =
PB_Cnumroc( ktmp, k+kbb, Bimb1, Bmb, myrow, Brow,
401 if( ( Bmp > 0 ) && ( Bnq0 > 0 ) )
406 &kbb, negone,
Mptr( WA, WAoff, 0, WAd[
LLD_], size ),
408 Bmp0-Bmp, 0, Bld, size ), &Bld );
410 if( WBfr ) free( WB );
413 if( WAfr ) free( WA );
414 if( Bfr ) free( Bptr );
415 if( Afr ) free( Aptr );
423 for( k = 0; k < N; k += kb )
425 ktmp = N - k; kbb =
MIN( ktmp, kb );
430 DESCA,
ROW, &Aptr, DBUFA, &Afr );
435 Bcurcol =
PB_Cindxg2p( k, Binb1, Bnb, Bcol, Bcol, npcol );
436 PB_Cdescset( Bd0, M, ktmp, Bimb1, Bcurinb1, Bmb, Bnb, Brow,
437 Bcurcol, ctxt, Bld );
438 PB_CInV(
TYPE,
NOCONJG,
ROW, M, ktmp, Bd0, kbb, Aptr, 0, 0,
439 DBUFA,
ROW, &WA, WAd, &WAfr );
443 PB_CptrsmAB0(
TYPE, SIDE, UPLO, DIAG, M, kbb, talph, WA, 0, 0,
444 WAd, B, IB, JB+k, DESCB, &Bptr, DBUFB, &Bfr );
448 if( ( ktmp = ktmp - kbb ) > 0 )
453 Bcurinb1 =
PB_Cfirstnb( ktmp, JB+k+kbb, Binb, Bnb );
454 Bcurcol =
PB_Cindxg2p( k+kbb, Binb1, Bnb, Bcol, Bcol,
456 PB_Cdescset( Bd0, M, ktmp, Bimb1, Bcurinb1, Bmb, Bnb, Brow,
457 Bcurcol, ctxt, Bld );
458 PB_CInV(
TYPE,
NOCONJG,
COLUMN, M, ktmp, Bd0, kbb, Bptr, 0, 0,
459 DBUFB,
COLUMN, &WB, WBd, &WBfr );
463 Bnq =
PB_Cnumroc( ktmp, k+kbb, Binb1, Bnb, mycol, Bcol,
465 if( ( Bmp0 > 0 ) && ( Bnq > 0 ) )
470 &kbb, negone, WB, &WBd[
LLD_],
Mptr( WA, 0, WAoff,
472 0, Bnq0-Bnq, Bld, size ), &Bld );
474 if( WBfr ) free( WB );
477 if( WAfr ) free( WA );
478 if( Bfr ) free( Bptr );
479 if( Afr ) free( Aptr );
484 kmax = ( ( N - 1 ) / kb ) * kb;
486 for( k = kmax; k >= 0; k -= kb )
488 kbb = N - k; kbb =
MIN( kbb, kb ); ktmp = k + kbb;
493 DESCA,
ROW, &Aptr, DBUFA, &Afr );
497 PB_Cdescset( Bd0, M, ktmp, Bimb1, Binb1, Bmb, Bnb, Brow, Bcol,
499 PB_CInV(
TYPE,
NOCONJG,
ROW, M, ktmp, Bd0, kbb, Aptr, 0, 0,
500 DBUFA,
ROW, &WA, WAd, &WAfr );
504 PB_CptrsmAB0(
TYPE, SIDE, UPLO, DIAG, M, kbb, talph, WA, 0, k,
505 WAd, B, IB, JB+k, DESCB, &Bptr, DBUFB, &Bfr );
514 PB_Cdescset( Bd0, M, k, Bimb1, Binb1, Bmb, Bnb, Brow, Bcol,
516 PB_CInV(
TYPE,
NOCONJG,
COLUMN, M, k, Bd0, kbb, Bptr, 0, 0,
517 DBUFB,
COLUMN, &WB, WBd, &WBfr );
521 Bnq =
PB_Cnumroc( k, 0, Binb1, Bnb, mycol, Bcol, npcol );
522 if( ( Bmp0 > 0 ) && ( Bnq > 0 ) )
524 &kbb, negone, WB, &WBd[
LLD_], WA, &WAd[
LLD_], talph,
526 if( WBfr ) free( WB );
529 if( WAfr ) free( WA );
530 if( Bfr ) free( Bptr );
531 if( Afr ) free( Aptr );
552 kmax = ( ( M - 1 ) / kb ) * kb;
554 for( k = kmax; k >= 0; k -= kb )
556 kbb = M - k; kbb =
MIN( kbb, kb ); ktmp = k + kbb;
561 DESCA,
ROW, &Aptr, DBUFA, &Afr );
565 PB_Cdescset( Bd0, ktmp, N, Bimb1, Binb1, Bmb, Bnb, Brow, Bcol,
567 PB_CInV(
TYPE, &conjg,
COLUMN, ktmp, N, Bd0, kbb, Aptr, 0, 0,
568 DBUFA,
ROW, &WA, WAd, &WAfr );
573 0, WAd, B, IB+k, JB, DESCB, &Bptr, DBUFB,
583 PB_Cdescset( Bd0, k, N, Bimb1, Binb1, Bmb, Bnb, Brow, Bcol,
585 PB_CInV(
TYPE,
NOCONJG,
ROW, k, N, Bd0, kbb, Bptr, 0, 0,
586 DBUFB,
ROW, &WB, WBd, &WBfr );
590 Bmp =
PB_Cnumroc( k, 0, Bimb1, Bmb, myrow, Brow, nprow );
591 if( ( Bmp > 0 ) && ( Bnq0 > 0 ) )
593 &Bnq0, &kbb, negone, WA, &WAd[
LLD_], WB,
594 &WBd[
LLD_], talph, Bptr0, &Bld );
595 if( WBfr ) free( WB );
598 if( WAfr ) free( WA );
599 if( Bfr ) free( Bptr );
600 if( Afr ) free( Aptr );
608 for( k = 0; k < M; k += kb )
610 ktmp = M - k; kbb =
MIN( ktmp, kb );
615 DESCA,
ROW, &Aptr, DBUFA, &Afr );
620 Bcurrow =
PB_Cindxg2p( k, Bimb1, Bmb, Brow, Brow, nprow );
621 PB_Cdescset( Bd0, ktmp, N, Bcurimb1, Binb1, Bmb, Bnb, Bcurrow,
623 PB_CInV(
TYPE, &conjg,
COLUMN, ktmp, N, Bd0, kbb, Aptr, 0, 0,
624 DBUFA,
ROW, &WA, WAd, &WAfr );
629 0, WAd, B, IB+k, JB, DESCB, &Bptr, DBUFB,
634 if( ( ktmp = ktmp - kbb ) > 0 )
639 Bcurimb1 =
PB_Cfirstnb( ktmp, IB+k+kbb, Bimb, Bmb );
640 Bcurrow =
PB_Cindxg2p( k+kbb, Bimb1, Bmb, Brow, Brow,
642 PB_Cdescset( Bd0, ktmp, N, Bcurimb1, Binb1, Bmb, Bnb,
643 Bcurrow, Bcol, ctxt, Bld );
644 PB_CInV(
TYPE,
NOCONJG,
ROW, ktmp, N, Bd0, kbb, Bptr, 0, 0,
645 DBUFB,
ROW, &WB, WBd, &WBfr );
649 Bmp =
PB_Cnumroc( ktmp, k+kbb, Bimb1, Bmb, myrow, Brow,
651 if( ( Bmp > 0 ) && ( Bnq0 > 0 ) )
656 &Bnq0, &kbb, negone,
Mptr( WA, WAoff, 0,
658 talph,
Mptr( Bptr0, Bmp0-Bmp, 0, Bld, size ),
661 if( WBfr ) free( WB );
664 if( WAfr ) free( WA );
665 if( Bfr ) free( Bptr );
666 if( Afr ) free( Aptr );
677 for( k = 0; k < N; k += kb )
679 ktmp = N - k; kbb =
MIN( ktmp, kb );
684 DESCA,
COLUMN, &Aptr, DBUFA, &Afr );
689 Bcurcol =
PB_Cindxg2p( k, Binb1, Bnb, Bcol, Bcol, npcol );
690 PB_Cdescset( Bd0, M, ktmp, Bimb1, Bcurinb1, Bmb, Bnb, Brow,
691 Bcurcol, ctxt, Bld );
692 PB_CInV(
TYPE, &conjg,
ROW, M, ktmp, Bd0, kbb, Aptr, 0, 0,
693 DBUFA,
COLUMN, &WA, WAd, &WAfr );
698 0, WAd, B, IB, JB+k, DESCB, &Bptr, DBUFB,
703 if( ( ktmp = ktmp - kbb ) > 0 )
708 Bcurinb1 =
PB_Cfirstnb( ktmp, JB+k+kbb, Binb, Bnb );
709 Bcurcol =
PB_Cindxg2p( k+kbb, Binb1, Bnb, Bcol, Bcol,
711 PB_Cdescset( Bd0, M, ktmp, Bimb1, Bcurinb1, Bmb, Bnb, Brow,
712 Bcurcol, ctxt, Bld );
714 0, 0, DBUFB,
COLUMN, &WB, WBd, &WBfr );
718 Bnq =
PB_Cnumroc( ktmp, k+kbb, Binb1, Bnb, mycol, Bcol,
720 if( ( Bmp0 > 0 ) && ( Bnq > 0 ) )
725 &Bnq, &kbb, negone, WB, &WBd[
LLD_],
Mptr( WA, 0,
726 WAoff, WAd[
LLD_], size ), &WAd[
LLD_], talph,
727 Mptr( Bptr0, 0, Bnq0-Bnq, Bld, size ), &Bld );
729 if( WBfr ) free( WB );
732 if( WAfr ) free( WA );
733 if( Bfr ) free( Bptr );
734 if( Afr ) free( Aptr );
742 kmax = ( ( N - 1 ) / kb ) * kb;
744 for( k = kmax; k >= 0; k -= kb )
746 kbb = N - k; kbb =
MIN( kbb, kb ); ktmp = k + kbb;
751 DESCA,
COLUMN, &Aptr, DBUFA, &Afr );
755 PB_Cdescset( Bd0, M, ktmp, Bimb1, Binb1, Bmb, Bnb, Brow, Bcol,
757 PB_CInV(
TYPE, &conjg,
ROW, M, ktmp, Bd0, kbb, Aptr, 0, 0,
758 DBUFA,
COLUMN, &WA, WAd, &WAfr );
763 k, WAd, B, IB, JB+k, DESCB, &Bptr, DBUFB,
773 PB_Cdescset( Bd0, M, k, Bimb1, Binb1, Bmb, Bnb, Brow, Bcol,
775 PB_CInV(
TYPE,
NOCONJG,
COLUMN, M, k, Bd0, kbb, Bptr, 0, 0,
776 DBUFB,
COLUMN, &WB, WBd, &WBfr );
780 Bnq =
PB_Cnumroc( k, 0, Binb1, Bnb, mycol, Bcol, npcol );
781 if( ( Bmp0 > 0 ) && ( Bnq > 0 ) )
783 &Bnq, &kbb, negone, WB, &WBd[
LLD_], WA,
784 &WAd[
LLD_], talph, Bptr0, &Bld );
785 if( WBfr ) free( WB );
788 if( WAfr ) free( WA );
789 if( Bfr ) free( Bptr );
790 if( Afr ) free( Aptr );
810 DESCA,
COLUMN, &Aptr, DBUFA, &Afr );
814 PB_Cdescset( Bd0, Bimb1, N, Bimb1, Binb1, Bmb, Bnb, Brow, Bcol,
816 PB_CInV(
TYPE,
NOCONJG,
COLUMN, Bimb1, N, Bd0, Bimb1, Aptr, 0, 0,
817 DBUFA,
COLUMN, &WA, WAd, &WAfr );
821 if( ( ( Brow < 0 ) || ( myrow == Brow ) ) && ( Bnq0 > 0 ) )
824 &Bimb1, &Bnq0, ALPHA, WA, &WAd[
LLD_],
826 if( WAfr ) free( WA );
827 if( Afr ) free( Aptr );
831 for( k = Bimb1; k < M; k += kb )
833 kbb = M - k; kbb =
MIN( kbb, kb ); ktmp = k + kbb;
838 DESCA,
COLUMN, &Aptr, DBUFA, &Afr );
842 PB_Cdescset( Bd0, ktmp, N, Bimb1, Binb1, Bmb, Bnb, Brow, Bcol,
844 PB_CInV(
TYPE,
NOCONJG,
COLUMN, ktmp, N, Bd0, kbb, Aptr, 0, 0,
845 DBUFA,
COLUMN, &WA, WAd, &WAfr );
849 PB_COutV(
TYPE,
ROW,
INIT, ktmp, N, Bd0, kbb, &WB, WBd, &WBfr,
851 Bmp =
PB_Cnumroc( k, 0, Bimb1, Bmb, myrow, Brow, nprow );
852 if( ( Bnq0 > 0 ) && ( Bmp > 0 ) )
854 &Bmp, one, WA, &WAd[
LLD_], Bptr0, &Bld, zero, WB,
861 gsum2d( ctxt,
COLUMN, &top, kbb, Bnq0, WB, WBd[
LLD_],
869 WA, k, 0, WAd, B, IB+k, JB, DESCB, WB, WBd );
870 if( WBfr ) free( WB );
871 if( WAfr ) free( WA );
872 if( Afr ) free( Aptr );
886 JA+k, DESCA,
COLUMN, &Aptr, DBUFA, &Afr );
890 Bcurrow =
PB_Cindxg2p( k, Bimb1, Bmb, Brow, Brow, nprow );
891 PB_Cdescset( Bd0, Bcurimb1, N, Bcurimb1, Binb1, Bmb, Bnb,
892 Bcurrow, Bcol, ctxt, Bld );
894 0, 0, DBUFA,
COLUMN, &WA, WAd, &WAfr );
898 if( ( ( Brow < 0 ) || ( myrow == Bcurrow ) ) && ( Bnq0 > 0 ) )
901 &Bcurimb1, &Bnq0, ALPHA, WA, &WAd[
LLD_],
902 Mptr( Bptr0, Bmp0-Bcurimb1, 0, Bld, size ),
904 if( WAfr ) free( WA );
905 if( Afr ) free( Aptr );
906 if( ( mn = M - Bcurimb1 ) <= 0 )
return;
910 kmax = ( ( mn - 1 ) / kb ) * kb;
912 for( k = kmax; k >= 0; k -= kb )
914 ktmp = M - k; kbb = mn - k; kbb =
MIN( kbb, kb );
919 DESCA,
COLUMN, &Aptr, DBUFA, &Afr );
924 Bcurrow =
PB_Cindxg2p( k, Bimb1, Bmb, Brow, Brow, nprow );
925 PB_Cdescset( Bd0, ktmp, N, Bcurimb1, Binb1, Bmb, Bnb, Bcurrow,
927 PB_CInV(
TYPE,
NOCONJG,
COLUMN, ktmp, N, Bd0, kbb, Aptr, 0, 0,
928 DBUFA,
COLUMN, &WA, WAd, &WAfr );
932 PB_COutV(
TYPE,
ROW,
INIT, ktmp, N, Bd0, kbb, &WB, WBd, &WBfr,
934 Bmp =
PB_Cnumroc( ktmp-kbb, k+kbb, Bimb1, Bmb, myrow, Brow,
936 if( ( Bnq0 > 0 ) && ( Bmp > 0 ) )
941 &Bmp, one,
Mptr( WA, WAoff, 0, WAd[
LLD_], size ),
942 &WAd[
LLD_],
Mptr( Bptr0, Bmp0-Bmp, 0, Bld, size ),
943 &Bld, zero, WB, &WBd[
LLD_] );
950 gsum2d( ctxt,
COLUMN, &top, kbb, Bnq0, WB, WBd[
LLD_],
958 WA, 0, 0, WAd, B, IB+k, JB, DESCB, WB, WBd );
959 if( WBfr ) free( WB );
960 if( WAfr ) free( WA );
961 if( Afr ) free( Aptr );
980 JA+k, DESCA,
ROW, &Aptr, DBUFA, &Afr );
984 Bcurcol =
PB_Cindxg2p( k, Binb1, Bnb, Bcol, Bcol, npcol );
985 PB_Cdescset( Bd0, M, Bcurinb1, Bimb1, Bcurinb1, Bmb, Bnb, Brow,
986 Bcurcol, ctxt, Bld );
988 0, 0, DBUFA,
ROW, &WA, WAd, &WAfr );
992 if( ( ( Bcol < 0 ) || ( mycol == Bcurcol ) ) && ( Bmp0 > 0 ) )
995 &Bmp0, &Bcurinb1, ALPHA, WA, &WAd[
LLD_],
996 Mptr( Bptr0, 0, Bnq0-Bcurinb1, Bld, size ),
998 if( WAfr ) free( WA );
999 if( Afr ) free( Aptr );
1000 if( ( mn = N - Bcurinb1 ) <= 0 )
return;
1004 kmax = ( ( mn - 1 ) / kb ) * kb;
1006 for( k = kmax; k >= 0; k -= kb )
1008 ktmp = N - k; kbb = mn - k; kbb =
MIN( kbb, kb );
1013 DESCA,
ROW, &Aptr, DBUFA, &Afr );
1018 Bcurcol =
PB_Cindxg2p( k, Binb1, Bnb, Bcol, Bcol, npcol );
1019 PB_Cdescset( Bd0, M, ktmp, Bimb1, Bcurinb1, Bmb, Bnb, Brow,
1020 Bcurcol, ctxt, Bld );
1021 PB_CInV(
TYPE,
NOCONJG,
ROW, M, ktmp, Bd0, kbb, Aptr, 0, 0,
1022 DBUFA,
ROW, &WA, WAd, &WAfr );
1028 Bnq =
PB_Cnumroc( ktmp-kbb, k+kbb, Binb1, Bnb, mycol, Bcol,
1030 if( ( Bmp0 > 0 ) && ( Bnq > 0 ) )
1033 WAd[
CSRC_], npcol );
1035 &Bnq, one,
Mptr( Bptr0, 0, Bnq0-Bnq, Bld, size ),
1036 &Bld,
Mptr( WA, 0, WAoff, WAd[
LLD_], size ),
1037 &WAd[
LLD_], zero, WB, &WBd[
LLD_] );
1044 gsum2d( ctxt,
ROW, &top, Bmp0, kbb, WB, WBd[
LLD_],
1045 myrow, WBd[
CSRC_] );
1052 WA, 0, 0, WAd, B, IB, JB+k, DESCB, WB, WBd );
1053 if( WBfr ) free( WB );
1054 if( WAfr ) free( WA );
1055 if( Afr ) free( Aptr );
1064 DESCA,
ROW, &Aptr, DBUFA, &Afr );
1068 PB_Cdescset( Bd0, M, Binb1, Bimb1, Binb1, Bmb, Bnb, Brow, Bcol,
1070 PB_CInV(
TYPE,
NOCONJG,
ROW, M, Binb1, Bd0, Binb1, Aptr, 0, 0,
1071 DBUFA,
ROW, &WA, WAd, &WAfr );
1075 if( ( ( Bcol < 0 ) || ( mycol == Bcol ) ) && ( Bmp0 > 0 ) )
1078 &Bmp0, &Binb1, ALPHA, WA, &WAd[
LLD_],
1080 if( WAfr ) free( WA );
1081 if( Afr ) free( Aptr );
1085 for( k = Binb1; k < N; k += kb )
1087 kbb = N - k; kbb =
MIN( kbb, kb ); ktmp = k + kbb;
1092 DESCA,
ROW, &Aptr, DBUFA, &Afr );
1096 PB_Cdescset( Bd0, M, ktmp, Bimb1, Binb1, Bmb, Bnb, Brow, Bcol,
1098 PB_CInV(
TYPE,
NOCONJG,
ROW, M, ktmp, Bd0, kbb, Aptr, 0, 0,
1099 DBUFA,
ROW, &WA, WAd, &WAfr );
1105 Bnq =
PB_Cnumroc( k, 0, Binb1, Bnb, mycol, Bcol, npcol );
1106 if( ( Bmp0 > 0 ) && ( Bnq > 0 ) )
1108 &Bnq, one, Bptr0, &Bld, WA, &WAd[
LLD_], zero, WB,
1115 gsum2d( ctxt,
ROW, &top, Bmp0, kbb, WB, WBd[
LLD_],
1116 myrow, WBd[
CSRC_] );
1123 WA, 0, k, WAd, B, IB, JB+k, DESCB, WB, WBd );
1124 if( WAfr ) free( WA );
1125 if( Afr ) free( Aptr );
1126 if( WBfr ) free( WB );