SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ intersect()

static2 void intersect ( char *  uplo,
char *  diag,
Int  j,
Int  start,
Int  end,
Int  action,
Int ptrsizebuff,
double **  pptrbuff,
double *  ptrblock,
Int  m,
Int  n,
MDESC ma,
Int  ia,
Int  ja,
Int  templateheight0,
Int  templatewidth0,
MDESC mb,
Int  ib,
Int  jb,
Int  templateheight1,
Int  templatewidth1 
)

Definition at line 173 of file pdtrmr2.c.

192{
193 /* int un = 1; only when we use dcopy instead of memcpy */
194 double *ptrstart;
195 Int offset, nbline;
196 Int intervalsize;
197 assert(start < end);
198 assert(j >= 0 && j < n);
199 nbline =
200 insidemat(uplo, diag, start, j, m, n, &offset);
201 if (nbline <= 0)
202 return;
203 start += offset;
204 if (start >= end)
205 return;
206 intervalsize = min(end - start, nbline);
207 (*ptrsizebuff) += intervalsize;
208 switch (action) {
209 case SENDBUFF: /* fill buff with local elements to be sent */
210 ptrstart = ptrblock + localindice(start + ia, j + ja,
211 templateheight0, templatewidth0, ma);
212 memcpy((char *) (*pptrbuff), (char *) ptrstart,
213 intervalsize * sizeof(double));
214 /* dcopy_(&intervalsize, (char *) (ptrstart), &un, (char *) (*pptrbuff),
215 * &un); */
216 (*pptrbuff) += intervalsize;
217 break;
218 case RECVBUFF: /* fill local memory with the values received */
219 ptrstart = ptrblock + localindice(start + ib, j + jb,
220 templateheight1, templatewidth1, mb);
221 memcpy((char *) ptrstart, (char *) (*pptrbuff),
222 intervalsize * sizeof(double));
223 /* dcopy_(&intervalsize, (char *) (*pptrbuff), &un, (char *) (ptrstart),
224 * &un); */
225 (*pptrbuff) += intervalsize;
226 break;
227 case SIZEBUFF: /* computation of sizebuff */
228 break;
229 default:
230 printf("action is %d outside the scope of the case [0..2] !! \n ", action);
231 exit(0);
232 break;
233 }; /* switch (action) */
234}/* intersect() */
#define Int
Definition Bconfig.h:22
#define min(A, B)
Definition pdtrmr2.c:43
static2 Int insidemat(char *uplo, char *diag, Int i, Int j, Int m, Int n, Int *offset)
Definition pdtrmr2.c:138
#define SIZEBUFF
Definition pdtrmr2.c:97
#define SENDBUFF
Definition pdtrmr2.c:95
#define RECVBUFF
Definition pdtrmr2.c:96
Int localindice()
Here is the call graph for this function:
Here is the caller graph for this function: