SCALAPACK
2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
PB_Cspan.c
Go to the documentation of this file.
1
/* ---------------------------------------------------------------------
2
*
3
* -- PBLAS auxiliary routine (version 2.0) --
4
* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
5
* and University of California, Berkeley.
6
* April 1, 1998
7
*
8
* ---------------------------------------------------------------------
9
*/
10
/*
11
* Include files
12
*/
13
#include "../pblas.h"
14
#include "../PBpblas.h"
15
#include "../PBtools.h"
16
#include "../PBblacs.h"
17
#include "../PBblas.h"
18
19
#ifdef __STDC__
20
Int
PB_Cspan
(
Int
N,
Int
I,
Int
INB,
Int
NB,
Int
SRCPROC,
Int
NPROCS )
21
#else
22
Int
PB_Cspan
( N, I, INB, NB, SRCPROC, NPROCS )
23
/*
24
* .. Scalar Arguments ..
25
*/
26
Int
I, INB, N, NB, NPROCS, SRCPROC;
27
#endif
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
}
Int
#define Int
Definition
Bconfig.h:22
PB_Cspan
Int PB_Cspan()
PBLAS
SRC
PTOOLS
PB_Cspan.c
Generated on Sun Jan 12 2025 15:58:39 for SCALAPACK by
1.9.8