15void pbchkvect(
Int n,
Int npos0,
Int ix,
Int jx,
Int desc_X[],
Int incx,
Int dpos0,
Int *iix,
Int *jjx,
Int *ixrow,
108 Int descpos, ExtraColBlock, ExtraRowBlock, icpos, ixpos,
109 jxpos, MyColBlock, MyColDist, MyRowBlock, MyRowDist,
110 NColBlock, np, npos, nq, NRowBlock;
141 *info =
MIN( *info, npos );
143 *info =
MIN( *info, ixpos );
145 *info =
MIN( *info, jxpos );
146 else if( desc_X[
MB_] < 1 )
147 *info =
MIN( *info, descpos +
MB_ );
148 else if( desc_X[
NB_] < 1 )
149 *info =
MIN( *info, descpos +
NB_ );
150 else if( ( desc_X[
RSRC_] < 0 ) || ( desc_X[
RSRC_] >= nprow ) )
151 *info =
MIN( *info, descpos +
RSRC_ );
152 else if( ( desc_X[
CSRC_] < 0 ) || ( desc_X[
CSRC_] >= npcol ) )
153 *info =
MIN( *info, descpos +
CSRC_ );
154 else if( incx != 1 && incx != desc_X[
M_] )
155 *info =
MIN( *info, icpos );
156 else if( desc_X[
LLD_] < 1 )
157 *info =
MIN( *info, descpos +
LLD_ );
165 *info =
MIN( *info, descpos +
M_ );
167 *info =
MIN( *info, descpos +
N_ );
175 *info =
MIN( *info, descpos +
M_ );
176 else if( desc_X[
N_] < 1 )
177 *info =
MIN( *info, descpos +
N_ );
178 else if( ( incx == desc_X[
M_] ) && ( jx+n-1 > desc_X[
N_] ) )
179 *info =
MIN( *info, jxpos );
180 else if( ( incx == 1 ) && ( incx != desc_X[
M_] ) &&
181 ( ix+n-1 > desc_X[
M_] ) )
182 *info =
MIN( *info, ixpos );
185 if( ix > desc_X[
M_] )
186 *info =
MIN( *info, ixpos );
187 else if( jx > desc_X[
N_] )
188 *info =
MIN( *info, jxpos );
198 MyRowDist = ( myrow + nprow - desc_X[
RSRC_] ) % nprow;
199 MyColDist = ( mycol + npcol - desc_X[
CSRC_] ) % npcol;
200 NRowBlock = desc_X[
M_] / desc_X[
MB_];
201 NColBlock = desc_X[
N_] / desc_X[
NB_];
202 np = ( NRowBlock / nprow ) * desc_X[
MB_];
203 nq = ( NColBlock / npcol ) * desc_X[
NB_];
204 ExtraRowBlock = NRowBlock % nprow;
205 ExtraColBlock = NColBlock % npcol;
209 MyRowBlock = ix / desc_X[
MB_];
210 MyColBlock = jx / desc_X[
NB_];
211 *ixrow = ( MyRowBlock + desc_X[
RSRC_] ) % nprow;
212 *ixcol = ( MyColBlock + desc_X[
CSRC_] ) % npcol;
214 *iix = ( MyRowBlock / nprow + 1 ) * desc_X[
MB_] + 1;
215 *jjx = ( MyColBlock / npcol + 1 ) * desc_X[
NB_] + 1;
217 if( MyRowDist >= ( MyRowBlock % nprow ) )
219 if( myrow == *ixrow )
220 *iix += ix % desc_X[
MB_];
223 if( MyRowDist < ExtraRowBlock )
225 else if( MyRowDist == ExtraRowBlock )
226 np += ( desc_X[
M_] % desc_X[
MB_] );
229 if( MyColDist >= ( MyColBlock % npcol ) )
231 if( mycol == *ixcol )
232 *jjx += jx % desc_X[
NB_];
235 if( MyColDist < ExtraColBlock )
237 else if( MyColDist == ExtraColBlock )
238 nq += ( desc_X[
N_] % desc_X[
NB_] );
241 *iix =
MIN( *iix, np );
242 *jjx =
MIN( *jjx, nq );
244 if( desc_X[
LLD_] < np )
246 if( numroc_(&desc_X[
N_], &desc_X[
NB_], &mycol, &desc_X[
CSRC_], &npcol) )
247 *info = -( descpos +
LLD_ );
void pbchkvect(Int n, Int npos0, Int ix, Int jx, Int desc_X[], Int incx, Int dpos0, Int *iix, Int *jjx, Int *ixrow, Int *ixcol, Int nprow, Int npcol, Int myrow, Int mycol, Int *info)