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 141 of file pctrmr2.c.

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