From ce1897b0740f1a6a998f2aa77b23ae0baca5ca57 Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Wed, 7 Feb 2024 21:09:52 -0500 Subject: [PATCH] Try to fix the compilation on Windows with Intel compilers --- src/blls/C/bllst.c | 12 ++---------- src/blls/C/bllstf.c | 12 ++---------- src/slls/C/sllst.c | 12 ++---------- src/slls/C/sllstf.c | 12 ++---------- 4 files changed, 8 insertions(+), 40 deletions(-) diff --git a/src/blls/C/bllst.c b/src/blls/C/bllst.c index af5f8e0c27..0cf57c4103 100644 --- a/src/blls/C/bllst.c +++ b/src/blls/C/bllst.c @@ -2,21 +2,13 @@ /* Full test for the BLLS C interface using C sparse matrix indexing */ #include +#include #include #include #include "galahad_precision.h" #include "galahad_cfunctions.h" #include "galahad_blls.h" -// define max - -#define max(a,b) \ -({ \ - __typeof__ (a) _a = (a); \ - __typeof__ (b) _b = (b); \ - _a > _b ? _a : _b; \ -}) - // Custom userdata struct struct userdata_type { real_wp_ scale; @@ -232,7 +224,7 @@ int main(void) { // reverse-communication input/output int on; - on = max( o, n ); + on = imax( o, n ); int eval_status, nz_v_start, nz_v_end, nz_p_end; int nz_v[on], nz_p[o], mask[o]; real_wp_ v[on], p[on]; diff --git a/src/blls/C/bllstf.c b/src/blls/C/bllstf.c index 268fa11651..6f76276326 100644 --- a/src/blls/C/bllstf.c +++ b/src/blls/C/bllstf.c @@ -2,21 +2,13 @@ /* Full test for the BLLS C interface using fortran sparse matrix indexing */ #include +#include #include #include #include "galahad_precision.h" #include "galahad_cfunctions.h" #include "galahad_blls.h" -// define max - -#define max(a,b) \ -({ \ - __typeof__ (a) _a = (a); \ - __typeof__ (b) _b = (b); \ - _a > _b ? _a : _b; \ -}) - // Custom userdata struct struct userdata_type { real_wp_ scale; @@ -231,7 +223,7 @@ int main(void) { // reverse-communication input/output int on; - on = max( o, n ); + on = imax( o, n ); int eval_status, nz_v_start, nz_v_end, nz_p_end; int nz_v[on], nz_p[o], mask[o]; real_wp_ v[on], p[on]; diff --git a/src/slls/C/sllst.c b/src/slls/C/sllst.c index 2a9614f06a..9a27f12e27 100644 --- a/src/slls/C/sllst.c +++ b/src/slls/C/sllst.c @@ -2,21 +2,13 @@ /* Full test for the SLLS C interface using C sparse matrix indexing */ #include +#include #include #include #include "galahad_precision.h" #include "galahad_cfunctions.h" #include "galahad_slls.h" -// define max - -#define max(a,b) \ -({ \ - __typeof__ (a) _a = (a); \ - __typeof__ (b) _b = (b); \ - _a > _b ? _a : _b; \ -}) - // Custom userdata struct struct userdata_type { real_wp_ scale; @@ -218,7 +210,7 @@ int main(void) { // reverse-communication input/output int on; - on = max( n, o ); + on = imax( n, o ); int eval_status, nz_v_start, nz_v_end, nz_p_end; int nz_v[on], nz_p[o], mask[o]; real_wp_ v[on], p[on]; diff --git a/src/slls/C/sllstf.c b/src/slls/C/sllstf.c index 8b4e877250..eedf843887 100644 --- a/src/slls/C/sllstf.c +++ b/src/slls/C/sllstf.c @@ -2,21 +2,13 @@ /* Full test for the SLLS C interface using fortran sparse matrix indexing */ #include +#include #include #include #include "galahad_precision.h" #include "galahad_cfunctions.h" #include "galahad_slls.h" -// define max - -#define max(a,b) \ -({ \ - __typeof__ (a) _a = (a); \ - __typeof__ (b) _b = (b); \ - _a > _b ? _a : _b; \ -}) - // Custom userdata struct struct userdata_type { real_wp_ scale; @@ -218,7 +210,7 @@ int main(void) { // reverse-communication input/output int on; - on = max( o, n ); + on = imax( o, n ); int eval_status, nz_v_start, nz_v_end, nz_p_end; int nz_v[on], nz_p[o], mask[o]; real_wp_ v[on], p[on];