Ipopt Documentation  
IpTypes.h
Go to the documentation of this file.
1 // Copyright (C) 2020 COIN-OR Foundation
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 
5 #ifndef __IPTYPES_H__
6 #define __IPTYPES_H__
7 
8 #include "IpoptConfig.h"
9 
10 #ifndef IPOPT_DEPRECATED
11 #if defined(_MSC_VER)
12 
15 # define IPOPT_DEPRECATED __declspec(deprecated)
16 #elif defined(__GNUC__)
17 
20 # define IPOPT_DEPRECATED __attribute__ ((deprecated))
21 #else
22 
25 # define IPOPT_DEPRECATED
26 #endif
27 #endif
28 
29 #ifdef __GNUC__
30 # define IPOPT_UNUSED __attribute__((unused))
31 #else
32 # define IPOPT_UNUSED
33 #endif
34 
35 #ifndef IPOPT_CALLCONV
36 #ifdef _MSC_VER
37 
38 #define IPOPT_CALLCONV __cdecl
39 #else
40 
41 #define IPOPT_CALLCONV
42 #endif
43 #endif
44 
48 #ifdef IPOPT_SINGLE
49 typedef float ipnumber;
50 #else
51 typedef double ipnumber;
52 #endif
53 
54 #ifdef IPOPT_INT64
55 #include <inttypes.h>
59 typedef int64_t ipindex;
63 #define IPOPT_INDEX_FORMAT PRId64
64 #else
65 
68 typedef int ipindex;
72 #define IPOPT_INDEX_FORMAT "d"
73 #endif
74 
79 typedef ipindex ipfint;
80 
81 #endif
double ipnumber
Type for floating-point numbers.
Definition: IpTypes.h:51
int ipindex
Type of all indices of vectors, matrices etc.
Definition: IpTypes.h:68
#define IPOPT_DEPRECATED
macro to declare symbols as deprecated
Definition: IpTypes.h:25
IPOPT_DEPRECATED typedef ipindex ipfint
Type of Fortran integer translated into C.
Definition: IpTypes.h:79