v0.13.1
lapack_wrap.h
Go to the documentation of this file.
1
2
3// FIXME This is obsolete implementation, need to be rewritten
4
5#ifdef __cplusplus
6extern "C" {
7#endif
8
9#ifndef __lapack__
10#define __lapack__
11
12#define __CLPK_TYPES__
13#ifdef __CLPK_TYPES__
14
15#if defined(__LP64__) /* In LP64 match sizes with the 32 bit ABI */
16typedef int __CLPK_integer;
17typedef int __CLPK_logical;
18typedef float __CLPK_real;
19typedef double __CLPK_doublereal;
20typedef __CLPK_logical (*__CLPK_L_fp)();
21typedef int __CLPK_ftnlen;
22#else
23typedef long int __CLPK_integer;
24typedef long int __CLPK_logical;
25typedef float __CLPK_real;
26typedef double __CLPK_doublereal;
28typedef long int __CLPK_ftnlen;
29#endif
30
31typedef struct {
34typedef struct {
37
40 __CLPK_integer *info);
41#ifndef MOAB_dgetrf
44 __CLPK_integer *ipiv, __CLPK_integer *info);
45#endif // MOAB_dgetrf
49 __CLPK_integer *ldb, __CLPK_integer *info);
53 __CLPK_integer *ldb, __CLPK_integer *info);
54#ifndef MOAB_dgetri
58 __CLPK_integer *info);
59#endif // MOAB_dgetri
61 __CLPK_integer *lda, __CLPK_integer *info);
65 __CLPK_integer *info);
69 __CLPK_integer *info);
74 __CLPK_integer *lwork, __CLPK_integer *info);
76 __CLPK_integer *lda, __CLPK_integer *info);
77__CLPK_integer dgesvd_(char *jobu, char *jobvt, __CLPK_integer *m,
83 __CLPK_integer *info);
84__CLPK_integer sgesvd_(char *jobu, char *jobvt, __CLPK_integer *m,
85 __CLPK_integer *n, float *a, __CLPK_integer *lda,
86 float *s, float *u, __CLPK_integer *ldu, float *vt,
87 __CLPK_integer *ldvt, float *work, __CLPK_integer *lwork,
88 __CLPK_integer *info);
89__CLPK_integer dsyev_(char *jobz, char *uplo, __CLPK_integer *n,
92 __CLPK_integer *lwork, __CLPK_integer *info);
93__CLPK_integer zheev_(char *jobz, char *uplo, __CLPK_integer *n,
96 __CLPK_integer *lwork, __CLPK_doublereal *rwork,
97 __CLPK_integer *info);
98__CLPK_integer zgeev_(char *jobvl, char *jobvr, __CLPK_integer *n,
103 __CLPK_integer *lwork, __CLPK_doublereal *rwork,
104 __CLPK_integer *info);
109 __CLPK_integer *lwork, __CLPK_integer *info);
114 __CLPK_integer *lwork, __CLPK_integer *info);
120 __CLPK_integer *lwork, __CLPK_integer *iwork,
121 __CLPK_integer *info);
122#ifndef MOAB_dsyevd
123__CLPK_integer dsyevd_(char *jobz, char *uplo, __CLPK_integer *n,
126 __CLPK_integer *lwork, __CLPK_integer *iwork,
127 __CLPK_integer *liwork, __CLPK_integer *info);
128#endif // MOAB_dsyevd
130 __CLPK_integer *lda, __CLPK_integer *ipiv,
132 __CLPK_integer *info);
135 __CLPK_integer *ipiv, __CLPK_integer *info);
137 __CLPK_integer *lda, __CLPK_integer *info);
139 __CLPK_integer *lda, __CLPK_integer *info);
140
141/// SUBROUTINE DPBTRS( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
145 __CLPK_integer *ldb, __CLPK_integer *info);
146
147#endif
148
150 float *a, __CLPK_integer lda,
151 __CLPK_integer *ipiv) {
152 __CLPK_integer info;
153 sgetrf_(&m, &n, a, &lda, ipiv, &info);
154 return info;
155}
156
159 __CLPK_integer lda,
160 __CLPK_integer *ipiv) {
161 __CLPK_integer info;
162 dgetrf_(&m, &n, a, &lda, ipiv, &info);
163 return info;
164}
165
166inline static __CLPK_integer
170 __CLPK_integer info;
171 dgetrs_(&trans, &n, &nrhs, a, &lda, ipiv, b, &ldb, &info);
172 return info;
173}
174
175inline static __CLPK_integer
178 __CLPK_integer ldb) {
179 __CLPK_integer info;
180 dgesv_(&n, &nrhs, a, &lda, ipiv, b, &ldb, &info);
181 return info;
182}
183
184inline static __CLPK_integer
187 __CLPK_integer lwork) {
188 __CLPK_integer info;
189 dgetri_(&n, a, &lda, ipiv, work, &lwork, &info);
190 return info;
191}
192
195 __CLPK_integer lda) {
196 __CLPK_integer info;
197 dpotrf_(&uplo, &n, a, &lda, &info);
198 return info;
199}
200
201inline static __CLPK_integer
204 __CLPK_integer ldb) {
205 __CLPK_integer info;
206 dpotrs_(&uplo, &n, &nrhs, a, &lda, b, &ldb, &info);
207 return info;
208}
209
210inline static __CLPK_integer
213 __CLPK_integer ldb) {
214 __CLPK_integer info;
215 dposv_(&uplo, &n, &nrhs, a, &lda, b, &ldb, &info);
216 return info;
217}
218
219inline static __CLPK_integer
223 __CLPK_integer lwork) {
224 __CLPK_integer info = 0;
225 dsysv_(&uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork, &info);
226 return info;
227}
228
231 __CLPK_integer lda) {
232 __CLPK_integer info;
233 dpotri_(&uplo, &n, a, &lda, &info);
234 return info;
235}
236
237inline static __CLPK_integer
242 __CLPK_integer lwork) {
243 __CLPK_integer info;
244 dgesvd_(&jobu, &jobvt, &m, &n, a, &lda, s, u, &ldu, vt, &ldvt, work, &lwork,
245 &info);
246 return info;
247}
248
249inline static __CLPK_integer
251 float *a, __CLPK_integer lda, float *s, float *u,
252 __CLPK_integer ldu, float *vt, __CLPK_integer ldvt, float *work,
253 __CLPK_integer lwork) {
254 __CLPK_integer info;
255 sgesvd_(&jobu, &jobvt, &m, &n, a, &lda, s, u, &ldu, vt, &ldvt, work, &lwork,
256 &info);
257 return info;
258}
259
260inline static __CLPK_integer
263 __CLPK_integer lwork) {
264 __CLPK_integer info;
265 dsyev_(&jobz, &uplo, &n, a, &lda, w, work, &lwork, &info);
266 return info;
267}
268inline static __CLPK_integer
272 __CLPK_doublereal *rwork) {
273 __CLPK_integer info;
274 zheev_(&jobz, &uplo, &n, a, &lda, w, work, &lwork, rwork, &info);
275 return info;
276}
277
278inline static __CLPK_integer
284 __CLPK_doublereal *rwork) {
285 __CLPK_integer info;
286 zgeev_(&jobvl, &jobvr, &n, a, &lda, w, vl, &ldvl, vr, &ldvr, work, &lwork,
287 rwork, &info);
288 return info;
289}
290
291inline static __CLPK_integer
295 __CLPK_integer lwork) {
296 __CLPK_integer info;
297 dgels_(&trans, &m, &n, &nrhs, a, &lda, b, &ldb, work, &lwork, &info);
298 return info;
299}
300
301inline static __CLPK_integer
306 __CLPK_integer lwork, __CLPK_integer *iwork) {
307 __CLPK_integer info;
308 dgesdd_(&jobz, &m, &n, a, &lda, s, u, &ldu, vt, &ldvt, work, &lwork, iwork,
309 &info);
310 return info;
311}
312
313inline static __CLPK_integer
316 __CLPK_integer lwork, __CLPK_integer *iwork,
317 __CLPK_integer liwork) {
318 __CLPK_integer info;
319 dsyevd_(&jobz, &uplo, &n, a, &lda, w, work, &lwork, iwork, &liwork, &info);
320 return info;
321}
322
325 __CLPK_integer lda,
326 __CLPK_integer *ipiv) {
327 __CLPK_integer info;
328 zgetrf_(&m, &n, a, &lda, ipiv, &info);
329 return info;
330}
331
332inline static __CLPK_integer
335 __CLPK_integer lwork) {
336 __CLPK_integer info;
337 zgetri_(&n, a, &lda, ipiv, work, &lwork, &info);
338 return info;
339}
340
343 __CLPK_integer lda) {
344 __CLPK_integer info;
345 zpotri_(&uplo, &n, a, &lda, &info);
346 return info;
347}
350 __CLPK_integer lda) {
351 __CLPK_integer info;
352 zpotrf_(&uplo, &n, a, &lda, &info);
353 return info;
354}
355
356inline static __CLPK_integer
360 __CLPK_integer info;
361 dpbtrs_(&uplo, &n, &kd, &nrhs, ab, &ldab, b, &ldb, &info);
362 return info;
363}
364
365#endif
366
367#ifdef __cplusplus
368}
369#endif
constexpr double a
FTensor::Index< 'n', SPACE_DIM > n
FTensor::Index< 'm', SPACE_DIM > m
__CLPK_integer dgesvd_(char *jobu, char *jobvt, __CLPK_integer *m, __CLPK_integer *n, __CLPK_doublereal *a, __CLPK_integer *lda, __CLPK_doublereal *s, __CLPK_doublereal *u, __CLPK_integer *ldu, __CLPK_doublereal *vt, __CLPK_integer *ldvt, __CLPK_doublereal *work, __CLPK_integer *lwork, __CLPK_integer *info)
static __CLPK_integer lapack_sgetrf(__CLPK_integer m, __CLPK_integer n, float *a, __CLPK_integer lda, __CLPK_integer *ipiv)
Definition: lapack_wrap.h:149
static __CLPK_integer lapack_zgetri(__CLPK_integer n, __CLPK_doublecomplex *a, __CLPK_integer lda, __CLPK_integer *ipiv, __CLPK_doublecomplex *work, __CLPK_integer lwork)
Definition: lapack_wrap.h:333
__CLPK_integer dsysv_(char *uplo, __CLPK_integer *n, __CLPK_integer *nrhs, __CLPK_doublereal *a, __CLPK_integer *lda, __CLPK_integer *ipiv, __CLPK_doublereal *b, __CLPK_integer *ldb, __CLPK_doublereal *work, __CLPK_integer *lwork, __CLPK_integer *info)
static __CLPK_integer lapack_dposv(char uplo, __CLPK_integer n, __CLPK_integer nrhs, __CLPK_doublereal *a, __CLPK_integer lda, __CLPK_doublereal *b, __CLPK_integer ldb)
Definition: lapack_wrap.h:211
static __CLPK_integer lapack_zpotri(char uplo, __CLPK_integer n, __CLPK_doublecomplex *a, __CLPK_integer lda)
Definition: lapack_wrap.h:341
static __CLPK_integer lapack_dpotri(char uplo, __CLPK_integer n, __CLPK_doublereal *a, __CLPK_integer lda)
Definition: lapack_wrap.h:229
__CLPK_integer dgetri_(__CLPK_integer *n, __CLPK_doublereal *a, __CLPK_integer *lda, __CLPK_integer *ipiv, __CLPK_doublereal *work, __CLPK_integer *lwork, __CLPK_integer *info)
static __CLPK_integer lapack_zgetrf(__CLPK_integer m, __CLPK_integer n, __CLPK_doublecomplex *a, __CLPK_integer lda, __CLPK_integer *ipiv)
Definition: lapack_wrap.h:323
__CLPK_integer dsyevd_(char *jobz, char *uplo, __CLPK_integer *n, __CLPK_doublereal *a, __CLPK_integer *lda, __CLPK_doublereal *w, __CLPK_doublereal *work, __CLPK_integer *lwork, __CLPK_integer *iwork, __CLPK_integer *liwork, __CLPK_integer *info)
static __CLPK_integer lapack_dpotrf(char uplo, __CLPK_integer n, __CLPK_doublereal *a, __CLPK_integer lda)
Definition: lapack_wrap.h:193
__CLPK_integer dgetrs_(char *trans, __CLPK_integer *n, __CLPK_integer *nrhs, __CLPK_doublereal *a, __CLPK_integer *lda, __CLPK_integer *ipiv, __CLPK_doublereal *b, __CLPK_integer *ldb, __CLPK_integer *info)
__CLPK_integer dsyev_(char *jobz, char *uplo, __CLPK_integer *n, __CLPK_doublereal *a, __CLPK_integer *lda, __CLPK_doublereal *w, __CLPK_doublereal *work, __CLPK_integer *lwork, __CLPK_integer *info)
__CLPK_integer dgetrf_(__CLPK_integer *m, __CLPK_integer *n, __CLPK_doublereal *a, __CLPK_integer *lda, __CLPK_integer *ipiv, __CLPK_integer *info)
static __CLPK_integer lapack_dgesv(__CLPK_integer n, __CLPK_integer nrhs, __CLPK_doublereal *a, __CLPK_integer lda, __CLPK_integer *ipiv, __CLPK_doublereal *b, __CLPK_integer ldb)
Definition: lapack_wrap.h:176
long int __CLPK_integer
Definition: lapack_wrap.h:23
__CLPK_integer dpotrs_(char *uplo, __CLPK_integer *n, __CLPK_integer *nrhs, __CLPK_doublereal *a, __CLPK_integer *lda, __CLPK_doublereal *b, __CLPK_integer *ldb, __CLPK_integer *info)
static __CLPK_integer lapack_dpotrs(char uplo, __CLPK_integer n, __CLPK_integer nrhs, __CLPK_doublereal *a, __CLPK_integer lda, __CLPK_doublereal *b, __CLPK_integer ldb)
Definition: lapack_wrap.h:202
__CLPK_integer sgesvd_(char *jobu, char *jobvt, __CLPK_integer *m, __CLPK_integer *n, float *a, __CLPK_integer *lda, float *s, float *u, __CLPK_integer *ldu, float *vt, __CLPK_integer *ldvt, float *work, __CLPK_integer *lwork, __CLPK_integer *info)
__CLPK_integer dpotri_(char *uplo, __CLPK_integer *n, __CLPK_doublereal *a, __CLPK_integer *lda, __CLPK_integer *info)
__CLPK_integer dgesdd_(char *jobz, __CLPK_integer *m, __CLPK_integer *n, __CLPK_doublereal *a, __CLPK_integer *lda, __CLPK_doublereal *s, __CLPK_doublereal *u, __CLPK_integer *ldu, __CLPK_doublereal *vt, __CLPK_integer *ldvt, __CLPK_doublereal *work, __CLPK_integer *lwork, __CLPK_integer *iwork, __CLPK_integer *info)
__CLPK_logical(* __CLPK_L_fp)()
Definition: lapack_wrap.h:27
__CLPK_integer dgesv_(__CLPK_integer *n, __CLPK_integer *nrhs, __CLPK_doublereal *a, __CLPK_integer *lda, __CLPK_integer *ipiv, __CLPK_doublereal *b, __CLPK_integer *ldb, __CLPK_integer *info)
__CLPK_integer zpotrf_(char *uplo, __CLPK_integer *n, __CLPK_doublecomplex *a, __CLPK_integer *lda, __CLPK_integer *info)
long int __CLPK_ftnlen
Definition: lapack_wrap.h:28
__CLPK_integer sgetrf_(__CLPK_integer *m, __CLPK_integer *n, float *a, __CLPK_integer *lda, __CLPK_integer *ipiv, __CLPK_integer *info)
__CLPK_integer dposv_(char *uplo, __CLPK_integer *n, __CLPK_integer *nrhs, __CLPK_doublereal *a, __CLPK_integer *lda, __CLPK_doublereal *b, __CLPK_integer *ldb, __CLPK_integer *info)
__CLPK_integer zgetri_(__CLPK_integer *n, __CLPK_doublecomplex *a, __CLPK_integer *lda, __CLPK_integer *ipiv, __CLPK_doublecomplex *work, __CLPK_integer *lwork, __CLPK_integer *info)
static __CLPK_integer lapack_dgetrf(__CLPK_integer m, __CLPK_integer n, __CLPK_doublereal *a, __CLPK_integer lda, __CLPK_integer *ipiv)
Definition: lapack_wrap.h:157
__CLPK_integer dpotrf_(char *uplo, __CLPK_integer *n, __CLPK_doublereal *a, __CLPK_integer *lda, __CLPK_integer *info)
__CLPK_integer dgelsy_(char *trans, __CLPK_integer *m, __CLPK_integer *n, __CLPK_integer *nrhs, __CLPK_doublereal *a, __CLPK_integer *lda, __CLPK_doublereal *b, __CLPK_integer *ldb, __CLPK_doublereal *work, __CLPK_integer *lwork, __CLPK_integer *info)
static __CLPK_integer lapack_zgeev(char jobvl, char jobvr, __CLPK_integer n, __CLPK_doublecomplex *a, __CLPK_integer lda, __CLPK_doublecomplex *w, __CLPK_doublecomplex *vl, __CLPK_integer ldvl, __CLPK_doublecomplex *vr, __CLPK_integer ldvr, __CLPK_doublecomplex *work, __CLPK_integer lwork, __CLPK_doublereal *rwork)
Definition: lapack_wrap.h:279
static __CLPK_integer lapack_dsyev(char jobz, char uplo, __CLPK_integer n, __CLPK_doublereal *a, __CLPK_integer lda, __CLPK_doublereal *w, __CLPK_doublereal *work, __CLPK_integer lwork)
Definition: lapack_wrap.h:261
static __CLPK_integer lapack_sgesvd(char jobu, char jobvt, __CLPK_integer m, __CLPK_integer n, float *a, __CLPK_integer lda, float *s, float *u, __CLPK_integer ldu, float *vt, __CLPK_integer ldvt, float *work, __CLPK_integer lwork)
Definition: lapack_wrap.h:250
static __CLPK_integer lapack_dsysv(char uplo, __CLPK_integer n, __CLPK_integer nrhs, __CLPK_doublereal *a, __CLPK_integer lda, __CLPK_integer *ipiv, __CLPK_doublereal *b, __CLPK_integer ldb, __CLPK_doublereal *work, __CLPK_integer lwork)
Definition: lapack_wrap.h:220
static __CLPK_integer lapack_dgetri(__CLPK_integer n, __CLPK_doublereal *a, __CLPK_integer lda, __CLPK_integer *ipiv, __CLPK_doublereal *work, __CLPK_integer lwork)
Definition: lapack_wrap.h:185
static __CLPK_integer lapack_zpotrf(char uplo, __CLPK_integer n, __CLPK_doublecomplex *a, __CLPK_integer lda)
Definition: lapack_wrap.h:348
long int __CLPK_logical
Definition: lapack_wrap.h:24
static __CLPK_integer lapack_dgesdd(char jobz, __CLPK_integer m, __CLPK_integer n, __CLPK_doublereal *a, __CLPK_integer lda, __CLPK_doublereal *s, __CLPK_doublereal *u, __CLPK_integer ldu, __CLPK_doublereal *vt, __CLPK_integer ldvt, __CLPK_doublereal *work, __CLPK_integer lwork, __CLPK_integer *iwork)
Definition: lapack_wrap.h:302
__CLPK_integer zgetrf_(__CLPK_integer *m, __CLPK_integer *n, __CLPK_doublecomplex *a, __CLPK_integer *lda, __CLPK_integer *ipiv, __CLPK_integer *info)
static __CLPK_integer lapack_dpbtrs(char uplo, __CLPK_integer n, __CLPK_integer kd, __CLPK_integer nrhs, __CLPK_doublereal *ab, __CLPK_integer ldab, __CLPK_doublereal *b, __CLPK_integer ldb)
Definition: lapack_wrap.h:357
__CLPK_integer zpotri_(char *uplo, __CLPK_integer *n, __CLPK_doublecomplex *a, __CLPK_integer *lda, __CLPK_integer *info)
static __CLPK_integer lapack_zheev(char jobz, char uplo, __CLPK_integer n, __CLPK_doublecomplex *a, __CLPK_integer lda, __CLPK_doublereal *w, __CLPK_doublecomplex *work, __CLPK_integer lwork, __CLPK_doublereal *rwork)
Definition: lapack_wrap.h:269
static __CLPK_integer lapack_dgesvd(char jobu, char jobvt, __CLPK_integer m, __CLPK_integer n, __CLPK_doublereal *a, __CLPK_integer lda, __CLPK_doublereal *s, __CLPK_doublereal *u, __CLPK_integer ldu, __CLPK_doublereal *vt, __CLPK_integer ldvt, __CLPK_doublereal *work, __CLPK_integer lwork)
Definition: lapack_wrap.h:238
static __CLPK_integer lapack_dgetrs(char trans, __CLPK_integer n, __CLPK_integer nrhs, __CLPK_doublereal *a, __CLPK_integer lda, __CLPK_integer *ipiv, __CLPK_doublereal *b, __CLPK_integer ldb)
Definition: lapack_wrap.h:167
__CLPK_integer dgels_(char *trans, __CLPK_integer *m, __CLPK_integer *n, __CLPK_integer *nrhs, __CLPK_doublereal *a, __CLPK_integer *lda, __CLPK_doublereal *b, __CLPK_integer *ldb, __CLPK_doublereal *work, __CLPK_integer *lwork, __CLPK_integer *info)
float __CLPK_real
Definition: lapack_wrap.h:25
static __CLPK_integer lapack_dgels(char trans, __CLPK_integer m, __CLPK_integer n, __CLPK_integer nrhs, __CLPK_doublereal *a, __CLPK_integer lda, __CLPK_doublereal *b, __CLPK_integer ldb, __CLPK_doublereal *work, __CLPK_integer lwork)
Definition: lapack_wrap.h:292
__CLPK_integer zheev_(char *jobz, char *uplo, __CLPK_integer *n, __CLPK_doublecomplex *a, __CLPK_integer *lda, __CLPK_doublereal *w, __CLPK_doublecomplex *work, __CLPK_integer *lwork, __CLPK_doublereal *rwork, __CLPK_integer *info)
__CLPK_integer dpbtrs_(char *uplo, __CLPK_integer *n, __CLPK_integer *kd, __CLPK_integer *nrhs, __CLPK_doublereal *ab, __CLPK_integer *ldab, __CLPK_doublereal *b, __CLPK_integer *ldb, __CLPK_integer *info)
SUBROUTINE DPBTRS( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
static __CLPK_integer lapack_dsyevd(char jobz, char uplo, __CLPK_integer n, __CLPK_doublereal *a, __CLPK_integer lda, __CLPK_doublereal *w, __CLPK_doublereal *work, __CLPK_integer lwork, __CLPK_integer *iwork, __CLPK_integer liwork)
Definition: lapack_wrap.h:314
double __CLPK_doublereal
Definition: lapack_wrap.h:26
__CLPK_integer zgeev_(char *jobvl, char *jobvr, __CLPK_integer *n, __CLPK_doublecomplex *a, __CLPK_integer *lda, __CLPK_doublecomplex *w, __CLPK_doublecomplex *vl, __CLPK_integer *ldvl, __CLPK_doublecomplex *vr, __CLPK_integer *ldvr, __CLPK_doublecomplex *work, __CLPK_integer *lwork, __CLPK_doublereal *rwork, __CLPK_integer *info)
double w(const double g, const double t)
const double r
rate factor
__CLPK_real i
Definition: lapack_wrap.h:32
__CLPK_doublereal i
Definition: lapack_wrap.h:35