SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
zgesd2d_.c
Go to the documentation of this file.
1#include "Bdef.h"
2
3#if (INTFACE == C_CALL)
4void Czgesd2d(Int ConTxt, Int m, Int n, double *A, Int lda,
5 Int rdest, Int cdest)
6#else
7F_VOID_FUNC zgesd2d_(Int *ConTxt, Int *m, Int *n, double *A, Int *lda,
8 Int *rdest, Int *cdest)
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 * Locally-blocking point-to-point general double complex send.
18 *
19 * Arguments
20 * =========
21 *
22 * ConTxt (input) Ptr to Int
23 * Index into MyConTxts00 (my contexts array).
24 *
25 * M (input) Ptr to Int
26 * The number of rows of the matrix A. M >= 0.
27 *
28 * N (input) Ptr to Int
29 * The number of columns of the matrix A. N >= 0.
30 *
31 * A (input) Ptr to double complex two dimensional array
32 * The m by n matrix A. Fortran77 (column-major) storage
33 * assumed.
34 *
35 * LDA (input) Ptr to Int
36 * The leading dimension of the array A. LDA >= M.
37 *
38 * RDEST (input) Ptr to Int
39 * The process row of the destination process.
40 *
41 * CDEST (input) Ptr to Int
42 * The process column of the destination process.
43 *
44 * ------------------------------------------------------------------------
45 */
46{
47 void BI_ArgCheck(Int, Int, char *, char, char, char, Int, Int, Int, Int,
48 Int *, Int *);
49 MPI_Datatype BI_GetMpiGeType(BLACSCONTEXT *, Int, Int, Int,
50 MPI_Datatype, Int *);
51 BLACBUFF *BI_Pack(BLACSCONTEXT *, BVOID *, BLACBUFF *, MPI_Datatype);
57
58 Int dest, tlda, ierr;
59 BLACBUFF *bp;
60 BLACSCONTEXT *ctxt;
61 MPI_Datatype MatTyp;
63
64 MGetConTxt(Mpval(ConTxt), ctxt);
65#if (BlacsDebugLvl > 0)
66 BI_ArgCheck(Mpval(ConTxt), RT_SD, "ZGESD2D", 'a', 'u', 'u', Mpval(m),
67 Mpval(n), Mpval(lda), 1, Mpaddress(rdest), Mpaddress(cdest));
68#endif
69 if (Mpval(lda) < Mpval(m)) tlda = Mpval(m);
70 else tlda = Mpval(lda);
71 dest = Mvkpnum(ctxt, Mpval(rdest), Mpval(cdest));
72 ctxt->scp = &ctxt->pscp;
73
74 MatTyp = BI_GetMpiGeType(ctxt, Mpval(m), Mpval(n), tlda,
75 MPI_DOUBLE_COMPLEX, &BI_AuxBuff.N);
76#ifdef SndIsLocBlk
77 BI_AuxBuff.Buff = (char *) A;
78 BI_AuxBuff.dtype = MatTyp;
79 BI_Ssend(ctxt, dest, PT2PTID, &BI_AuxBuff);
80#else
81 bp = BI_Pack(ctxt, (BVOID *) A, NULL, MatTyp);
82 BI_Asend(ctxt, Mkpnum(ctxt, Mpval(rdest), Mpval(cdest)), PT2PTID, bp);
83#endif
84 ierr=BI_MPI_TYPE_FREE(&MatTyp);
85
86/*
87 * Having started the async send, update the buffers (reform links, check if
88 * active buffers have become inactive, etc.)
89 */
90#ifdef SndIsLocBlk
91 if (BI_ActiveQ) BI_UpdateBuffs(NULL);
92#else
94#endif
95} /* end of zgesd2d */
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
void BI_Asend(BLACSCONTEXT *ctxt, Int dest, Int msgid, BLACBUFF *bp)
Definition BI_Asend.c:3
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
BLACBUFF * BI_Pack(BLACSCONTEXT *ctxt, BVOID *A, BLACBUFF *bp, MPI_Datatype Dtype)
Definition BI_Pack.c:2
void BI_Ssend(BLACSCONTEXT *ctxt, Int dest, Int msgid, BLACBUFF *bp)
Definition BI_Ssend.c:3
void BI_UpdateBuffs(BLACBUFF *Newbp)
#define Int
Definition Bconfig.h:22
#define BI_MPI_TYPE_FREE(t)
Definition Bdef.h:305
#define Mvkpnum(ctxt, prow, pcol)
Definition Bdef.h:174
#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 RT_SD
Definition Bdef.h:105
#define PT2PTID
Definition Bdef.h:77
#define BVOID
Definition Bdef.h:136
void Czgesd2d()
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
F_VOID_FUNC zgesd2d_(Int *ConTxt, Int *m, Int *n, double *A, Int *lda, Int *rdest, Int *cdest)
Definition zgesd2d_.c:7