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

◆ insidemat()

static2 Int insidemat ( char *  uplo,
char *  diag,
Int  i,
Int  j,
Int  m,
Int  n,
Int offset 
)

Definition at line 138 of file pdtrmr2.c.

142{
143 /* tests outside mxn */
144 assert(j >= 0 && j < n);
145 assert(i >= 0);
146 if (toupper(*uplo) == 'U') {
147 Int nbline; /* number of lines in the j_th column */
148 Int virtualnbline; /* number of line if we were not limited by m */
149 *offset = 0;
150 virtualnbline = max(m - n, 0) + j + (toupper(*diag) == 'N');
151 nbline = min(virtualnbline, m);
152 return nbline - i;
153 } else {
154 Int firstline; /* first line in the j_th column */
155 Int diagcol; /* column where the diag begin */
156 Int virtualline; /* virtual first line if the matrix was extended with
157 * negative indices */
158 Int off;
159 diagcol = max(n - m, 0);;
160 virtualline = j - diagcol + (toupper(*diag) == 'U');
161 firstline = max(0, virtualline);
162 off = max(firstline - i, 0);
163 *offset = off;
164 i += off;
165 return m - i;
166 }
167}/* insidemat() */
#define Int
Definition Bconfig.h:22
#define max(A, B)
Definition pdtrmr2.c:42
#define min(A, B)
Definition pdtrmr2.c:43
Here is the caller graph for this function: