Skip to content

Commit

Permalink
Fixed DLONG bug on Windows. Disabled __int64
Browse files Browse the repository at this point in the history
  • Loading branch information
bstellato committed Apr 10, 2017
1 parent 9e47551 commit eb58c58
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 14 deletions.
4 changes: 0 additions & 4 deletions include/glob_opts.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,7 @@ extern "C" {

/* Use customized number representation ----------------------------------- */
#ifdef DLONG
#ifdef _WIN64
typedef __int64 c_int;
#else
typedef long c_int; /* for indeces */
#endif
#else
typedef int c_int; /* for indeces */
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
define_macros += [('IS_MAC', None)]


define_macros += [('DLONG', None)]
define_macros += [('EMBEDDED', EMBEDDED_FLAG)]
define_macros += [('PYTHON', None)]

Expand Down
2 changes: 1 addition & 1 deletion interfaces/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
PRINTING = True
PROFILING = True
DFLOAT = False
DLONG = False
DLONG = True
CTRLC = True


Expand Down
9 changes: 0 additions & 9 deletions lin_sys/direct/suitesparse/SuiteSparse_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,10 @@ extern "C" {

#ifndef SuiteSparse_long

#ifdef _WIN64

#define SuiteSparse_long __int64
#define SuiteSparse_long_max _I64_MAX
#define SuiteSparse_long_idd "I64d"

#else

#define SuiteSparse_long long
#define SuiteSparse_long_max LONG_MAX
#define SuiteSparse_long_idd "ld"

#endif
#define SuiteSparse_long_id "%" SuiteSparse_long_idd
#endif

Expand Down
1 change: 1 addition & 0 deletions roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- [x] Parameter Selection: `rho`, `sigma` and `alpha` from examples (data driven)
- [ ] Avoid square roots -> Use eps tests to the 2
- [ ] Add option in CODEGEN to have floats
- [x] Add functions to update matrices in Python and Matlab
- [x] Add functions to update matrices in codegen
- [x] Replace PySys_WriteStdout by PyErr_SetString(PyExc_ValueError, <message>)
Expand Down

0 comments on commit eb58c58

Please sign in to comment.