Skip to content

Commit f2a9968

Browse files
more fixes when LAGRAPH_SUITESPARSE is false
1 parent c023057 commit f2a9968

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

experimental/algorithm/LAGraph_Coarsen_Matching.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ This method requires O(n + e) space for an undirected graph with e edges and n n
8686

8787
#define F_INDEX_UNARY(f) ((void (*)(void *, const void *, GrB_Index, GrB_Index, const void *)) f)
8888

89+
#if LAGRAPH_SUITESPARSE
90+
8991
void valueeq_index_func (bool *z, const uint64_t *x, GrB_Index i, GrB_Index j, const void *y) {
9092
(*z) = ((*x) == i) ;
9193
}
@@ -244,6 +246,7 @@ static int LAGraph_Parent_to_S
244246
LG_FREE_WORK ;
245247
return (GrB_SUCCESS) ;
246248
}
249+
#endif
247250

248251

249252
#undef LG_FREE_ALL

experimental/algorithm/LG_CC_FastSV5.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151

5252
// FIXME: not ready for src; need a vanilla method with no GxB
5353

54+
#if LAGRAPH_SUITESPARSE
55+
5456
//------------------------------------------------------------------------------
5557
// hash functions: todo describe me
5658
//------------------------------------------------------------------------------
@@ -293,6 +295,8 @@ static inline int Reduce_assign32
293295
return (GrB_SUCCESS) ;
294296
}
295297

298+
#endif
299+
296300
//------------------------------------------------------------------------------
297301
// LG_CC_FastSV5
298302
//------------------------------------------------------------------------------

experimental/benchmark/mcm_demo.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
LAGraph_Free((void *)&X, NULL); \
4040
}
4141

42+
#if LAGRAPH_SUITESPARSE
43+
4244
GrB_Info check_matching(GrB_Matrix A, GrB_Vector mateC, char *msg)
4345
{
4446
GrB_Index nmatched = 0;
@@ -96,6 +98,7 @@ GrB_Info check_matching(GrB_Matrix A, GrB_Vector mateC, char *msg)
9698
GrB_Matrix_free(&M);
9799
return (GrB_SUCCESS);
98100
}
101+
#endif
99102

100103
#undef LG_FREE_ALL
101104
#define LG_FREE_ALL \
@@ -109,6 +112,8 @@ GrB_Info check_matching(GrB_Matrix A, GrB_Vector mateC, char *msg)
109112

110113
int main(int argc, char **argv)
111114
{
115+
#if LAGRAPH_SUITESPARSE
116+
112117
//--------------------------------------------------------------------------
113118
// declare inputs and outputs
114119
//--------------------------------------------------------------------------
@@ -268,5 +273,8 @@ int main(int argc, char **argv)
268273
LG_FREE_ALL;
269274

270275
LAGRAPH_TRY(LAGraph_Finalize(msg));
271-
return (GrB_SUCCESS);
276+
return (GrB_SUCCESS) ;
277+
#else
278+
return (GrB_NOT_IMPLEMENTED) ;
279+
#endif
272280
}

0 commit comments

Comments
 (0)