Nektar++
Loading...
Searching...
No Matches
Lapack.hpp
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: Lapack.hpp
4//
5// For more information, please see: http://www.nektar.info
6//
7// The MIT License
8//
9// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10// Department of Aeronautics, Imperial College London (UK), and Scientific
11// Computing and Imaging Institute, University of Utah (USA).
12//
13// Permission is hereby granted, free of charge, to any person obtaining a
14// copy of this software and associated documentation files (the "Software"),
15// to deal in the Software without restriction, including without limitation
16// the rights to use, copy, modify, merge, publish, distribute, sublicense,
17// and/or sell copies of the Software, and to permit persons to whom the
18// Software is furnished to do so, subject to the following conditions:
19//
20// The above copyright notice and this permission notice shall be included
21// in all copies or substantial portions of the Software.
22//
23// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29// DEALINGS IN THE SOFTWARE.
30//
31// Description: wrapper of functions around standard LAPACK routines
32//
33///////////////////////////////////////////////////////////////////////////////
34#ifndef NEKTAR_LIB_UTILITIES_LAPACK_HPP
35#define NEKTAR_LIB_UTILITIES_LAPACK_HPP
36
38
39namespace Lapack
40{
41extern "C"
42{
43 // General matrix solve driver
44 void F77NAME(dgesv)(const int &n, const int &nrhs, double *a,
45 const int &lda, int *ipiv, double *b, const int &ldb,
46 int &info);
47 // Matrix factorisation and solves
48 void F77NAME(dsptrf)(const char &uplo, const int &n, double *ap, int *ipiv,
49 int &info);
50 void F77NAME(ssptrf)(const char &uplo, const int &n, float *ap, int *ipiv,
51 int &info);
52 void F77NAME(dsptrs)(const char &uplo, const int &n, const int &nrhs,
53 const double *ap, const int *ipiv, double *b,
54 const int &ldb, int &info);
55 void F77NAME(ssptrs)(const char &uplo, const int &n, const int &nrhs,
56 const float *ap, const int *ipiv, float *b,
57 const int &ldb, int &info);
58 void F77NAME(dsptri)(const char &uplo, const int &n, const double *ap,
59 const int *ipiv, double *work, int &info);
60 void F77NAME(ssptri)(const char &uplo, const int &n, const float *ap,
61 const int *ipiv, float *work, int &info);
62 void F77NAME(dtrtrs)(const char &uplo, const char &trans, const char &diag,
63 const int &n, const int &nrhs, const double *a,
64 const int &lda, double *b, const int &ldb, int &info);
65 void F77NAME(dtptrs)(const char &uplo, const char &trans, const char &diag,
66 const int &n, const int &nrhs, const double *a,
67 double *b, const int &ldb, int &info);
68 void F77NAME(dpptrf)(const char &uplo, const int &n, double *ap, int &info);
69 void F77NAME(dpptrs)(const char &uplo, const int &n, const int &nrhs,
70 const double *ap, double *b, const int &ldb,
71 int &info);
72 void F77NAME(dpbtrf)(const char &uplo, const int &n, const int &kd,
73 double *ab, const int &ldab, int &info);
74 void F77NAME(dpbtrs)(const char &uplo, const int &n, const int &kd,
75 const int &nrhs, const double *ab, const int &ldab,
76 double *b, const int &ldb, int &info);
77 void F77NAME(dgbtrf)(const int &m, const int &n, const int &kl,
78 const int &ku, double *a, const int &lda, int *ipiv,
79 int &info);
80 void F77NAME(dgbtrs)(const char &trans, const int &n, const int &kl,
81 const int &ku, const int &nrhs, const double *a,
82 const int &lda, const int *ipiv, double *b,
83 const int &ldb, int &info);
84 void F77NAME(dgetrf)(const int &m, const int &n, double *a, const int &lda,
85 int *ipiv, int &info);
86 void F77NAME(sgetrf)(const int &m, const int &n, float *a, const int &lda,
87 int *ipiv, int &info);
88 void F77NAME(dgetrs)(const char &trans, const int &n, const int &nrhs,
89 const double *a, const int &lda, int *ipiv, double *b,
90 const int &ldb, int &info);
91 void F77NAME(dgetri)(const int &n, double *a, const int &lda,
92 const int *ipiv, double *wk, const int &lwk,
93 int &info);
94 void F77NAME(sgetri)(const int &n, float *a, const int &lda,
95 const int *ipiv, float *wk, const int &lwk, int &info);
96 void F77NAME(dsterf)(const int &n, double *d, double *e, int &info);
97 void F77NAME(dgeev)(const char &uplo, const char &lrev, const int &n,
98 const double *a, const int &lda, double *wr, double *wi,
99 double *rev, const int &ldr, double *lev,
100 const int &ldv, double *work, const int &lwork,
101 int &info);
102 void F77NAME(sgeev)(const char &uplo, const char &lrev, const int &n,
103 const float *a, const int &lda, float *wr, float *wi,
104 float *rev, const int &ldr, float *lev, const int &ldv,
105 float *work, const int &lwork, int &info);
106 void F77NAME(dspev)(const char &jobz, const char &uplo, const int &n,
107 double *ap, double *w, double *z, const int &ldz,
108 double *work, int &info);
109 void F77NAME(dsbev)(const char &jobz, const char &uplo, const int &kl,
110 const int &ku, double *ap, const int &lda, double *w,
111 double *z, const int &ldz, double *work, int &info);
112 // SVD and Least Squares
113 void F77NAME(dgesvd)(const char &jobu, const char &jobvt, const int &m,
114 const int &n, double *a, const int &lda, double *s,
115 double *u, const int &ldu, double *vt, const int &ldvt,
116 double *work, const int &lwork, int &info);
117 void F77NAME(sgesvd)(const char &jobu, const char &jobvt, const int &m,
118 const int &n, float *a, const int &lda, float *s,
119 float *u, const int &ldu, float *vt, const int &ldvt,
120 float *work, const int &lwork, int &info);
121 void F77NAME(dgels)(const char &trans, const int &m, const int &n,
122 const int &nrhs, double *a, const int &lda, double *b,
123 const int &ldb, double *work, const int &lwork,
124 int &info);
125 void F77NAME(sgels)(const char &trans, const int &m, const int &n,
126 const int &nrhs, float *a, const int &lda, float *b,
127 const int &ldb, float *work, const int &lwork,
128 int &info);
129}
130
131static inline void Dgesv(const int &n, const int &nrhs, double *a,
132 const int &lda, int *ipiv, double *b, const int &ldb,
133 int &info)
134{
135 F77NAME(dgesv)(n, nrhs, a, lda, ipiv, b, ldb, info);
136}
137
138/// \brief factor a real packed-symmetric matrix using Bunch-Kaufman
139/// pivoting.
140static inline void DoSsptrf(const char &uplo, const int &n, double *ap,
141 int *ipiv, int &info)
142{
143 F77NAME(dsptrf)(uplo, n, ap, ipiv, info);
144}
145
146/// \brief factor a real packed-symmetric matrix using Bunch-Kaufman
147/// pivoting.
148static inline void DoSsptrf(const char &uplo, const int &n, float *ap,
149 int *ipiv, int &info)
150{
151 F77NAME(ssptrf)(uplo, n, ap, ipiv, info);
152}
153
154/// \brief factor a real packed-symmetric matrix using Bunch-Kaufman
155/// pivoting.
156static inline void Dsptrf(const char &uplo, const int &n, double *ap, int *ipiv,
157 int &info)
158{
159 F77NAME(dsptrf)(uplo, n, ap, ipiv, info);
160}
161
162/// \brief Solve a real packed-symmetric matrix problem using Bunch-Kaufman
163/// pivoting.
164static inline void DoSsptrs(const char &uplo, const int &n, const int &nrhs,
165 const double *ap, const int *ipiv, double *b,
166 const int &ldb, int &info)
167{
168 F77NAME(dsptrs)(uplo, n, nrhs, ap, ipiv, b, ldb, info);
169}
170
171/// \brief Solve a real packed-symmetric matrix problem using Bunch-Kaufman
172/// pivoting.
173static inline void DoSsptrs(const char &uplo, const int &n, const int &nrhs,
174 const float *ap, const int *ipiv, float *b,
175 const int &ldb, int &info)
176{
177 F77NAME(ssptrs)(uplo, n, nrhs, ap, ipiv, b, ldb, info);
178}
179
180/// \brief Solve a real packed-symmetric matrix problem using Bunch-Kaufman
181/// pivoting.
182static inline void Dsptrs(const char &uplo, const int &n, const int &nrhs,
183 const double *ap, const int *ipiv, double *b,
184 const int &ldb, int &info)
185{
186 F77NAME(dsptrs)(uplo, n, nrhs, ap, ipiv, b, ldb, info);
187}
188
189/// \brief Invert a real packed-symmetric matrix problem
190static inline void DoSsptri(const char &uplo, const int &n, const double *ap,
191 const int *ipiv, double *work, int &info)
192{
193 F77NAME(dsptri)(uplo, n, ap, ipiv, work, info);
194}
195
196/// \brief Invert a real packed-symmetric matrix problem
197static inline void DoSsptri(const char &uplo, const int &n, const float *ap,
198 const int *ipiv, float *work, int &info)
199{
200 F77NAME(ssptri)(uplo, n, ap, ipiv, work, info);
201}
202
203/// \brief Solve a triangular system.
204static inline void Dtrtrs(const char &uplo, const char &trans, const char &diag,
205 const int &n, const int &nrhs, const double *a,
206 const int &lda, double *b, const int &ldb, int &info)
207{
208 F77NAME(dtrtrs)(uplo, trans, diag, n, nrhs, a, lda, b, ldb, info);
209}
210
211/// \brief Solve a triangular system.
212static inline void Dtptrs(const char &uplo, const char &trans, const char &diag,
213 const int &n, const int &nrhs, const double *a,
214 double *b, const int &ldb, int &info)
215{
216 F77NAME(dtptrs)(uplo, trans, diag, n, nrhs, a, b, ldb, info);
217}
218
219/// \brief Invert a real packed-symmetric matrix problem
220static inline void Dsptri(const char &uplo, const int &n, const double *ap,
221 const int *ipiv, double *work, int &info)
222{
223 F77NAME(dsptri)(uplo, n, ap, ipiv, work, info);
224}
225
226/// \brief Cholesky factor a real positive definite packed-symmetric matrix.
227static inline void Dpptrf(const char &uplo, const int &n, double *ap, int &info)
228{
229 F77NAME(dpptrf)(uplo, n, ap, info);
230}
231
232/// \brief Solve a real positive definite symmetric matrix problem
233/// using Cholesky factorization.
234static inline void Dpptrs(const char &uplo, const int &n, const int &nrhs,
235 const double *ap, double *b, const int &ldb,
236 int &info)
237{
238 F77NAME(dpptrs)(uplo, n, nrhs, ap, b, ldb, info);
239}
240
241/// \brief Cholesky factorize a real positive definite
242/// banded-symmetric matrix
243static inline void Dpbtrf(const char &uplo, const int &n, const int &kd,
244 double *ab, const int &ldab, int &info)
245{
246 F77NAME(dpbtrf)(uplo, n, kd, ab, ldab, info);
247}
248
249/// \brief Solve a real, positive definite banded-symmetric matrix
250/// problem using Cholesky factorization.
251static inline void Dpbtrs(const char &uplo, const int &n, const int &kd,
252 const int &nrhs, const double *ab, const int &ldab,
253 double *b, const int &ldb, int &info)
254{
255 F77NAME(dpbtrs)(uplo, n, kd, nrhs, ab, ldab, b, ldb, info);
256}
257
258/// \brief General banded matrix LU factorisation
259static inline void Dgbtrf(const int &m, const int &n, const int &kl,
260 const int &ku, double *a, const int &lda, int *ipiv,
261 int &info)
262{
263 F77NAME(dgbtrf)(m, n, kl, ku, a, lda, ipiv, info);
264}
265
266/// \brief Solve general banded matrix using LU factorisation
267static inline void Dgbtrs(const char &trans, const int &n, const int &kl,
268 const int &ku, const int &nrhs, const double *a,
269 const int &lda, const int *ipiv, double *b,
270 const int &ldb, int &info)
271{
272 F77NAME(dgbtrs)(trans, n, kl, ku, nrhs, a, lda, ipiv, b, ldb, info);
273}
274
275/// \brief General matrix LU factorisation
276static inline void DoSgetrf(const int &m, const int &n, double *a,
277 const int &lda, int *ipiv, int &info)
278{
279 F77NAME(dgetrf)(m, n, a, lda, ipiv, info);
280}
281
282/// \brief General matrix LU factorisation
283static inline void DoSgetrf(const int &m, const int &n, float *a,
284 const int &lda, int *ipiv, int &info)
285{
286 F77NAME(sgetrf)(m, n, a, lda, ipiv, info);
287}
288
289/// \brief General matrix LU factorisation
290static inline void Dgetrf(const int &m, const int &n, double *a, const int &lda,
291 int *ipiv, int &info)
292{
293 F77NAME(dgetrf)(m, n, a, lda, ipiv, info);
294}
295
296/// \brief General matrix LU backsolve
297static inline void Dgetrs(const char &trans, const int &n, const int &nrhs,
298 const double *a, const int &lda, int *ipiv, double *b,
299 const int &ldb, int &info)
300{
301 F77NAME(dgetrs)(trans, n, nrhs, a, lda, ipiv, b, ldb, info);
302}
303
304/// \brief General matrix inverse
305static inline void DoSgetri(const int &n, double *a, const int &lda,
306 const int *ipiv, double *wk, const int &lwk,
307 int &info)
308{
309 F77NAME(dgetri)(n, a, lda, ipiv, wk, lwk, info);
310}
311
312/// \brief General matrix inverse
313static inline void DoSgetri(const int &n, float *a, const int &lda,
314 const int *ipiv, float *wk, const int &lwk,
315 int &info)
316{
317 F77NAME(sgetri)(n, a, lda, ipiv, wk, lwk, info);
318}
319
320/// \brief General matrix inverse
321static inline void Dgetri(const int &n, double *a, const int &lda,
322 const int *ipiv, double *wk, const int &lwk,
323 int &info)
324{
325 F77NAME(dgetri)(n, a, lda, ipiv, wk, lwk, info);
326}
327
328/// \brief Find eigenvalues of symmetric tridiagonal matrix
329static inline void Dsterf(const int &n, double *d, double *e, int &info)
330{
331 F77NAME(dsterf)(n, d, e, info);
332}
333
334/// \brief Solve general real matrix eigenproblem.
335static inline void DoSgeev(const char &uplo, const char &lrev, const int &n,
336 const double *a, const int &lda, double *wr,
337 double *wi, double *rev, const int &ldr, double *lev,
338 const int &ldv, double *work, const int &lwork,
339 int &info)
340{
342 (uplo, lrev, n, a, lda, wr, wi, rev, ldr, lev, ldv, work, lwork, info);
343}
344
345/// \brief Solve general real matrix eigenproblem.
346static inline void DoSgeev(const char &uplo, const char &lrev, const int &n,
347 const float *a, const int &lda, float *wr, float *wi,
348 float *rev, const int &ldr, float *lev,
349 const int &ldv, float *work, const int &lwork,
350 int &info)
351{
353 (uplo, lrev, n, a, lda, wr, wi, rev, ldr, lev, ldv, work, lwork, info);
354}
355
356/// \brief Solve general real matrix eigenproblem.
357static inline void Dgeev(const char &uplo, const char &lrev, const int &n,
358 const double *a, const int &lda, double *wr,
359 double *wi, double *rev, const int &ldr, double *lev,
360 const int &ldv, double *work, const int &lwork,
361 int &info)
362{
364 (uplo, lrev, n, a, lda, wr, wi, rev, ldr, lev, ldv, work, lwork, info);
365}
366
367/// \brief Solve packed-symmetric real matrix eigenproblem.
368static inline void Dspev(const char &jobz, const char &uplo, const int &n,
369 double *ap, double *w, double *z, const int &ldz,
370 double *work, int &info)
371{
372 F77NAME(dspev)(jobz, uplo, n, ap, w, z, ldz, work, info);
373}
374
375/// \brief Solve packed-banded real matrix eigenproblem.
376static inline void Dsbev(const char &jobz, const char &uplo, const int &kl,
377 const int &ku, double *ap, const int &lda, double *w,
378 double *z, const int &ldz, double *work, int &info)
379{
380 F77NAME(dsbev)(jobz, uplo, kl, ku, ap, lda, w, z, ldz, work, info);
381}
382
383/// \brief Singular Value Decomposition (SVD) of a real matrix (double
384/// precision)
385static inline void Dgesvd(const char &jobu, const char &jobvt, const int &m,
386 const int &n, double *a, const int &lda, double *s,
387 double *u, const int &ldu, double *vt,
388 const int &ldvt, double *work, const int &lwork,
389 int &info)
390{
392 (jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, info);
393}
394
395/// \brief Singular Value Decomposition (SVD) of a real matrix (single
396/// precision)
397static inline void Sgesvd(const char &jobu, const char &jobvt, const int &m,
398 const int &n, float *a, const int &lda, float *s,
399 float *u, const int &ldu, float *vt, const int &ldvt,
400 float *work, const int &lwork, int &info)
401{
403 (jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, info);
404}
405
406/// \brief Solve least squares/minimum norm problems for real matrices (double
407/// precision)
408static inline void Dgels(const char &trans, const int &m, const int &n,
409 const int &nrhs, double *a, const int &lda, double *b,
410 const int &ldb, double *work, const int &lwork,
411 int &info)
412{
413 F77NAME(dgels)(trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info);
414}
415
416/// \brief Solve least squares/minimum norm problems for real matrices (single
417/// precision)
418static inline void Sgels(const char &trans, const int &m, const int &n,
419 const int &nrhs, float *a, const int &lda, float *b,
420 const int &ldb, float *work, const int &lwork,
421 int &info)
422{
423 F77NAME(sgels)(trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info);
424}
425
426} // namespace Lapack
427#endif // NEKTAR_LIB_UTILITIES_LAPACK_HPP
#define F77NAME(x)
Fortran routines need an underscore.
Definition TransF77.hpp:46
void F77NAME() dsbev(const char &jobz, const char &uplo, const int &kl, const int &ku, double *ap, const int &lda, double *w, double *z, const int &ldz, double *work, int &info)
void F77NAME() dpbtrf(const char &uplo, const int &n, const int &kd, double *ab, const int &ldab, int &info)
static void Dspev(const char &jobz, const char &uplo, const int &n, double *ap, double *w, double *z, const int &ldz, double *work, int &info)
Solve packed-symmetric real matrix eigenproblem.
Definition Lapack.hpp:368
void F77NAME() dpptrf(const char &uplo, const int &n, double *ap, int &info)
void F77NAME() ssptrf(const char &uplo, const int &n, float *ap, int *ipiv, int &info)
static void Dpptrs(const char &uplo, const int &n, const int &nrhs, const double *ap, double *b, const int &ldb, int &info)
Solve a real positive definite symmetric matrix problem using Cholesky factorization.
Definition Lapack.hpp:234
static void Dgeev(const char &uplo, const char &lrev, const int &n, const double *a, const int &lda, double *wr, double *wi, double *rev, const int &ldr, double *lev, const int &ldv, double *work, const int &lwork, int &info)
Solve general real matrix eigenproblem.
Definition Lapack.hpp:357
void F77NAME() dgetrs(const char &trans, const int &n, const int &nrhs, const double *a, const int &lda, int *ipiv, double *b, const int &ldb, int &info)
void F77NAME() dgetri(const int &n, double *a, const int &lda, const int *ipiv, double *wk, const int &lwk, int &info)
static void Dgbtrf(const int &m, const int &n, const int &kl, const int &ku, double *a, const int &lda, int *ipiv, int &info)
General banded matrix LU factorisation.
Definition Lapack.hpp:259
void F77NAME() dgetrf(const int &m, const int &n, double *a, const int &lda, int *ipiv, int &info)
static void Dsptrs(const char &uplo, const int &n, const int &nrhs, const double *ap, const int *ipiv, double *b, const int &ldb, int &info)
Solve a real packed-symmetric matrix problem using Bunch-Kaufman pivoting.
Definition Lapack.hpp:182
static void Dsbev(const char &jobz, const char &uplo, const int &kl, const int &ku, double *ap, const int &lda, double *w, double *z, const int &ldz, double *work, int &info)
Solve packed-banded real matrix eigenproblem.
Definition Lapack.hpp:376
static void Dtrtrs(const char &uplo, const char &trans, const char &diag, const int &n, const int &nrhs, const double *a, const int &lda, double *b, const int &ldb, int &info)
Solve a triangular system.
Definition Lapack.hpp:204
void F77NAME() dgesvd(const char &jobu, const char &jobvt, const int &m, const int &n, double *a, const int &lda, double *s, double *u, const int &ldu, double *vt, const int &ldvt, double *work, const int &lwork, int &info)
static void DoSsptrf(const char &uplo, const int &n, double *ap, int *ipiv, int &info)
factor a real packed-symmetric matrix using Bunch-Kaufman pivoting.
Definition Lapack.hpp:140
void F77NAME() sgeev(const char &uplo, const char &lrev, const int &n, const float *a, const int &lda, float *wr, float *wi, float *rev, const int &ldr, float *lev, const int &ldv, float *work, const int &lwork, int &info)
static void Dgetrf(const int &m, const int &n, double *a, const int &lda, int *ipiv, int &info)
General matrix LU factorisation.
Definition Lapack.hpp:290
void F77NAME() dgeev(const char &uplo, const char &lrev, const int &n, const double *a, const int &lda, double *wr, double *wi, double *rev, const int &ldr, double *lev, const int &ldv, double *work, const int &lwork, int &info)
static void Dpptrf(const char &uplo, const int &n, double *ap, int &info)
Cholesky factor a real positive definite packed-symmetric matrix.
Definition Lapack.hpp:227
static void DoSsptri(const char &uplo, const int &n, const double *ap, const int *ipiv, double *work, int &info)
Invert a real packed-symmetric matrix problem.
Definition Lapack.hpp:190
static void Dsptri(const char &uplo, const int &n, const double *ap, const int *ipiv, double *work, int &info)
Invert a real packed-symmetric matrix problem.
Definition Lapack.hpp:220
static void Dgetrs(const char &trans, const int &n, const int &nrhs, const double *a, const int &lda, int *ipiv, double *b, const int &ldb, int &info)
General matrix LU backsolve.
Definition Lapack.hpp:297
void F77NAME() dsterf(const int &n, double *d, double *e, int &info)
static void Dsptrf(const char &uplo, const int &n, double *ap, int *ipiv, int &info)
factor a real packed-symmetric matrix using Bunch-Kaufman pivoting.
Definition Lapack.hpp:156
static void Dpbtrf(const char &uplo, const int &n, const int &kd, double *ab, const int &ldab, int &info)
Cholesky factorize a real positive definite banded-symmetric matrix.
Definition Lapack.hpp:243
void F77NAME() sgetri(const int &n, float *a, const int &lda, const int *ipiv, float *wk, const int &lwk, int &info)
void F77NAME() dsptri(const char &uplo, const int &n, const double *ap, const int *ipiv, double *work, int &info)
void F77NAME() dspev(const char &jobz, const char &uplo, const int &n, double *ap, double *w, double *z, const int &ldz, double *work, int &info)
void F77NAME() sgels(const char &trans, const int &m, const int &n, const int &nrhs, float *a, const int &lda, float *b, const int &ldb, float *work, const int &lwork, int &info)
static void Dgbtrs(const char &trans, const int &n, const int &kl, const int &ku, const int &nrhs, const double *a, const int &lda, const int *ipiv, double *b, const int &ldb, int &info)
Solve general banded matrix using LU factorisation.
Definition Lapack.hpp:267
static void DoSgetrf(const int &m, const int &n, double *a, const int &lda, int *ipiv, int &info)
General matrix LU factorisation.
Definition Lapack.hpp:276
static void Dgetri(const int &n, double *a, const int &lda, const int *ipiv, double *wk, const int &lwk, int &info)
General matrix inverse.
Definition Lapack.hpp:321
static void Sgesvd(const char &jobu, const char &jobvt, const int &m, const int &n, float *a, const int &lda, float *s, float *u, const int &ldu, float *vt, const int &ldvt, float *work, const int &lwork, int &info)
Singular Value Decomposition (SVD) of a real matrix (single precision)
Definition Lapack.hpp:397
void F77NAME() dgesv(const int &n, const int &nrhs, double *a, const int &lda, int *ipiv, double *b, const int &ldb, int &info)
static void DoSgetri(const int &n, double *a, const int &lda, const int *ipiv, double *wk, const int &lwk, int &info)
General matrix inverse.
Definition Lapack.hpp:305
void F77NAME() dgbtrs(const char &trans, const int &n, const int &kl, const int &ku, const int &nrhs, const double *a, const int &lda, const int *ipiv, double *b, const int &ldb, int &info)
static void Dsterf(const int &n, double *d, double *e, int &info)
Find eigenvalues of symmetric tridiagonal matrix.
Definition Lapack.hpp:329
void F77NAME() dgels(const char &trans, const int &m, const int &n, const int &nrhs, double *a, const int &lda, double *b, const int &ldb, double *work, const int &lwork, int &info)
void F77NAME() sgesvd(const char &jobu, const char &jobvt, const int &m, const int &n, float *a, const int &lda, float *s, float *u, const int &ldu, float *vt, const int &ldvt, float *work, const int &lwork, int &info)
void F77NAME() dsptrf(const char &uplo, const int &n, double *ap, int *ipiv, int &info)
void F77NAME() dpptrs(const char &uplo, const int &n, const int &nrhs, const double *ap, double *b, const int &ldb, int &info)
static void DoSgeev(const char &uplo, const char &lrev, const int &n, const double *a, const int &lda, double *wr, double *wi, double *rev, const int &ldr, double *lev, const int &ldv, double *work, const int &lwork, int &info)
Solve general real matrix eigenproblem.
Definition Lapack.hpp:335
void F77NAME() sgetrf(const int &m, const int &n, float *a, const int &lda, int *ipiv, int &info)
void F77NAME() ssptrs(const char &uplo, const int &n, const int &nrhs, const float *ap, const int *ipiv, float *b, const int &ldb, int &info)
static void Dgels(const char &trans, const int &m, const int &n, const int &nrhs, double *a, const int &lda, double *b, const int &ldb, double *work, const int &lwork, int &info)
Solve least squares/minimum norm problems for real matrices (double precision)
Definition Lapack.hpp:408
static void Dgesvd(const char &jobu, const char &jobvt, const int &m, const int &n, double *a, const int &lda, double *s, double *u, const int &ldu, double *vt, const int &ldvt, double *work, const int &lwork, int &info)
Singular Value Decomposition (SVD) of a real matrix (double precision)
Definition Lapack.hpp:385
void F77NAME() ssptri(const char &uplo, const int &n, const float *ap, const int *ipiv, float *work, int &info)
static void Dtptrs(const char &uplo, const char &trans, const char &diag, const int &n, const int &nrhs, const double *a, double *b, const int &ldb, int &info)
Solve a triangular system.
Definition Lapack.hpp:212
static void Sgels(const char &trans, const int &m, const int &n, const int &nrhs, float *a, const int &lda, float *b, const int &ldb, float *work, const int &lwork, int &info)
Solve least squares/minimum norm problems for real matrices (single precision)
Definition Lapack.hpp:418
static void DoSsptrs(const char &uplo, const int &n, const int &nrhs, const double *ap, const int *ipiv, double *b, const int &ldb, int &info)
Solve a real packed-symmetric matrix problem using Bunch-Kaufman pivoting.
Definition Lapack.hpp:164
static void Dgesv(const int &n, const int &nrhs, double *a, const int &lda, int *ipiv, double *b, const int &ldb, int &info)
Definition Lapack.hpp:131
void F77NAME() dsptrs(const char &uplo, const int &n, const int &nrhs, const double *ap, const int *ipiv, double *b, const int &ldb, int &info)
void F77NAME() dtrtrs(const char &uplo, const char &trans, const char &diag, const int &n, const int &nrhs, const double *a, const int &lda, double *b, const int &ldb, int &info)
void F77NAME() dtptrs(const char &uplo, const char &trans, const char &diag, const int &n, const int &nrhs, const double *a, double *b, const int &ldb, int &info)
void F77NAME() dpbtrs(const char &uplo, const int &n, const int &kd, const int &nrhs, const double *ab, const int &ldab, double *b, const int &ldb, int &info)
void F77NAME() dgbtrf(const int &m, const int &n, const int &kl, const int &ku, double *a, const int &lda, int *ipiv, int &info)
static void Dpbtrs(const char &uplo, const int &n, const int &kd, const int &nrhs, const double *ab, const int &ldab, double *b, const int &ldb, int &info)
Solve a real, positive definite banded-symmetric matrix problem using Cholesky factorization.
Definition Lapack.hpp:251