1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
// Copyright (C) 2005, 2009 International Business Machines and others.
// All Rights Reserved.
// This code is published under the Eclipse Public License.
//
// Authors: Andreas Waechter IBM 2005-12-25
#ifndef __IPLAPACK_HPP__
#define __IPLAPACK_HPP__
#include "IpUtils.hpp"
#include "IpException.hpp"
namespace Ipopt
{
DECLARE_STD_EXCEPTION(LAPACK_NOT_INCLUDED);
/** Wrapper for LAPACK subroutine XPOTRS.
*
* Solving a linear system given a Cholesky factorization.
* We assume that the Cholesky factor is lower traiangular.
* @since 3.14.0
*/
IPOPTLIB_EXPORT void IpLapackPotrs(
Index ndim,
Index nrhs,
const Number* a,
Index lda,
Number* b,
Index ldb
);
/** Wrapper for LAPACK subroutine DPOTRS.
*
* Solving a linear system given a Cholesky factorization.
* We assume that the Cholesky factor is lower traiangular.
*
* @deprecated Use IpLapackPotrs() instead.
*/
IPOPT_DEPRECATED
inline void IpLapackDpotrs(
Index ndim,
Index nrhs,
const Number* a,
Index lda,
Number* b,
Index ldb
)
{
IpLapackPotrs(ndim, nrhs, a, lda, b, ldb);
}
/** Wrapper for LAPACK subroutine XPOTRF.
*
* Compute Cholesky factorization (lower triangular factor).
* info is the return value from the LAPACK routine.
* @since 3.14.0
*/
IPOPTLIB_EXPORT void IpLapackPotrf(
Index ndim,
Number* a,
Index lda,
Index& info
);
/** Wrapper for LAPACK subroutine DPOTRF.
*
* Compute Cholesky factorization (lower triangular factor).
* info is the return value from the LAPACK routine.
*
* @deprecated Use IpLapackPotrf() instead.
*/
IPOPT_DEPRECATED
inline void IpLapackDpotrf(
Index ndim,
Number* a,
Index lda,
Index& info
)
{
IpLapackPotrf(ndim, a, lda, info);
}
/** Wrapper for LAPACK subroutine XSYEV.
*
* Compute the Eigenvalue decomposition for a given matrix.
* If compute_eigenvectors is true, a will contain the eigenvectors
* in its columns on return.
* @since 3.14.0
*/
IPOPTLIB_EXPORT void IpLapackSyev(
bool compute_eigenvectors,
Index ndim,
Number* a,
Index lda,
Number* w,
Index& info
);
/** Wrapper for LAPACK subroutine DSYEV.
*
* Compute the Eigenvalue decomposition for a given matrix.
* If compute_eigenvectors is true, a will contain the eigenvectors
* in its columns on return.
*
* @deprecated Use IpLapackSyev() instead
*/
IPOPT_DEPRECATED
inline void IpLapackDsyev(
bool compute_eigenvectors,
Index ndim,
Number* a,
Index lda,
Number* w,
Index& info
)
{
IpLapackSyev(compute_eigenvectors, ndim, a, lda, w, info);
}
/** Wrapper for LAPACK subroutine XGETRF.
*
* Compute LU factorization.
* info is the return value from the LAPACK routine.
* @since 3.14.0
*/
IPOPTLIB_EXPORT void IpLapackGetrf(
Index ndim,
Number* a,
Index* ipiv,
Index lda,
Index& info
);
/** Wrapper for LAPACK subroutine DGETRF.
*
* Compute LU factorization.
* info is the return value from the LAPACK routine.
*
* @deprecated Use IpLapackGetrf() instead.
*/
IPOPT_DEPRECATED
inline void IpLapackDgetrf(
Index ndim,
Number* a,
Index* ipiv,
Index lda,
Index& info
)
{
IpLapackGetrf(ndim, a, ipiv, lda, info);
}
/** Wrapper for LAPACK subroutine XGETRS.
*
* Solving a linear system given a LU factorization.
* @since 3.14.0
*/
IPOPTLIB_EXPORT void IpLapackGetrs(
Index ndim,
Index nrhs,
const Number* a,
Index lda,
Index* ipiv,
Number* b,
Index ldb
);
/** Wrapper for LAPACK subroutine DGETRS.
*
* Solving a linear system given a LU factorization.
*
* @deprecated Use IpLapackGetrs() instead.
*/
IPOPT_DEPRECATED
inline void IpLapackDgetrs(
Index ndim,
Index nrhs,
const Number* a,
Index lda,
Index* ipiv,
Number* b,
Index ldb
)
{
IpLapackGetrs(ndim, nrhs, a, lda, ipiv, b, ldb);
}
/** Wrapper for LAPACK subroutine XPPSV.
*
* Solves a symmetric positive
* definite linear system in packed storage format (upper triangular).
* info is the return value from the LAPACK routine.
* @since 3.14.0
*/
IPOPTLIB_EXPORT void IpLapackPpsv(
Index ndim,
Index nrhs,
const Number* a,
Number* b,
Index ldb,
Index& info
);
/** Wrapper for LAPACK subroutine DPPSV.
*
* Solves a symmetric positive
* definite linear system in packed storage format (upper triangular).
* info is the return value from the LAPACK routine.
*
* @deprecated Use IpLapackPpsv() instead.
*/
IPOPT_DEPRECATED
inline void IpLapackDppsv(
Index ndim,
Index nrhs,
const Number* a,
Number* b,
Index ldb,
Index& info
)
{
IpLapackPpsv(ndim, nrhs, a, b, ldb, info);
}
} // namespace Ipopt
#endif