SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
sgerv2d_.c
Go to the documentation of this file.
1#include "Bdef.h"
2
3#if (INTFACE == C_CALL)
4void Csgerv2d(Int ConTxt, Int m, Int n, float *A, Int lda, Int rsrc, Int csrc)
5#else
6F_VOID_FUNC sgerv2d_(Int *ConTxt, Int *m, Int *n, float *A, Int *lda,
7 Int *rsrc, Int *csrc)
8#endif
9/*
10 * -- V1.1 BLACS routine --
11 * University of Tennessee, May 1, 1996
12 * Written by Clint Whaley.
13 *
14 * Purpose
15 * =======
16 * Globally-blocking point to point general real receive.
17 *
18 * Arguments
19 * =========
20 *
21 * ConTxt (input) Ptr to Int
22 * Index into MyConTxts00 (my contexts array).
23 *
24 * M (input) Ptr to Int
25 * The number of rows of the matrix A. M >= 0.
26 *
27 * N (input) Ptr to Int
28 * The number of columns of the matrix A. N >= 0.
29 *
30 * A (output) Ptr to real two dimensional array
31 * The m by n matrix A. Fortran77 (column-major) storage
32 * assumed.
33 *
34 * LDA (input) Ptr to Int
35 * The leading dimension of the array A. LDA >= M.
36 *
37 *
38 * RSRC (input) Ptr to Int
39 * The process row of the source of the matrix.
40 *
41 * CSRC (input) Ptr to Int
42 * The process column of the source of the matrix.
43 *
44 *
45 * ------------------------------------------------------------------------
46 */
47{
48/*
49 * Prototypes and variable declarations
50 */
51 void BI_ArgCheck(Int, Int, char *, char, char, char, Int, Int, Int, Int,
52 Int *, Int *);
53 MPI_Datatype BI_GetMpiGeType(BLACSCONTEXT *, Int, Int, Int,
54 MPI_Datatype, Int *);
55 void BI_Unpack(BLACSCONTEXT *, BVOID *, BLACBUFF *, MPI_Datatype);
60 Int tlda;
61 Int ierr;
62 MPI_Datatype MatTyp;
63 BLACSCONTEXT *ctxt;
65
66 MGetConTxt(Mpval(ConTxt), ctxt);
67#if (BlacsDebugLvl > 0)
68 BI_ArgCheck(Mpval(ConTxt), RT_RV, __FILE__, 'a', 'u', 'u', Mpval(m),
69 Mpval(n), Mpval(lda), 1, Mpaddress(rsrc), Mpaddress(csrc));
70#endif
71 if (Mpval(lda) < Mpval(m)) tlda = Mpval(m);
72 else tlda = Mpval(lda);
73 ctxt->scp = &ctxt->pscp;
74
75 MatTyp = BI_GetMpiGeType(ctxt, Mpval(m), Mpval(n), tlda,
76 MPI_FLOAT, &BI_AuxBuff.N);
77 BI_AuxBuff.Buff = (char *) A;
78 BI_AuxBuff.dtype = MatTyp;
79 BI_Srecv(ctxt, Mkpnum(ctxt, Mpval(rsrc), Mpval(csrc)), PT2PTID, &BI_AuxBuff);
80 ierr=BI_MPI_TYPE_FREE(&MatTyp);
81 if (BI_ActiveQ) BI_UpdateBuffs(NULL);
82}
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_GetMpiGeType(BLACSCONTEXT *ctxt, 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 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 BVOID
Definition Bdef.h:136
void Csgerv2d()
F_VOID_FUNC sgerv2d_(Int *ConTxt, Int *m, Int *n, float *A, Int *lda, Int *rsrc, Int *csrc)
Definition sgerv2d_.c:6
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