qpSWIFT
A Sparse Quadratic Programming Solver
GlobalOptions.h
1
#ifndef __QP_GLOBALOPTIONS_H__
2
#define __QP_GLOBALOPTIONS_H__
3
4
#ifdef __cplusplus
5
extern
"C"
6
{
7
#endif
8
9
#include <math.h>
10
14
#ifndef MAX
15
#define MAX(X, Y) ((X) < (Y) ? (Y) : (X))
16
#endif
17
18
#ifndef MIN
19
#define MIN(X, Y) ((X) > (Y) ? (Y) : (X))
20
#endif
21
22
#ifdef MATLAB_MEX_FILE
23
#include "mex.h"
24
#define MALLOC mxMalloc
25
#define FREE mxFree
26
#define PRINT mexPrintf
27
#else
28
#include <stdio.h>
29
#include "stdlib.h"
30
#define MALLOC malloc
31
#define FREE free
32
#define PRINT printf
33
#endif
34
36
#define qp_real double
37
39
#if (defined _WIN64)
40
#define qp_int __int64
41
#else
42
#define qp_int long
43
#endif
44
46
#define MAXIT (100)
47
#define RELTOL (1e-6)
48
#define ABSTOL (1e-6)
49
#define SIGMA (100)
50
#define VERBOSE (0)
54
#define QP_OPTIMAL (0)
55
#define QP_KKTFAIL (1)
56
#define QP_MAXIT (2)
57
#define QP_FATAL (3)
59
#define ROW_MAJOR_ORDERING (20)
60
#define COLUMN_MAJOR_ORDERING (30)
62
#define QP_PURE_NEWTON_STEP (0)
63
#define QP_CENTERING_CORRECTOR_STEP (1)
64
#define QP_CENTERING_STEP (2)
66
#ifdef __cplusplus
67
}
68
#endif
69
70
#endif
71
include
GlobalOptions.h
Generated by
1.8.17