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,
complex **  pptrbuff,
complex 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 176 of file pctrmr2.c.

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