28 #ifndef SCS_GLB_H_GUARD
29 #define SCS_GLB_H_GUARD
41 #if(defined _WIN32 || defined _WIN64 || defined _WINDLL)
44 #define RESTRICT __restrict
48 #ifdef MATLAB_MEX_FILE
50 #define scs_printf mexPrintf
51 #define scs_free_ mxFree
52 #define scs_malloc_ mxMalloc
53 #define scs_calloc_ mxCalloc
57 #define scs_printf(...) \
59 PyGILState_STATE gilstate = PyGILState_Ensure(); \
60 PySys_WriteStdout(__VA_ARGS__); \
61 PyGILState_Release(gilstate); \
63 #define scs_free_ free
64 #define scs_malloc_ malloc
65 #define scs_calloc_ calloc
66 #elif(defined(USING_R))
69 #include <R_ext/Print.h>
70 #define scs_printf Rprintf
71 #define scs_free_ free
72 #define scs_malloc_ malloc
73 #define scs_calloc_ calloc
77 #define scs_printf printf
78 #define scs_free_ free
79 #define scs_malloc_ malloc
80 #define scs_calloc_ calloc
83 #define scs_free(x) if ((x)!=NULL) { scs_free_(x); x = SCS_NULL; }
84 #define scs_malloc(x) (((x) > 0) ? scs_malloc_(x) : SCS_NULL)
85 #define scs_calloc(x, y) scs_calloc_(x, y)
102 #define NAN ((scs_float)0x7ff8000000000000)
110 #define NAN ((float)0x7fc00000)
123 #define MAX(a, b) (((a) > (b)) ? (a) : (b))
130 #define MIN(a, b) (((a) < (b)) ? (a) : (b))
137 #define ABS(x) (((x) < 0) ? -(x) : (x))
144 #define SGN(x) (((x) >= 0) ? 1.0 : -1.0)
Definition: glbopts.h:212
Terminating information.
Definition: scs.h:539
enum direction_enum ScsDirectionType
Direction computation method (in SuperSCS)
direction_enum
Direction computation method (in SuperSCS)
Definition: glbopts.h:207
Definition: glbopts.h:224
Definition: glbopts.h:216
int scs_int
Definition: glbopts.h:96
Cone structure.
Definition: cones.h:48
double scs_float
Definition: glbopts.h:100
struct containing problem data
Definition: scs.h:254
Workspace for SCS.
Definition: scs.h:75
Definition: glbopts.h:220
Memory for the computation of directions (Broyden and Anderson's methods).
Definition: scs.h:60
Settings structure.
Definition: scs.h:290
Normalization variables.
Definition: scs.h:571
Primal-dual solution arrays.
Definition: scs.h:518