Skip to content

Commit 02b058b

Browse files
do not rely on GraphBLAS to compute single version int
1 parent 11b6e06 commit 02b058b

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

Example/Include/my_internal.h

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99

1010
// Example include file for a user library.
1111

12+
#ifndef MY_INTERNAL_H
13+
#define MY_INTERNAL_H
14+
15+
#undef VER3CODE
16+
#define VER3CODE(major,minor,sub) (((major)*1000ULL + (minor))*1000ULL + (sub))
17+
1218
// SuiteSparse include files for C/C++:
1319
#include "SuiteSparse_config.h"
1420
#if !defined (SUITESPARSE_VERSION) || \
@@ -54,15 +60,15 @@
5460
#if ! defined (NO_GRAPHBLAS)
5561
#include "GraphBLAS.h"
5662
#if !defined ( GxB_SUITESPARSE_GRAPHBLAS ) || \
57-
GxB_IMPLEMENTATION < GxB_VERSION(8,3,0)
63+
GxB_IMPLEMENTATION < GxB_VERSION (8,3,0)
5864
#error "This library requires SuiteSparse:GraphBLAS 8.3.0 or later"
5965
#endif
6066
#endif
6167

6268
#if ! defined (NO_LAGRAPH)
6369
#include "LAGraph.h"
64-
#if GxB_VERSION (LAGRAPH_VERSION_MAJOR,LAGRAPH_VERSION_MINOR, \
65-
LAGRAPH_VERSION_UPDATE) < GxB_VERSION(1,1,0)
70+
#if VER3CODE (LAGRAPH_VERSION_MAJOR,LAGRAPH_VERSION_MINOR, \
71+
LAGRAPH_VERSION_UPDATE) < VER3CODE(1,1,0)
6672
#error "This library requires LAGraph 1.1.0 or later"
6773
#endif
6874
#endif
@@ -83,8 +89,8 @@
8389
#endif
8490

8591
#include "SPEX.h"
86-
#if GxB_VERSION (SPEX_VERSION_MAJOR,SPEX_VERSION_MINOR, \
87-
SPEX_VERSION_SUB) < GxB_VERSION(2,3,0)
92+
#if VER3CODE (SPEX_VERSION_MAJOR,SPEX_VERSION_MINOR, SPEX_VERSION_SUB) \
93+
< VER3CODE(2,3,0)
8894
#error "This library requires SPEX 2.3.0 or later"
8995
#endif
9096

@@ -103,8 +109,8 @@
103109
#include "SuiteSparseQR.hpp"
104110

105111
#include "Mongoose.hpp"
106-
#if GxB_VERSION (Mongoose_VERSION_MAJOR,Mongoose_VERSION_MINOR, \
107-
Mongoose_VERSION_PATCH) < GxB_VERSION(3,3,0)
112+
#if VER3CODE (Mongoose_VERSION_MAJOR,Mongoose_VERSION_MINOR, \
113+
Mongoose_VERSION_PATCH) < VER3CODE(3,3,0)
108114
#error "This library requires Mongoose 3.3.0 or later"
109115
#endif
110116

@@ -115,3 +121,4 @@
115121

116122
#include "my.h"
117123

124+
#endif

0 commit comments

Comments
 (0)