Skip to content

Commit

Permalink
Try to fix the compilation on Windows with Intel compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Feb 8, 2024
1 parent b1c9522 commit ce1897b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 40 deletions.
12 changes: 2 additions & 10 deletions src/blls/C/bllst.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,13 @@
/* Full test for the BLLS C interface using C sparse matrix indexing */

#include <stdio.h>
#include <stdint.h>
#include <math.h>
#include <string.h>
#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;
Expand Down Expand Up @@ -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];
Expand Down
12 changes: 2 additions & 10 deletions src/blls/C/bllstf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,13 @@
/* Full test for the BLLS C interface using fortran sparse matrix indexing */

#include <stdio.h>
#include <stdint.h>
#include <math.h>
#include <string.h>
#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;
Expand Down Expand Up @@ -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];
Expand Down
12 changes: 2 additions & 10 deletions src/slls/C/sllst.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,13 @@
/* Full test for the SLLS C interface using C sparse matrix indexing */

#include <stdio.h>
#include <stdint.h>
#include <math.h>
#include <string.h>
#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;
Expand Down Expand Up @@ -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];
Expand Down
12 changes: 2 additions & 10 deletions src/slls/C/sllstf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,13 @@
/* Full test for the SLLS C interface using fortran sparse matrix indexing */

#include <stdio.h>
#include <stdint.h>
#include <math.h>
#include <string.h>
#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;
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit ce1897b

Please sign in to comment.