141scan_intervals(type, ja, jb, n, ma, mb, q0, q1, col0, col1,
144 Int ja, jb, n, q0, q1, col0, col1;
148 Int offset, j0, j1, templatewidth0, templatewidth1, nbcol0, nbcol1;
150 assert(type ==
'c' || type ==
'r');
151 nbcol0 = (type ==
'c' ? ma->
nbcol : ma->
nbrow);
152 nbcol1 = (type ==
'c' ? mb->
nbcol : mb->
nbrow);
153 templatewidth0 = q0 * nbcol0;
154 templatewidth1 = q1 * nbcol1;
158 j0 =
SHIFT(col0, sp0, q0) * nbcol0 - ja;
159 j1 =
SHIFT(col1, sp1, q1) * nbcol1 - jb;
166 assert(j0 + nbcol0 > 0);
167 assert(j1 + nbcol1 > 0);
168 while ((j0 < n) && (j1 < n)) {
174 j0 += templatewidth0;
179 j1 += templatewidth1;
184 start =
max(start, 0);
186 result[offset].
lstart = l + start - j0;
187 end =
min(end0, end1);
189 j0 += templatewidth0;
193 j1 += templatewidth1;
203 result[offset].
len = end - start;