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,
Int **  pptrbuff,
Int 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 pitrmr2.c.

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