SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
dtrrv2d_.c
Go to the documentation of this file.
1#include "Bdef.h"
2
3#if (INTFACE == C_CALL)
4void Cdtrrv2d(Int ConTxt, char *uplo, char *diag, Int m, Int n, double *A,
5 Int lda, Int rsrc, Int csrc)
6#else
7F_VOID_FUNC dtrrv2d_(Int *ConTxt, F_CHAR uplo, F_CHAR diag, Int *m, Int *n,
8 double *A, Int *lda, Int *rsrc, Int *csrc)
9#endif
10/*
11 * -- V1.1 BLACS routine --
12 * University of Tennessee, May 1, 1996
13 * Written by Clint Whaley.
14 *
15 * Purpose
16 * =======
17 * Globally-blocking point to point trapezoidal double precision receive.
18 *
19 * Arguments
20 * =========
21 *
22 * ConTxt (input) Ptr to Int
23 * Index into MyConTxts00 (my contexts array).
24 *
25 * UPLO (input) Ptr to char
26 * Specifies the part of the matrix to be sent.
27 * = 'U': Upper trapezoidal part
28 * ELSE : Lower trapezoidal part
29 *
30 * DIAG (input) Ptr to char
31 * Specifies whether the matrix is unit diagonal or not.
32 * = 'U': Matrix is unit diagonal, diagonal not communicated.
33 * ELSE : Matrix is not unit diagonal, diagonal is communicated.
34 *
35 * M (input) Ptr to Int
36 * The number of rows of the matrix A. M >= 0.
37 *
38 * N (input) Ptr to Int
39 * The number of columns of the matrix A. N >= 0.
40 *
41 * A (output) Ptr to double precision two dimensional array
42 * The m by n matrix A. Fortran77 (column-major) storage
43 * assumed.
44 * If UPLO = 'U', only the upper trapezoid is accessed;
45 * if UPLO = 'L', only the lower trapezoid is accessed.
46 *
47 * LDA (input) Ptr to Int
48 * The leading dimension of the array A. LDA >= M.
49 *
50 *
51 * RSRC (input) Ptr to Int
52 * The process row of the source of the matrix.
53 *
54 * CSRC (input) Ptr to Int
55 * The process column of the source of the matrix.
56 *
57 *
58 * ------------------------------------------------------------------------
59 */
60{
61/*
62 * Prototypes and variable declarations
63 */
64 void BI_ArgCheck(Int, Int, char *, char, char, char, Int, Int, Int, Int,
65 Int *, Int *);
66 MPI_Datatype BI_GetMpiTrType(BLACSCONTEXT *, char, char, Int, Int, Int,
67 MPI_Datatype, Int *);
68 void BI_Unpack(BLACSCONTEXT *, BVOID *, BLACBUFF *, MPI_Datatype);
73 Int tuplo, tdiag, tlda;
74 Int ierr, length;
75 BLACBUFF *bp;
76 MPI_Datatype MatTyp;
77 BLACSCONTEXT *ctxt;
79
80 MGetConTxt(Mpval(ConTxt), ctxt);
81 tdiag = F2C_CharTrans(diag);
82 tuplo = F2C_CharTrans(uplo);
83 tdiag = Mlowcase(tdiag);
84 tuplo = Mlowcase(tuplo);
85
86#if (BlacsDebugLvl > 0)
87 BI_ArgCheck(Mpval(ConTxt), RT_RV, __FILE__, 'a', tuplo, tdiag, Mpval(m),
88 Mpval(n), Mpval(lda), 1, Mpaddress(rsrc), Mpaddress(csrc));
89#endif
90 if (Mpval(lda) < Mpval(m)) tlda = Mpval(m);
91 else tlda = Mpval(lda);
92 ctxt->scp = &ctxt->pscp;
93
94 MatTyp = BI_GetMpiTrType(ctxt, tuplo, tdiag, Mpval(m), Mpval(n), tlda,
95 MPI_DOUBLE, &BI_AuxBuff.N);
96 BI_AuxBuff.Buff = (char *) A;
97 BI_AuxBuff.dtype = MatTyp;
98 BI_Srecv(ctxt, Mkpnum(ctxt, Mpval(rsrc), Mpval(csrc)), PT2PTID, &BI_AuxBuff);
99 ierr=BI_MPI_TYPE_FREE(&MatTyp);
100 if (BI_ActiveQ) BI_UpdateBuffs(NULL);
101}
void BI_ArgCheck(Int ConTxt, Int RoutType, char *routine, char scope, char uplo, char diag, Int m, Int n, Int lda, Int nprocs, Int *prows, Int *pcols)
Definition BI_ArgCheck.c:4
Int BI_BuffIsFree(BLACBUFF *bp, Int Wait)
BLACBUFF * BI_GetBuff(Int length)
Definition BI_GetBuff.c:37
MPI_Datatype BI_GetMpiTrType(BLACSCONTEXT *ctxt, char uplo, char diag, Int m, Int n, Int lda, MPI_Datatype Dtype, Int *N)
BLACBUFF * BI_ActiveQ
BLACBUFF BI_AuxBuff
void BI_Srecv(BLACSCONTEXT *ctxt, Int src, Int msgid, BLACBUFF *bp)
Definition BI_Srecv.c:3
void BI_Unpack(BLACSCONTEXT *ctxt, BVOID *A, BLACBUFF *bp, MPI_Datatype Dtype)
Definition BI_Unpack.c:3
void BI_UpdateBuffs(BLACBUFF *Newbp)
#define Int
Definition Bconfig.h:22
#define BI_MPI_TYPE_FREE(t)
Definition Bdef.h:305
#define F2C_CharTrans(c)
Definition Bdef.h:246
#define MGetConTxt(Context, ctxtptr)
Definition Bdef.h:200
#define F_VOID_FUNC
Definition Bdef.h:232
#define Mpaddress(para)
Definition Bdef.h:262
#define Mpval(para)
Definition Bdef.h:261
#define Mkpnum(ctxt, prow, pcol)
Definition Bdef.h:173
#define PT2PTID
Definition Bdef.h:77
#define RT_RV
Definition Bdef.h:106
#define Mlowcase(C)
Definition Bdef.h:145
#define BVOID
Definition Bdef.h:136
void Cdtrrv2d()
char * F_CHAR
Definition pblas.h:113
F_VOID_FUNC dtrrv2d_(Int *ConTxt, F_CHAR uplo, F_CHAR diag, Int *m, Int *n, double *A, Int *lda, Int *rsrc, Int *csrc)
Definition dtrrv2d_.c:7
Int N
Definition Bdef.h:61
MPI_Datatype dtype
Definition Bdef.h:60
char * Buff
Definition Bdef.h:56
BLACSSCOPE pscp
Definition Bdef.h:25
BLACSSCOPE * scp
Definition Bdef.h:26