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

◆ PB_Cspan()

Int PB_Cspan ( Int  N,
Int  I,
Int  INB,
Int  NB,
Int  SRCPROC,
Int  NPROCS 
)

Definition at line 22 of file PB_Cspan.c.

28{
29/*
30* Purpose
31* =======
32*
33* PB_Cspan returns 1 if the rows (resp. columns) I:I+N-1 spans more
34* than one process row (resp. column) and 0 otherwise.
35*
36* Arguments
37* =========
38*
39* N (global input) INTEGER
40* On entry, N specifies the number of rows/columns being dealt
41* out. N must be at least zero.
42*
43* I (global input) INTEGER
44* On entry, I specifies the global index of the matrix entry.
45* I must be at least zero.
46*
47* INB (global input) INTEGER
48* On entry, INB specifies the size of the first block of the
49* global matrix distribution. INB must be at least one.
50*
51* NB (global input) INTEGER
52* On entry, NB specifies the size of the blocks used to parti-
53* tion the matrix. NB must be at least one.
54*
55* SRCPROC (global input) INTEGER
56* On entry, if SRCPROC = -1, the data is not distributed but
57* replicated, in which case this routine return 0.
58*
59* NPROCS (global input) INTEGER
60* On entry, NPROCS specifies the total number of process rows
61* or columns over which the matrix is distributed. NPROCS must
62* be at least one.
63*
64* -- Written on April 1, 1998 by
65* Antoine Petitet, University of Tennessee, Knoxville 37996, USA.
66*
67* ---------------------------------------------------------------------
68*/
69/* ..
70* .. Executable Statements ..
71*
72*/
73/*
74* If the data is replicated or if there is only one process in this dimension
75* of the process grid, the data does not span multiple processes. Finally, the
76* case where I belongs to the first block is handled separately.
77*/
78 return( ( SRCPROC >= 0 ) &&
79 ( ( NPROCS > 1 ) &&
80 ( ( I < INB ) ? ( I + N > INB ) :
81 ( I + N > INB + ( ( I - INB ) / NB + 1 ) * NB ) ) ) );
82/*
83* End of PB_Cspan
84*/
85}