Macaulay2 Engine
Loading...
Searching...
No Matches
lapack.hpp
Go to the documentation of this file.
1#ifndef __lapack_h_
2#define __lapack_h_
3
43
44#include "aring-RR.hpp"
45#include "aring-CC.hpp"
46#include "aring-RRR.hpp"
47#include "aring-CCC.hpp"
48#include "dmat.hpp"
49
54
55/* Lapack routines */
56/* Compute solutions x to Ax = b for square matrix A and a matrix b */
57
58/* MES, On my mac, 10.12.4, lapack include file is at
59 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/Headers/clapack.h
60*/
61extern "C" {
62int dgesv_(int *n, // number of rows in A
63 int *nrhs, // number of right hand sides
64 double *a, // n by n matrix A, on exit L&U from A=PLU
65 int *lda, // n
66 int *ipiv, // indices defining permutation P
67 double *b, // right-hand-side, on exit the solution matrix
68 int *ldb, // n
69 int *info); // error info
70
71int dgeev_(char *n, // whether to compute left eigenvectors
72 char *n2, // whether to compute right eigenvectors
73 int *size, // rows
74 double *M, // input matrix A
75 int *size1, // rows
76 double *E, // real components of eigenvalues
77 double *E2, // imaginar components of eigenvalues
78 double *, // left eigenvectors
79 int *, // rows
80 double *, // right eigenvectors
81 int *, // rows
82 double *, // workspace
83 int *, // size of workspace
84 int *); // error info
85
86int dsyev_(char *n, // whether to compute eigenvectors
87 char *n2, // how to store A (upper or lower)
88 int *size, // rows
89 double *M, // symmetric matrix A
90 int *lda, // rows
91 double *eig, // becomes eigenvalues
92 double *work, // workspace
93 int *wsize, // size of workspace
94 int *info); // error info
95
96void dgetrf_(const int *rows, // rows
97 const int *cols, // columns
98 double *A, // input matrix, on exit L & U from A=PLU.
99 const int *ld, // rows
100 int *ipiv, // becomes permutation indices of P
101 int *info); // error info
102
103int dgesvd_(char *jobU, // amount of U to return
104 char *jobV, // amount of V to return
105 int *rows, // rows
106 int *cols, // columns
107 double *A, // input matrix for SVD
108 int *ldA, // rows
109 double *Sigma, // singular values
110 double *U, // U
111 int *ldU, // rows
112 double *VT, // V transpose
113 int *ldVT, // cols
114 double *work, // workspace
115 int *lwork, // size of workspace
116 int *info); // error info
117
118int dgesdd_(char *jobU, // amount of U to return
119 int *rows, // rows
120 int *cols, // columns
121 double *A, // input matrix for SVD
122 int *ldA, // rows
123 double *Sigma, // singular values
124 double *U, // U
125 int *ldU, // rows
126 double *VT, // V transpose
127 int *ldVT, // cols
128 double *work, // workspace
129 int *lwork, // size of workspace
130 int *iwork, // integer workspace
131 int *info); // error info
132
133int dgels_(char *job, // type of least squares problem
134 int *rows, // rows
135 int *cols, // columns
136 int *nhrs, // number right hand sides
137 double *A, // input matrix for least squares
138 int *ldA, // rows
139 double *b, // matrix of right hand side vectors
140 int *ldb, // rows of right hand side
141 double *work, // workspace
142 int *lwork, // size of workspace
143 int *info); // error info
144
145int dgelss_(int *rows, // rows
146 int *cols, // columns
147 int *nhrs, // number right hand sides
148 double *A, // input matrix for least squares
149 int *ldA, // rows
150 double *b, // matrix of right hand side vectors
151 int *ldb, // rows of right hand side
152 double *Sigma, // singular values
153 double *rcond, // used to determine if singular value is 0
154 int *rank, // rank of the matrix on output
155 double *work, // workspace
156 int *lwork, // size of workspace
157 int *info); // error info
158
159// computes a QR factorization of the matrix A.
160// to get optimal work size:
161// 1. call this function with lwork == -1, at exit, work[0] contains optimal
162// size of 'work'
163// in number of doubles? or number of bytes? probably number of
164// doubles...
165// 2. after that, allocate space for that size, recall the function.
166// the answer is encoded in the following manner:
167// Q = H(1) H(2) ... H(k), where k = min(m,n).
168// H(i) has the form: I - tau * v * v'
169// where
170// tau is a real scalar
171// v is a real vector with v(1:i-1) = 0, v(i)=1, v(i+1:m) is stored on exit in
172// A(i+1:m,i), and tau in tau(i).
173// dgeqrf: QR factorization
174// https://docs.oracle.com/cd/E19422-01/819-3691/dgeqrf.html
175// dorgqr: to get Q as a matrix:
176// https://docs.oracle.com/cd/E19422-01/819-3691/dorgqr.html
177// dormqr: to instead multiply by this Q without creating it:
178// https://docs.oracle.com/cd/E19422-01/819-3691/dormqr.html
179
180int dgeqrf_(int *m, // #rows (input)
181 int *n, // #columns (input)
182 double *A, // input matrix, in row or column major order? (inout)
183 // on output: the top part of A, min(m,n) x n, is R
184 // under that: A(i+1:m, i) is v_i
185 // actually, vi[1:i-1] = 0, vi[i] = 1, vi[i+1:m) = A(i+1:m, i)
186 int *lda, // leading dimension of A (>= max(1, #rows) (input)
187 double *tau, // scalar factors of elementary reflectors (output),
188 // size: min(m,n).
189 double *work, //
190 int *lwork, // size of workspace?
191 int *info); // error info: ==0: successful, ==-i, i-th argument had
192 // illegal value
193int dorgqr_(int *m, // #rows m >= 0
194 int *n, // #cols of Q, m >= n >= 0
195 int *k, // number of elementary reflectors (n >= k >= 0)
196 double *A, // on input: i-th column contains the v_i defining the
197 // i-th reflector
198 // on output: contains the m by n matrix Q.
199 int *lda, // input.
200 double *tau, // input,
201 double *work, // workspace, size 'lwork'. optimally, lwork >= n *
202 // nb, where nb is optimal block size.
203 int *lwork, // dimension of 'work'
204 int *info);
205// as usual, setting lwork to -1, results in work[0] containing the optimal work
206// size.
207// then allocate space, run again.
208// todo:
209// a. add in routines for QR in lapack.cpp (RR,RRR,CC,CCC), lapack.hpp defs too
210// RR: WORKING ON
211// b. in mat-linalg.hpp, add in routines for QR as well.
212// DONE b1. at top of file: default doesn't exist case.
213// b2. 4 routines to add: RR, RRR, CC, CCC
214// RR: DONE
215// DONE c. mat.hpp: add in QR routine
216// DONE d. mutablemat-imp.hpp: add in boiler plate.
217// DONE d1. mutablemat-defs.hpp
218// DONE e. add in routines in x-mutablemat.cpp, also change engine.h
219// f. add in a routine in interface.dd
220// g. add in a routine in m2/mutablemat.m2
221// h. document and test QR, ReturnQR.
222int zgeqrf_(int *m, // #rows (input)
223 int *n, // #columns (input)
224 double *A, // input matrix, in row or column major order? (inout)
225 // on output: the top part of A, min(m,n) x n, is R
226 // under that: A(i+1:m, i) is v_i
227 // actually, vi[1:i-1] = 0, vi[i] = 1, vi[i+1:m) = A(i+1:m, i)
228 int *lda, // leading dimension of A (>= max(1, #rows) (input)
229 double *tau, // scalar factors of elementary reflectors (output),
230 // size: min(m,n).
231 double *work, //
232 int *lwork, // size of workspace?
233 int *info); // error info: ==0: successful, ==-i, i-th argument had
234 // illegal value
235int zungqr_(int *m, // #rows m >= 0
236 int *n, // #cols of Q, m >= n >= 0
237 int *k, // number of elementary reflectors (n >= k >= 0)
238 double *A, // on input: i-th column contains the v_i defining the
239 // i-th reflector
240 // on output: contains the m by n matrix Q.
241 int *lda, // input.
242 double *tau, // input,
243 double *work, // workspace, size 'lwork'. optimally, lwork >= n *
244 // nb, where nb is optimal block size.
245 int *lwork, // dimension of 'work'
246 int *info);
247
248#if 0
249 int dormqr_(char *__side,
250 char *__trans,
251 __CLPK_integer *__m,
252 __CLPK_integer *__n,
253 __CLPK_integer *__k,
254 __CLPK_doublereal *__a,
255 __CLPK_integer *__lda,
256 __CLPK_doublereal *__tau,
257 __CLPK_doublereal *__c__,
258 __CLPK_integer *__ldc,
259 __CLPK_doublereal *__work,
260 __CLPK_integer *__lwork,
261 __CLPK_integer *__info);
262#endif
263
264#ifndef __FFLASFFPACK_config_blas_H
265/* cblas routines */
266// computes "ax + y"
267void cblas_daxpy(const int n, // length of vectors
268 const double a, // scalar alpha
269 const double *x, // vector x
270 const int incx, // increment of x
271 double *y, // vector y
272 const int incy); // increment of y
273
274// computes "alpha AB + beta C"
275// NOTE: first 3 args should formally be ENUMS, not ints.
276// Problem? e.g., what if enums change?
278 const int Order, // how matrices are stored, by column or row.
279 const int TransA, // whether to transform A, e.g. take transpose
280 const int TransB, // whether to transform B
281 const int M, // rows of A
282 const int N, // columns of B
283 const int K, // columns of A, which must = rows of B
284 const double alpha, // scalar alpha
285 const double *A, // matrix A
286 const int lda, // rows of A
287 const double *B, // matrix B
288 const int ldb, // rows of B
289 const double beta, // scalar bet
290 double *C, // matrix C; on output, alphaAB+betaC
291 const int ldc); // rows of C
292#endif
293
294// computes ax
295void cblas_dscal(const int n, // length of vectors
296 const double a, // scalar alpha
297 double *x, // vector x
298 const int incx); // increment of x
299
300int zgesv_(int *n, // number of rows in A
301 int *nrhs, // number of right hand sides
302 double *a, // n by n matrix A, on exit L&U from A=PLU
303 int *lda, // n
304 int *ipiv, // indices defining permutation P
305 double *b, // right-hand-side
306 int *ldb, // n
307 int *info); // error info
308
309int zgeev_(char *n, // whether to compute left eigenvectors
310 char *n2, // whether to compute right eigenvectors
311 int *size, // rows
312 double *M, // n by n input matrix
313 int *size1, // rows
314 double *E, // eigenvalues, on output
315 double *l, // left eigenvectors, on output
316 int *lsize, // rows
317 double *r, // right eigenvectors, on output
318 int *rsize, // rows
319 double *w, // workspace
320 int *wsize, // size of workspace
321 double *rwork, // another workspace
322 int *info); // error info
323
324int zheev_(char *n, // whether to compute eigenvectors
325 char *n2, // how to store A (upper or lower)
326 int *size, // rows
327 double *M, // hermitian matrix A
328 int *lda, // rows
329 double *eig, // becomes eigenvalues
330 double *w, // workspace
331 int *wsize, // size of workspace
332 double *rwork, // another workspace
333 int *info); // error info
334
335int zgetrf_(int *rows, // rows
336 int *cols, // columns
337 double *M, // input matrix, on exit L & U from A=PLU.
338 int *ld, // rows
339 int *ipiv, // becomes permutation indices of P
340 int *info); // error info
341
342int zgesvd_(char *jobU, // amount of U to return
343 char *jobV, // amount of V to return
344 int *rows, // rows
345 int *cols, // columns
346 double *A, // input matrix for SVD
347 int *ldA, // rows
348 double *Sigma, // singular values
349 double *U, // U
350 int *ldU, // rows
351 double *VT, // V transpose
352 int *ldVT, // cols
353 double *w, // workspace
354 int *lwork, // size of workspace
355 double *rwork, // another workspace
356 int *info); // error info
357
358int zgesdd_(char *jobU, // amount of U to return
359 int *rows, // rows
360 int *cols, // columns
361 double *A, // input matrix for SVD
362 int *ldA, // rows
363 double *Sigma, // singular values
364 double *U, // U
365 int *ldU, // rows
366 double *VT, // V transpose
367 int *ldVT, // cols
368 double *w, // workspace
369 int *lwork, // size of workspace
370 double *rwork, // another workspace
371 int *iwork, // integer workspace
372 int *info); // error info
373
374int zgels_(char *job, // type of least squares problem
375 int *rows, // rows
376 int *cols, // columns
377 int *nhrs, // number right hand sides
378 double *A, // input matrix for least squares
379 int *ldA, // rows
380 double *b, // matrix of right hand side vectors
381 int *ldb, // rows of right hand side
382 double *work, // workspace
383 int *lwork, // size of workspace
384 int *info); // error info
385
386int zgelss_(int *rows, // rows
387 int *cols, // columns
388 int *nhrs, // number right hand sides
389 double *A, // input matrix for least squares
390 int *ldA, // rows
391 double *b, // matrix of right hand side vectors
392 int *ldb, // rows of right hand side
393 double *Sigma, // singular values
394 double *rcond, // used to determine if singular value is 0
395 int *rank, // rank of the matrix on output
396 double *work, // workspace
397 int *lwork, // size of workspace
398 double *rwork, // workspace
399 int *info); // error info
400
401#ifndef __FFLASFFPACK_config_blas_H
402/* cblas routines */
403// computes "ax + y"
404void cblas_daxpy(const int n, // length of vectors
405 const double a, // scalar alpha
406 const double *x, // vector x
407 const int incx, // increment of x
408 double *y, // vector y
409 const int incy); // increment of y
410#endif
411
412// computes ax
413void cblas_dscal(const int n, // length of vectors
414 const double a, // scalar alpha
415 double *x, // vector x
416 const int incx); // increment of x
417
418// computes "alpha AB + beta C"
419// NOTE: first 3 args should formally be ENUMS, not ints.
420// Problem? e.g., what if enums change?
422 const int Order, // how matrices are stored, by column or row.
423 const int TransA, // whether to transform A, e.g. take transpose
424 const int TransB, // whether to transform B
425 const int M, // rows of A
426 const int N, // columns of B
427 const int K, // columns of A, which must = rows of B
428 const void *alpha, // scalar alpha
429 const void *A, // matrix A
430 const int lda, // rows of A
431 const void *B, // matrix B
432 const int ldb, // rows of B
433 const void *beta, // scalar bet
434 void *C, // matrix C; on output, alphaAB+betaC
435 const int ldc); // rows of C
436};
437
438
453{
454 public:
456 // Translation to/from RR/CC and RRR/CCC //
458
460 // Input matrices are real /////
462
463 static M2_arrayintOrNull LU(const DMatRRR *A,
464 DMatRRR *L,
465 DMatRRR *U);
466
467 static bool solve_triangular(const DMatRRR *U, const DMatRRR *b, DMatRRR *x);
468
469 static bool solve(const DMatRRR *A, const DMatRRR *b, DMatRRR *x);
470 // A and b are not modified. The result is placed into x.
471 // Returns x s.t. Ax = b
472 // A should be non-singular.
473
474 static bool eigenvalues(const DMatRRR *A, DMatCCC *eigenvals);
475 // Find the eigenvalues of A. A is not modified.
476 // Result is placed into eigenvals.
477
478 static bool eigenvectors(const DMatRRR *A,
479 DMatCCC *eigenvals,
480 DMatCCC *eigenvecs);
481
482 static bool eigenvalues_symmetric(const DMatRRR *A, DMatRRR *eigenvals);
483
484 static bool eigenvectors_symmetric(const DMatRRR *A,
485 DMatRRR *eigenvals,
486 DMatRRR *eigenvecs);
487
488 static bool SVD(const DMatRRR *A,
489 DMatRRR *Sigma,
490 DMatRRR *U,
491 DMatRRR *VT);
492
493 static bool SVD_divide_conquer(const DMatRRR *A,
494 DMatRRR *Sigma,
495 DMatRRR *U,
496 DMatRRR *VT);
497
498 static bool least_squares(const DMatRRR *A,
499 const DMatRRR *b,
500 DMatRRR *x);
501
502 static bool least_squares_deficient(const DMatRRR *A,
503 const DMatRRR *b,
504 DMatRRR *x);
505
507 // Input matrices are complex //
509
510 static M2_arrayintOrNull LU(const DMatCCC *A,
511 DMatCCC *L,
512 DMatCCC *U);
513
514 static bool solve(const DMatCCC *A, const DMatCCC *b, DMatCCC *x);
515
516 // static bool solve(const DMatCCC *A, const DMatCCC *b, DMatCCC *x,
517 // const unsigned long precision);
518 // A and b are not modified. The result is placed into x.
519 // Returns x s.t. Ax = b
520 // A should be non-singular.
521
522 static bool eigenvalues(const DMatCCC *A, DMatCCC *eigenvals);
523
524 static bool eigenvectors(const DMatCCC *A,
525 DMatCCC *eigenvals,
526 DMatCCC *eigenvecs);
527
528 static bool eigenvalues_hermitian(const DMatCCC *A, DMatRRR *eigenvals);
529
530 static bool eigenvectors_hermitian(const DMatCCC *A,
531 DMatRRR *eigenvals,
532 DMatCCC *eigenvecs);
533
534 static bool SVD(const DMatCCC *A,
535 DMatRRR *Sigma,
536 DMatCCC *U,
537 DMatCCC *VT);
538
539 static bool SVD_divide_conquer(const DMatCCC *A,
540 DMatRRR *Sigma,
541 DMatCCC *U,
542 DMatCCC *VT);
543
544 static bool least_squares(const DMatCCC *A,
545 const DMatCCC *b,
546 DMatCCC *x);
547
548 static bool least_squares_deficient(const DMatCCC *A,
549 const DMatCCC *b,
550 DMatCCC *x);
551
554
555 public:
558
560 // Translation to/from RR/CC and RRR/CCC //
562
564 // Input matrices are real /////
566
567 static M2_arrayintOrNull LU(const DMatRR *A, DMatRR *L, DMatRR *U);
568
569 static bool solve(const DMatRR *A, const DMatRR *b, DMatRR *x);
570 // A and b are not modified. The result is placed into x.
571 // Returns x s.t. Ax = b
572 // A should be non-singular.
573
574 static bool eigenvalues(const DMatRR *A, DMatCC *eigenvals);
575 // Find the eigenvalues of A. A is not modified.
576 // Result is placed into eigenvals.
577
578 static bool eigenvectors(const DMatRR *A,
579 DMatCC *eigenvals,
580 DMatCC *eigenvecs);
581
582 static bool eigenvalues_symmetric(const DMatRR *A, DMatRR *eigenvals);
583
584 static bool eigenvectors_symmetric(const DMatRR *A,
585 DMatRR *eigenvals,
586 DMatRR *eigenvecs);
587
588 static bool SVD(const DMatRR *A,
589 DMatRR *Sigma,
590 DMatRR *U,
591 DMatRR *VT);
592
593 static bool SVD_divide_conquer(const DMatRR *A,
594 DMatRR *Sigma,
595 DMatRR *U,
596 DMatRR *VT);
597
598 static bool least_squares(const DMatRR *A,
599 const DMatRR *b,
600 DMatRR *x);
601
602 static bool least_squares_deficient(const DMatRR *A,
603 const DMatRR *b,
604 DMatRR *x);
605
606 static bool QR(const DMatRR *A,
607 DMatRR *Q,
608 DMatRR *R,
609 bool return_QR);
610
612 // Input matrices are complex //
614
615 static M2_arrayintOrNull LU(const DMatCC *A, DMatCC *L, DMatCC *U);
616
617 static bool solve(const DMatCC *A, const DMatCC *b, DMatCC *x);
618
619 // static bool solve(const DMatCC *A, const DMatCC *b, DMatCC *x,
620 // const unsigned long precision);
621 // A and b are not modified. The result is placed into x.
622 // Returns x s.t. Ax = b
623 // A should be non-singular.
624
625 static bool eigenvalues(const DMatCC *A, DMatCC *eigenvals);
626
627 static bool eigenvectors(const DMatCC *A,
628 DMatCC *eigenvals,
629 DMatCC *eigenvecs);
630
631 static bool eigenvalues_hermitian(const DMatCC *A, DMatRR *eigenvals);
632
633 static bool eigenvectors_hermitian(const DMatCC *A,
634 DMatRR *eigenvals,
635 DMatCC *eigenvecs);
636
637 static bool SVD(const DMatCC *A,
638 DMatRR *Sigma,
639 DMatCC *U,
640 DMatCC *VT);
641
642 static bool SVD_divide_conquer(const DMatCC *A,
643 DMatRR *Sigma,
644 DMatCC *U,
645 DMatCC *VT);
646
647 static bool least_squares(const DMatCC *A,
648 const DMatCC *b,
649 DMatCC *x);
650
651 static bool least_squares_deficient(const DMatCC *A,
652 const DMatCC *b,
653 DMatCC *x);
654
655 static bool QR(const DMatCC *A,
656 DMatCC *Q,
657 DMatCC *R,
658 bool return_QR);
659
660 static void freeRaw(__mpfr_struct *start, int size);
661};
662
663#endif
664
665/*
666// Local Variables:
667// compile-command: "make -C $M2BUILDDIR/Macaulay2/e "
668// indent-tabs-mode: nil
669// End:
670*/
M2::ARingCC — machine-precision complex numbers (pair of doubles).
M2::ARingCCC — arbitrary-precision complex numbers (pair of MPFR floats).
M2::ARingRR — machine-precision real numbers (IEEE 754 double).
M2::ARingRRR — arbitrary-precision real numbers backed by MPFR.
Definition dmat.hpp:62
static bool solve(const DMatCCC *A, const DMatCCC *b, DMatCCC *x)
static bool solve_triangular(const DMatRRR *U, const DMatRRR *b, DMatRRR *x)
static bool least_squares_deficient(const DMatRRR *A, const DMatRRR *b, DMatRRR *x)
DMat< M2::ARingRR > DMatRR
Definition lapack.hpp:556
static bool SVD(const DMatCCC *A, DMatRRR *Sigma, DMatCCC *U, DMatCCC *VT)
static bool SVD_divide_conquer(const DMatCCC *A, DMatRRR *Sigma, DMatCCC *U, DMatCCC *VT)
static bool SVD_divide_conquer(const DMatRRR *A, DMatRRR *Sigma, DMatRRR *U, DMatRRR *VT)
static bool eigenvectors_symmetric(const DMatRRR *A, DMatRRR *eigenvals, DMatRRR *eigenvecs)
static bool eigenvalues_hermitian(const DMatCCC *A, DMatRRR *eigenvals)
static bool SVD(const DMatRRR *A, DMatRRR *Sigma, DMatRRR *U, DMatRRR *VT)
static bool QR(const DMatRR *A, DMatRR *Q, DMatRR *R, bool return_QR)
Definition lapack.cpp:898
static bool eigenvalues_symmetric(const DMatRRR *A, DMatRRR *eigenvals)
static bool solve(const DMatRRR *A, const DMatRRR *b, DMatRRR *x)
static M2_arrayintOrNull LU(const DMatRRR *A, DMatRRR *L, DMatRRR *U)
static bool eigenvectors_hermitian(const DMatCCC *A, DMatRRR *eigenvals, DMatCCC *eigenvecs)
static bool least_squares(const DMatRRR *A, const DMatRRR *b, DMatRRR *x)
static bool eigenvectors(const DMatRRR *A, DMatCCC *eigenvals, DMatCCC *eigenvecs)
DMat< M2::ARingCC > DMatCC
Definition lapack.hpp:557
static bool eigenvalues(const DMatRRR *A, DMatCCC *eigenvals)
static bool eigenvectors(const DMatCCC *A, DMatCCC *eigenvals, DMatCCC *eigenvecs)
static M2_arrayintOrNull LU(const DMatCCC *A, DMatCCC *L, DMatCCC *U)
static bool eigenvalues(const DMatCCC *A, DMatCCC *eigenvals)
static bool least_squares(const DMatCCC *A, const DMatCCC *b, DMatCCC *x)
static void freeRaw(__mpfr_struct *start, int size)
static bool least_squares_deficient(const DMatCCC *A, const DMatCCC *b, DMatCCC *x)
Static-method namespace bridging the engine's RR / CC / RRR / CCC dense matrices and LAPACK / BLAS ro...
Definition lapack.hpp:453
DMat<ACoeffRing> — dense-matrix template plus the umbrella that wires in every per-ring specialisatio...
int zgelss_(int *rows, int *cols, int *nhrs, double *A, int *ldA, double *b, int *ldb, double *Sigma, double *rcond, int *rank, double *work, int *lwork, double *rwork, int *info)
int dgesdd_(char *jobU, int *rows, int *cols, double *A, int *ldA, double *Sigma, double *U, int *ldU, double *VT, int *ldVT, double *work, int *lwork, int *iwork, int *info)
int zgeqrf_(int *m, int *n, double *A, int *lda, double *tau, double *work, int *lwork, int *info)
int zgesdd_(char *jobU, int *rows, int *cols, double *A, int *ldA, double *Sigma, double *U, int *ldU, double *VT, int *ldVT, double *w, int *lwork, double *rwork, int *iwork, int *info)
int zgesvd_(char *jobU, char *jobV, int *rows, int *cols, double *A, int *ldA, double *Sigma, double *U, int *ldU, double *VT, int *ldVT, double *w, int *lwork, double *rwork, int *info)
int zheev_(char *n, char *n2, int *size, double *M, int *lda, double *eig, double *w, int *wsize, double *rwork, int *info)
int zgetrf_(int *rows, int *cols, double *M, int *ld, int *ipiv, int *info)
int zgesv_(int *n, int *nrhs, double *a, int *lda, int *ipiv, double *b, int *ldb, int *info)
int zgels_(char *job, int *rows, int *cols, int *nhrs, double *A, int *ldA, double *b, int *ldb, double *work, int *lwork, int *info)
DMat< M2::ARingCCC > DMatCCC
Definition lapack.hpp:51
int dgeqrf_(int *m, int *n, double *A, int *lda, double *tau, double *work, int *lwork, int *info)
int zungqr_(int *m, int *n, int *k, double *A, int *lda, double *tau, double *work, int *lwork, int *info)
int dorgqr_(int *m, int *n, int *k, double *A, int *lda, double *tau, double *work, int *lwork, int *info)
int dsyev_(char *n, char *n2, int *size, double *M, int *lda, double *eig, double *work, int *wsize, int *info)
int dgeev_(char *n, char *n2, int *size, double *M, int *size1, double *E, double *E2, double *, int *, double *, int *, double *, int *, int *)
void cblas_dgemm(const int Order, const int TransA, const int TransB, const int M, const int N, const int K, const double alpha, const double *A, const int lda, const double *B, const int ldb, const double beta, double *C, const int ldc)
DMat< M2::ARingCC > DMatCC
Definition lapack.hpp:53
int dgesvd_(char *jobU, char *jobV, int *rows, int *cols, double *A, int *ldA, double *Sigma, double *U, int *ldU, double *VT, int *ldVT, double *work, int *lwork, int *info)
int zgeev_(char *n, char *n2, int *size, double *M, int *size1, double *E, double *l, int *lsize, double *r, int *rsize, double *w, int *wsize, double *rwork, int *info)
void cblas_dscal(const int n, const double a, double *x, const int incx)
int dgelss_(int *rows, int *cols, int *nhrs, double *A, int *ldA, double *b, int *ldb, double *Sigma, double *rcond, int *rank, double *work, int *lwork, int *info)
void dgetrf_(const int *rows, const int *cols, double *A, const int *ld, int *ipiv, int *info)
int dgesv_(int *n, int *nrhs, double *a, int *lda, int *ipiv, double *b, int *ldb, int *info)
void cblas_zgemm(const int Order, const int TransA, const int TransB, const int M, const int N, const int K, const void *alpha, const void *A, const int lda, const void *B, const int ldb, const void *beta, void *C, const int ldc)
int dgels_(char *job, int *rows, int *cols, int *nhrs, double *A, int *ldA, double *b, int *ldb, double *work, int *lwork, int *info)
DMat< M2::ARingRRR > DMatRRR
Definition lapack.hpp:50
DMat< M2::ARingRR > DMatRR
Definition lapack.hpp:52
void cblas_daxpy(const int n, const double a, const double *x, const int incx, double *y, const int incy)
M2_arrayint M2_arrayintOrNull
Definition m2-types.h:99
volatile int x