1 #include "BSprivate.h"
2 
3 /*@ BSlocal_nnz - Returns the local number of nonzeros
4 
5     Input Parameters:
6 .   pA - the matrix
7 
8     Returns:
9 	the local number of nonzeros
10 
11 @*/
BSlocal_nnz(BSpar_mat * pA)12 int BSlocal_nnz(BSpar_mat *pA)
13 {
14 	int local_nnz;
15     local_nnz = 2*pA->local_nnz - pA->num_rows;
16 	return(local_nnz);
17 }
18 
19 /*@ BSglobal_nnz - Returns the global number of nonzeros
20 
21     Input Parameters:
22 .   pA - the matrix
23 .   procinfo - the usual processor info
24 
25     Returns:
26     the global number of nonzeros
27 
28 @*/
BSglobal_nnz(BSpar_mat * pA,BSprocinfo * procinfo)29 int BSglobal_nnz(BSpar_mat *pA, BSprocinfo *procinfo)
30 {
31 	int global_nnz, iwork;
32     global_nnz = 2*pA->local_nnz - pA->num_rows;
33     GISUM(&global_nnz,1,&iwork,procinfo->procset);
34 	return(global_nnz);
35 
36 }
37 
38 /*@ BSlocal_num_inodes - Returns the local number of i-nodes
39 
40     Input Parameters:
41 .   pA - the matrix
42 
43     Returns:
44 	the local number of i-nodes
45 
46 @*/
BSlocal_num_inodes(BSpar_mat * pA)47 int BSlocal_num_inodes(BSpar_mat *pA)
48 {
49 	return(pA->local_num_inodes);
50 }
51 
52 /*@ BSglobal_num_inodes - Returns the global number of i-nodes
53 
54     Input Parameters:
55 .   pA - the matrix
56 
57     Returns:
58     the global number of i-nodes
59 
60 @*/
BSglobal_num_inodes(BSpar_mat * pA)61 int BSglobal_num_inodes(BSpar_mat *pA)
62 {
63 	return(pA->global_num_inodes);
64 
65 }
66 
67 /*@ BSlocal_num_cliques - Returns the local number of cliques
68 
69     Input Parameters:
70 .   pA - the matrix
71 
72     Returns:
73 	the local number of cliques
74 
75 @*/
BSlocal_num_cliques(BSpar_mat * pA)76 int BSlocal_num_cliques(BSpar_mat *pA)
77 {
78 	return(pA->local_num_cliques);
79 }
80 
81 /*@ BSglobal_num_cliques - Returns the global number of cliques
82 
83     Input Parameters:
84 .   pA - the matrix
85 
86     Returns:
87     the global number of cliques
88 
89 @*/
BSglobal_num_cliques(BSpar_mat * pA)90 int BSglobal_num_cliques(BSpar_mat *pA)
91 {
92 	return(pA->global_num_cliques);
93 
94 }
95 
96 /*@ BSnum_colors - Returns the number of colors
97 
98     Input Parameters:
99 .   pA - the matrix
100 
101     Returns:
102     the number of colors
103 
104 @*/
BSnum_colors(BSpar_mat * pA)105 int BSnum_colors(BSpar_mat *pA)
106 {
107 	return(pA->num_colors);
108 
109 }
110 
111