58{
59 void BI_ArgCheck(
Int,
Int,
char *,
char,
char,
char,
Int,
Int,
Int,
Int,
77
78
79
82 char ttop, tscope;
83 Int N, length, dest, tlda, trdest, ierr;
84 MPI_Op BlacComb;
87
93
94
95
96
97#ifdef DefCombTop
98 if (ttop == ' ') ttop = DefCombTop;
99#endif
100 if (
Mpval(cdest) == -1) trdest = -1;
101 else trdest =
Mpval(rdest);
102#if (BlacsDebugLvl > 0)
105#endif
107 else tlda =
Mpval(m);
108 switch(tscope)
109 {
110 case 'r':
112 if (trdest == -1) dest = -1;
113 else dest =
Mpval(cdest);
114 break;
115 case 'c':
117 dest = trdest;
118 break;
119 case 'a':
121 if (trdest == -1) dest = -1;
123 break;
124 default:
126 tscope);
127 }
128
129
130
131
132
133
134
135 if (ttop == ' ')
139
140
141
143 {
145 bp->
Buff = (
char *) A;
147 }
148
149
150
151 else
152 {
157 }
160
161 switch(ttop)
162 {
163 case ' ':
164 length = 1;
165 ierr=MPI_Op_create(
BI_zMPI_sum, length, &BlacComb);
166 if (dest != -1)
167 {
170 if (ctxt->
scp->
Iam == dest)
172 }
173 else
174 {
175 ierr=MPI_Allreduce(bp->
Buff, bp2->
Buff, bp->
N, bp->
dtype, BlacComb,
178 }
179 ierr=MPI_Op_free(&BlacComb);
181 return;
182 break;
183 case 'i':
185 break;
186 case 'd':
188 break;
189 case 's':
191 break;
192 case 'm':
194 break;
195 case '1':
196 case '2':
197 case '3':
198 case '4':
199 case '5':
200 case '6':
201 case '7':
202 case '8':
203 case '9':
205 break;
206 case 'f':
208 break;
209 case 't':
211 break;
212 case 'h':
213
214
215
218 else
220 break;
221 default :
223 ttop);
224 }
225
226
227
228
230 {
231 if ( (ctxt->
scp->
Iam == dest) || (dest == -1) )
234 }
235 else
236 {
239 }
240}
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)
void BI_BeComb(BLACSCONTEXT *ctxt, BLACBUFF *bp, BLACBUFF *bp2, Int N, VVFUNPTR Xvvop)
Int BI_BuffIsFree(BLACBUFF *bp, Int Wait)
BLACBUFF * BI_GetBuff(Int length)
MPI_Datatype BI_GetMpiGeType(BLACSCONTEXT *ctxt, Int m, Int n, Int lda, MPI_Datatype Dtype, Int *N)
void BI_MringComb(BLACSCONTEXT *ctxt, BLACBUFF *bp, BLACBUFF *bp2, Int N, VVFUNPTR Xvvop, Int dest, Int nrings)
BLACBUFF * BI_Pack(BLACSCONTEXT *ctxt, BVOID *A, BLACBUFF *bp, MPI_Datatype Dtype)
void BI_TreeComb(BLACSCONTEXT *ctxt, BLACBUFF *bp, BLACBUFF *bp2, Int N, VVFUNPTR Xvvop, Int dest, Int nbranches)
void BI_Unpack(BLACSCONTEXT *ctxt, BVOID *A, BLACBUFF *bp, MPI_Datatype Dtype)
void BI_UpdateBuffs(BLACBUFF *Newbp)
void BI_zMPI_sum(void *in, void *inout, MpiInt *N, MPI_Datatype *dtype)
void BI_zvvsum(Int N, char *vec1, char *vec2)
void BI_BlacsErr(Int ConTxt, Int line, char *file, char *form,...)
#define Mvkpnum(ctxt, prow, pcol)
#define MGetConTxt(Context, ctxtptr)
void(* VVFUNPTR)(Int, char *, char *)
#define BI_zvmcopy(m, n, A, lda, buff)
#define BI_zmvcopy(m, n, A, lda, buff)