Skip to content

Commit 994bca1

Browse files
authored
Deal with 32-bit SuiteSparse 7 (#372)
Accommodate 32-bit SuiteSparse Regenerate wrappers
1 parent ee419ae commit 994bca1

16 files changed

+13
-60
lines changed

gen/generator.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ auto_mutability = true
88

99
output_ignorelist = [
1010
# Clang.jl cannot handle these macro correctly, skip for now.
11+
"SuiteSparse_long",
12+
"SuiteSparse_long_max",
1113
"SuiteSparse_long_id",
1214
"CHOLMOD_CUBLAS_HANDLE",
1315
"CHOLMOD_CUDASTREAM",

src/solvers/LibSuiteSparse.jl

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,19 @@ const libspqr = :libspqr
88
# Special treatment for Win64 since Clong is 32-bit on Win64
99
# LONG_MAX is used everywhere, except on Win64
1010
# See discussion in https://github.com/DrTimothyAldenDavis/SuiteSparse/blob/master/SuiteSparse_config/SuiteSparse_config.h
11-
if Sys.iswindows() && Sys.ARCH === :x86_64
12-
const __int64 = Clonglong
13-
const _I64_MAX = typemax(Clonglong)
11+
# if Sys.iswindows() && Sys.ARCH === :x86_64
12+
# const __int64 = Clonglong
13+
# const _I64_MAX = typemax(Clonglong)
14+
# else
15+
# const LONG_MAX = typemax(Clong)
16+
# end
17+
18+
if Sys.WORD_SIZE == 64
19+
const SuiteSparse_long = Clonglong
1420
else
15-
const LONG_MAX = typemax(Clong)
21+
const SuiteSparse_long = Clong
1622
end
23+
const SuiteSparse_long_max = typemax(SuiteSparse_long)
1724

1825
const TRUE = Int32(1)
1926
const FALSE = Int32(0)

src/solvers/lib/aarch64-apple-darwin20.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2405,10 +2405,6 @@ const CHOLMOD_SUBSUB_VERSION = 3
24052405

24062406
const _FILE_OFFSET_BITS = 64
24072407

2408-
const SuiteSparse_long = int64_t
2409-
2410-
const SuiteSparse_long_max = INT64_MAX
2411-
24122408
const SUITESPARSE_OPENMP_MAX_THREADS = 1
24132409

24142410
const SUITESPARSE_OPENMP_GET_NUM_THREADS = 1

src/solvers/lib/aarch64-linux-gnu.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2405,10 +2405,6 @@ const CHOLMOD_SUBSUB_VERSION = 3
24052405

24062406
const _FILE_OFFSET_BITS = 64
24072407

2408-
const SuiteSparse_long = int64_t
2409-
2410-
const SuiteSparse_long_max = INT64_MAX
2411-
24122408
const SUITESPARSE_OPENMP_MAX_THREADS = 1
24132409

24142410
const SUITESPARSE_OPENMP_GET_NUM_THREADS = 1

src/solvers/lib/aarch64-linux-musl.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2405,10 +2405,6 @@ const CHOLMOD_SUBSUB_VERSION = 3
24052405

24062406
const _FILE_OFFSET_BITS = 64
24072407

2408-
const SuiteSparse_long = int64_t
2409-
2410-
const SuiteSparse_long_max = INT64_MAX
2411-
24122408
const SUITESPARSE_OPENMP_MAX_THREADS = 1
24132409

24142410
const SUITESPARSE_OPENMP_GET_NUM_THREADS = 1

src/solvers/lib/armv7l-linux-gnueabihf.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2405,10 +2405,6 @@ const CHOLMOD_SUBSUB_VERSION = 3
24052405

24062406
const _FILE_OFFSET_BITS = 64
24072407

2408-
const SuiteSparse_long = int64_t
2409-
2410-
const SuiteSparse_long_max = INT64_MAX
2411-
24122408
const SUITESPARSE_OPENMP_MAX_THREADS = 1
24132409

24142410
const SUITESPARSE_OPENMP_GET_NUM_THREADS = 1

src/solvers/lib/armv7l-linux-musleabihf.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2405,10 +2405,6 @@ const CHOLMOD_SUBSUB_VERSION = 3
24052405

24062406
const _FILE_OFFSET_BITS = 64
24072407

2408-
const SuiteSparse_long = int64_t
2409-
2410-
const SuiteSparse_long_max = INT64_MAX
2411-
24122408
const SUITESPARSE_OPENMP_MAX_THREADS = 1
24132409

24142410
const SUITESPARSE_OPENMP_GET_NUM_THREADS = 1

src/solvers/lib/i686-linux-gnu.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2405,10 +2405,6 @@ const CHOLMOD_SUBSUB_VERSION = 3
24052405

24062406
const _FILE_OFFSET_BITS = 64
24072407

2408-
const SuiteSparse_long = int64_t
2409-
2410-
const SuiteSparse_long_max = INT64_MAX
2411-
24122408
const SUITESPARSE_OPENMP_MAX_THREADS = 1
24132409

24142410
const SUITESPARSE_OPENMP_GET_NUM_THREADS = 1

src/solvers/lib/i686-linux-musl.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2405,10 +2405,6 @@ const CHOLMOD_SUBSUB_VERSION = 3
24052405

24062406
const _FILE_OFFSET_BITS = 64
24072407

2408-
const SuiteSparse_long = int64_t
2409-
2410-
const SuiteSparse_long_max = INT64_MAX
2411-
24122408
const SUITESPARSE_OPENMP_MAX_THREADS = 1
24132409

24142410
const SUITESPARSE_OPENMP_GET_NUM_THREADS = 1

src/solvers/lib/i686-w64-mingw32.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2405,10 +2405,6 @@ const CHOLMOD_SUBSUB_VERSION = 3
24052405

24062406
const _FILE_OFFSET_BITS = 64
24072407

2408-
const SuiteSparse_long = int64_t
2409-
2410-
const SuiteSparse_long_max = INT64_MAX
2411-
24122408
const SUITESPARSE_OPENMP_MAX_THREADS = 1
24132409

24142410
const SUITESPARSE_OPENMP_GET_NUM_THREADS = 1

0 commit comments

Comments
 (0)