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

◆ Mnnxtroc

#define Mnnxtroc (   np_,
  n_,
  i_,
  inb_,
  nb_,
  proc_,
  srcproc_,
  nprocs_ 
)

Definition at line 372 of file PBtools.h.

373 { \
374 if( ( (srcproc_) >= 0 ) && ( (nprocs_) > 1 ) ) \
375 { \
376 Int inb__, mydist__, n__, nblk__, quot__, rem__, src__; \
377 if( ( inb__ = (inb_) - (i_) ) <= 0 ) \
378 { \
379 src__ = (srcproc_) + ( nblk__ = (-inb__) / (nb_) + 1 ); \
380 src__ -= ( src__ / (nprocs_) ) * (nprocs_); \
381 inb__ += nblk__*(nb_); \
382 if( ( n__ = (n_) - inb__ ) <= 0 ) { np_ = 0; } \
383 else \
384 { \
385 if( ( mydist__ = (proc_) - src__ ) < 0 ) \
386 mydist__ += (nprocs_); \
387 nblk__ = n__ / (nb_) + 1; \
388 rem__ = nblk__ - \
389 ( quot__ = ( nblk__ / (nprocs_) ) ) * (nprocs_); \
390 if( mydist__ < rem__ ) \
391 { \
392 np_ = n__ - ( quot__ * mydist__ + \
393 quot__ + mydist__ ) * (nb_); \
394 } \
395 else \
396 { \
397 np_ = ( (nprocs_) - 1 - mydist__ ) * quot__ * (nb_); \
398 } \
399 } \
400 } \
401 else \
402 { \
403 if( ( n__ = (n_) - inb__ ) <= 0 ) { np_ = 0; } \
404 else \
405 { \
406 if( ( mydist__ = (proc_) - (srcproc_) ) < 0 ) \
407 mydist__ += (nprocs_); \
408 nblk__ = n__ / (nb_) + 1; \
409 rem__ = nblk__ - \
410 ( quot__ = ( nblk__ / (nprocs_) ) ) * (nprocs_); \
411 if( mydist__ < rem__ ) \
412 { \
413 np_ = n__ - ( quot__ * mydist__ + \
414 quot__ + mydist__ ) * (nb_); \
415 } \
416 else \
417 { \
418 np_ = ( (nprocs_) - 1 - mydist__ ) * quot__ * (nb_); \
419 } \
420 } \
421 } \
422 } \
423 else \
424 { np_ = 0; } \
425 }
#define Int
Definition Bconfig.h:22