|
ScaLAPACK
2.0.2
ScaLAPACK: Scalable Linear Algebra PACKage
|
#include "Bdef.h"Go to the source code of this file.
Functions/Subroutines | |
| void | Cstrsd2d (int ConTxt, char *uplo, char *diag, int m, int n, float *A, int lda, int rdest, int cdest) |
| void Cstrsd2d | ( | int | ConTxt, |
| char * | uplo, | ||
| char * | diag, | ||
| int | m, | ||
| int | n, | ||
| float * | A, | ||
| int | lda, | ||
| int | rdest, | ||
| int | cdest | ||
| ) |
Definition at line 4 of file strsd2d_.c.
{
void BI_ArgCheck(int, int, char *, char, char, char, int, int, int, int,
int *, int *);
MPI_Datatype BI_GetMpiTrType(BLACSCONTEXT *, char, char, int, int, int,
MPI_Datatype, int *);
BLACBUFF *BI_Pack(BLACSCONTEXT *, BVOID *, BLACBUFF *, MPI_Datatype);
void BI_Ssend(BLACSCONTEXT *, int, int, BLACBUFF *);
void BI_Asend(BLACSCONTEXT *, int, int, BLACBUFF *);
void BI_UpdateBuffs(BLACBUFF *);
BLACBUFF *BI_GetBuff(int);
int BI_BuffIsFree(BLACBUFF *, int);
char tuplo, tdiag;
int dest, length, tlda, ierr;
BLACBUFF *bp;
BLACSCONTEXT *ctxt;
MPI_Datatype MatTyp;
extern BLACBUFF BI_AuxBuff, *BI_ActiveQ;
MGetConTxt(Mpval(ConTxt), ctxt);
tuplo = F2C_CharTrans(uplo);
tdiag = F2C_CharTrans(diag);
tuplo = Mlowcase(tuplo);
tdiag = Mlowcase(tdiag);
#if (BlacsDebugLvl > 0)
BI_ArgCheck(Mpval(ConTxt), RT_SD, "STRSD2D", 'a', tuplo, tdiag, Mpval(m),
Mpval(n), Mpval(lda), 1, Mpaddress(rdest), Mpaddress(cdest));
#endif
if (Mpval(lda) < Mpval(m)) tlda = Mpval(m);
else tlda = Mpval(lda);
dest = Mvkpnum(ctxt, Mpval(rdest), Mpval(cdest));
ctxt->scp = &ctxt->pscp;
MatTyp = BI_GetMpiTrType(ctxt, tuplo, tdiag, Mpval(m), Mpval(n), tlda,
MPI_FLOAT, &BI_AuxBuff.N);
#ifdef SndIsLocBlk
BI_AuxBuff.Buff = (char *) A;
BI_AuxBuff.dtype = MatTyp;
BI_Ssend(ctxt, dest, PT2PTID, &BI_AuxBuff);
#else
bp = BI_Pack(ctxt, (BVOID *) A, NULL, MatTyp);
BI_Asend(ctxt, Mkpnum(ctxt, Mpval(rdest), Mpval(cdest)), PT2PTID, bp);
#endif
ierr=BI_MPI_TYPE_FREE(&MatTyp);
/*
* Having started the async send, update the buffers (reform links, check if
* active buffers have become inactive, etc.)
*/
#ifdef SndIsLocBlk
if (BI_ActiveQ) BI_UpdateBuffs(NULL);
#else
BI_UpdateBuffs(bp);
#endif
} /* end of strsd2d */