amino
Lightweight Robot Utility Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
/home/ntd/git/amino/clapack_doc.c
Go to the documentation of this file.
1 # 1 "doc/clapack_doc.c"
2 # 1 "<built-in>"
3 # 1 "<command-line>"
4 # 1 "/usr/include/stdc-predef.h" 1 3 4
5 /* Copyright (C) 1991-2014 Free Software Foundation, Inc.
6  This file is part of the GNU C Library.
7 
8  The GNU C Library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Lesser General Public
10  License as published by the Free Software Foundation; either
11  version 2.1 of the License, or (at your option) any later version.
12 
13  The GNU C Library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public
19  License along with the GNU C Library; if not, see
20  <http://www.gnu.org/licenses/>. */
21 
22 
23 
24 
25 /* This header is separate from features.h so that the compiler can
26  include it implicitly at the start of every compilation. It must
27  not itself include <features.h> or any other header that includes
28  <features.h> because the implicit include comes before any feature
29  test macros that may be defined in a source file before it first
30  explicitly includes a system header. GCC knows the name of this
31  header in order to preinclude it. */
32 
33 /* glibc's intent is to support the IEC 559 math functionality, real
34  and complex. If the GCC (4.9 and later) predefined macros
35  specifying compiler intent are available, use them to determine
36  whether the overall intent is to support these features; otherwise,
37  presume an older compiler has intent to support these features and
38  define these macros by default. */
39 # 52 "/usr/include/stdc-predef.h" 3 4
40 /* wchar_t uses ISO/IEC 10646 (2nd ed., published 2011-03-15) /
41  Unicode 6.0. */
42 
43 
44 /* We do not support C11 <threads.h>. */
45 # 1 "<command-line>" 2
46 # 1 "doc/clapack_doc.c"
47 
48 
49 /* The file is preprocess to give Doxygen some useful input */
50 
53 # 1 "./include/amino/clapack.h" 1
54 /* -*- mode: C; c-basic-offset: 4 -*- */
55 /* ex: set shiftwidth=4 tabstop=4 expandtab: */
56 /*
57  * Copyright (c) 2011-2012, Georgia Tech Research Corporation
58  * All rights reserved.
59  *
60  * Author(s): Neil T. Dantam <ntd@gatech.edu>
61  * Georgia Tech Humanoid Robotics Lab
62  * Under Direction of Prof. Mike Stilman <mstilman@cc.gatech.edu>
63  *
64  *
65  * This file is provided under the following "BSD-style" License:
66  *
67  *
68  * Redistribution and use in source and binary forms, with or
69  * without modification, are permitted provided that the following
70  * conditions are met:
71  *
72  * * Redistributions of source code must retain the above copyright
73  * notice, this list of conditions and the following disclaimer.
74  *
75  * * Redistributions in binary form must reproduce the above
76  * copyright notice, this list of conditions and the following
77  * disclaimer in the documentation and/or other materials provided
78  * with the distribution.
79  *
80  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
81  * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
82  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
83  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
84  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
85  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
86  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
87  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
88  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
89  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
90  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
91  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
92  * POSSIBILITY OF SUCH DAMAGE.
93  *
94  */
95 
96 
97 
98 
103 static inline int aa_cla_ilaenv( int ispec,
104  const char *name, const char *opts,
105  int n1, int n2, int n3, int n4 ) {
106  int nl = (int)strlen(name);
107  int ol = (int)strlen(opts);
108  return ilaenv_(&ispec, name, opts, &n1, &n2, &n3, &n4, nl, ol );
109 }
110 
111 
112 # 1 "./include/amino/clapack_impl.h" 1
113 /* -*- mode: C; c-basic-offset: 4 -*- */
114 /* ex: set shiftwidth=4 tabstop=4 expandtab: */
115 /*
116  * Copyright (c) 2011-2012, Georgia Tech Research Corporation
117  * All rights reserved.
118  *
119  * Author(s): Neil T. Dantam <ntd@gatech.edu>
120  * Georgia Tech Humanoid Robotics Lab
121  * Under Direction of Prof. Mike Stilman <mstilman@cc.gatech.edu>
122  *
123  *
124  * This file is provided under the following "BSD-style" License:
125  *
126  *
127  * Redistribution and use in source and binary forms, with or
128  * without modification, are permitted provided that the following
129  * conditions are met:
130  *
131  * * Redistributions of source code must retain the above copyright
132  * notice, this list of conditions and the following disclaimer.
133  *
134  * * Redistributions in binary form must reproduce the above
135  * copyright notice, this list of conditions and the following
136  * disclaimer in the documentation and/or other materials provided
137  * with the distribution.
138  *
139  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
140  * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
141  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
142  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
143  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
144  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
145  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
146  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
147  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
148  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
149  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
150  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
151  * POSSIBILITY OF SUCH DAMAGE.
152  *
153  */
154 
155 # 1 "./include/amino/def.h" 1
156 # 42 "./include/amino/def.h"
157 # 1 "./include/amino/mangle.h" 1
158 # 43 "./include/amino/def.h" 2
159 # 44 "./include/amino/clapack_impl.h" 2
160 
165 static inline int aa_cla_dgetrf
166 ( int m, int n, double *A, int lda, int *ipiv ) {
167  int info;
168  dgetrf_
169  (&m, &n, A, &lda, ipiv, &info );
170  return info;
171 }
172 
177 static inline int aa_cla_dgetri
178 ( int n, double *A, int lda, int *ipiv, double *work, int lwork ) {
179  int info;
180  dgetri_
181  ( &n, A, &lda, ipiv, work, &lwork, &info );
182  return info;
183 }
184 
185 
186 static inline int aa_cla_dgesdd
187 (char jobz, int m, int n,
188  double *A, int lda,
189  double *S,
190  double *U, int ldu,
191  double *VT, int ldvt,
192  double *work, int lwork,
193  int *iwork )
194 {
195  int info;
196  dgesdd_( &jobz, &m, &n,
197  A, &lda,
198  S,
199  U, &ldu,
200  VT, &ldvt,
201  work, &lwork,
202  iwork, &info );
203  return info;
204 }
205 
206 
212 static inline int aa_cla_dgeqrf
213 ( int m, int n, double *A, int lda,
214  double *tau, double *work, int lwork )
215 {
216  int info;
217  dgeqrf_
218  (&m, &n, A, &lda, tau,
219  work, &lwork,
220  &info );
221  return info;
222 }
223 
224 static inline int aa_cla_dorgqr
225 ( const int m, const int n, const int k,
226  double *A, const int lda, const double *tau,
227  double *work, const int lwork )
228 {
229  int info;
230  dorgqr_(&m, &n, &k,
231  A, &lda, tau,
232  work, &lwork, &info);
233  return info;
234 }
235 
236 
237 static inline int aa_cla_dposv
238 ( char uplo, int n, int nrhs,
239  double *A, int lda,
240  double *B, int ldb )
241 {
242  int info;
243  dposv_(&uplo, &n, &nrhs,
244  A, &lda,
245  B, &ldb,
246  &info );
247  return info;
248 }
249 
251 static inline int aa_cla_dgelsd_smlsiz () {
252  return aa_cla_ilaenv( 9, "D"
253  "GELSD", "", 0, 0, 0, 0 );
254 }
255 
257 static inline int aa_cla_dgelsd_nlvl
258 ( int m, int n ) {
259  int minmn = AA_MIN(m,n);
260  int smlsiz = aa_cla_dgelsd_smlsiz();
261  return (int)AA_MAX(0, 1 + log2( minmn / (1 + smlsiz)));
262 }
263 
265 static inline int aa_cla_dgelsd_miniwork
266 ( int m, int n ) {
267  int minmn = AA_MIN(m,n);
268  int nlvl = aa_cla_dgelsd_nlvl(m,n);
269  return AA_MAX(1,
270  3 * minmn * nlvl + 11 * minmn);
271 }
272 
277 static inline int aa_cla_dgelsd
278 ( int m, int n, int nrhs,
279  double *A, int lda,
280  double *B, int ldb,
281  double *S, double *rcond, int *rank,
282  double *work, int lwork, int *iwork ) {
283  int info;
284  dgelsd_
285  ( &m, &n, &nrhs, A, &lda, B, &ldb,
286  S, rcond, rank, work, &lwork, iwork, &info );
287  return info;
288 }
289 
294 static inline void aa_cla_dlacpy
295 ( char uplo, int m, int n,
296  const double *A, int lda,
297  double *B, int ldb ) {
298  dlacpy_ (&uplo, &m, &n,
299  A, &lda, B, &ldb );
300 }
301 
306 static inline void aa_cla_dlaset
307 ( char UPLO, int M, int N,
308  double ALPHA,
309  double BETA,
310  double *A, int LDA )
311 {
312  dlaset_ (&UPLO, &M, &N,
313  &ALPHA, &BETA,
314  A, &LDA);
315 }
316 
321 static inline double aa_cla_dlapy2
322 ( double x, double y )
323 {
324  return dlapy2_(&x, &y);
325 }
326 
331 static inline double aa_cla_dlapy3
332 ( double x, double y, double z )
333 {
334  return dlapy3_(&x, &y, &z);
335 }
336 
341 static inline void aa_cla_dlaruv
342 ( int iseed[4], int n, double *X )
343 {
344  dlaruv_ (iseed, &n, X);
345 }
346 
351 static inline void aa_cla_dlarnv
352 ( int idist, int iseed[4], int n, double *X )
353 {
354  dlarnv_ (&idist, iseed, &n, X);
355 }
356 
361 static inline int aa_cla_dlascl
362 ( char TYPE, int KL, int KU,
363  double CFROM, double CTO,
364  int M, int N, double *A, int LDA ) {
365  int info;
366  dlascl_
367  ( &TYPE, &KL, &KU, &CFROM, &CTO,
368  &M, &N, A, &LDA, &info );
369  return info;
370 }
371 
372 
377 static inline int aa_cla_dlag2s
378 ( int M, int N,
379  double *A, int LDA,
380  float *SA, int LDSA ) {
381  int info;
382  dlag2s_( &M, &N, A, &LDA, SA, &LDSA, &info);
383  return info;
384 }
385 
386 
387 
388 
393 static inline int aa_cla_dlag2d
394 ( int M, int N,
395  float * SA, int LDSA,
396  double *A, int LDA ) {
397  int info;
398  slag2d_( &M, &N, SA, &LDSA, A, &LDA, &info );
399  return info;
400 }
401 
402 
403 
404 # 1 "./include/amino/undef.h" 1
405 # 288 "./include/amino/clapack_impl.h" 2
406 # 60 "./include/amino/clapack.h" 2
407 
408 
409 
410 # 1 "./include/amino/clapack_impl.h" 1
411 /* -*- mode: C; c-basic-offset: 4 -*- */
412 /* ex: set shiftwidth=4 tabstop=4 expandtab: */
413 /*
414  * Copyright (c) 2011-2012, Georgia Tech Research Corporation
415  * All rights reserved.
416  *
417  * Author(s): Neil T. Dantam <ntd@gatech.edu>
418  * Georgia Tech Humanoid Robotics Lab
419  * Under Direction of Prof. Mike Stilman <mstilman@cc.gatech.edu>
420  *
421  *
422  * This file is provided under the following "BSD-style" License:
423  *
424  *
425  * Redistribution and use in source and binary forms, with or
426  * without modification, are permitted provided that the following
427  * conditions are met:
428  *
429  * * Redistributions of source code must retain the above copyright
430  * notice, this list of conditions and the following disclaimer.
431  *
432  * * Redistributions in binary form must reproduce the above
433  * copyright notice, this list of conditions and the following
434  * disclaimer in the documentation and/or other materials provided
435  * with the distribution.
436  *
437  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
438  * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
439  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
440  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
441  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
442  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
443  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
444  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
445  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
446  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
447  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
448  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
449  * POSSIBILITY OF SUCH DAMAGE.
450  *
451  */
452 
453 # 1 "./include/amino/def.h" 1
454 # 44 "./include/amino/clapack_impl.h" 2
455 
460 static inline int aa_cla_sgetrf
461 ( int m, int n, float *A, int lda, int *ipiv ) {
462  int info;
463  sgetrf_
464  (&m, &n, A, &lda, ipiv, &info );
465  return info;
466 }
467 
472 static inline int aa_cla_sgetri
473 ( int n, float *A, int lda, int *ipiv, float *work, int lwork ) {
474  int info;
475  sgetri_
476  ( &n, A, &lda, ipiv, work, &lwork, &info );
477  return info;
478 }
479 
480 
481 static inline int aa_cla_sgesdd
482 (char jobz, int m, int n,
483  float *A, int lda,
484  float *S,
485  float *U, int ldu,
486  float *VT, int ldvt,
487  float *work, int lwork,
488  int *iwork )
489 {
490  int info;
491  sgesdd_( &jobz, &m, &n,
492  A, &lda,
493  S,
494  U, &ldu,
495  VT, &ldvt,
496  work, &lwork,
497  iwork, &info );
498  return info;
499 }
500 
501 
507 static inline int aa_cla_sgeqrf
508 ( int m, int n, float *A, int lda,
509  float *tau, float *work, int lwork )
510 {
511  int info;
512  sgeqrf_
513  (&m, &n, A, &lda, tau,
514  work, &lwork,
515  &info );
516  return info;
517 }
518 
519 static inline int aa_cla_sorgqr
520 ( const int m, const int n, const int k,
521  float *A, const int lda, const float *tau,
522  float *work, const int lwork )
523 {
524  int info;
525  sorgqr_(&m, &n, &k,
526  A, &lda, tau,
527  work, &lwork, &info);
528  return info;
529 }
530 
531 
532 static inline int aa_cla_sposv
533 ( char uplo, int n, int nrhs,
534  float *A, int lda,
535  float *B, int ldb )
536 {
537  int info;
538  sposv_(&uplo, &n, &nrhs,
539  A, &lda,
540  B, &ldb,
541  &info );
542  return info;
543 }
544 
546 static inline int aa_cla_sgelsd_smlsiz () {
547  return aa_cla_ilaenv( 9, "S"
548  "GELSD", "", 0, 0, 0, 0 );
549 }
550 
552 static inline int aa_cla_sgelsd_nlvl
553 ( int m, int n ) {
554  int minmn = AA_MIN(m,n);
555  int smlsiz = aa_cla_sgelsd_smlsiz();
556  return (int)AA_MAX(0, 1 + log2( minmn / (1 + smlsiz)));
557 }
558 
560 static inline int aa_cla_sgelsd_miniwork
561 ( int m, int n ) {
562  int minmn = AA_MIN(m,n);
563  int nlvl = aa_cla_sgelsd_nlvl(m,n);
564  return AA_MAX(1,
565  3 * minmn * nlvl + 11 * minmn);
566 }
567 
572 static inline int aa_cla_sgelsd
573 ( int m, int n, int nrhs,
574  float *A, int lda,
575  float *B, int ldb,
576  float *S, float *rcond, int *rank,
577  float *work, int lwork, int *iwork ) {
578  int info;
579  sgelsd_
580  ( &m, &n, &nrhs, A, &lda, B, &ldb,
581  S, rcond, rank, work, &lwork, iwork, &info );
582  return info;
583 }
584 
589 static inline void aa_cla_slacpy
590 ( char uplo, int m, int n,
591  const float *A, int lda,
592  float *B, int ldb ) {
593  slacpy_ (&uplo, &m, &n,
594  A, &lda, B, &ldb );
595 }
596 
601 static inline void aa_cla_slaset
602 ( char UPLO, int M, int N,
603  float ALPHA,
604  float BETA,
605  float *A, int LDA )
606 {
607  slaset_ (&UPLO, &M, &N,
608  &ALPHA, &BETA,
609  A, &LDA);
610 }
611 
616 static inline float aa_cla_slapy2
617 ( float x, float y )
618 {
619  return slapy2_(&x, &y);
620 }
621 
626 static inline float aa_cla_slapy3
627 ( float x, float y, float z )
628 {
629  return slapy3_(&x, &y, &z);
630 }
631 
636 static inline void aa_cla_slaruv
637 ( int iseed[4], int n, float *X )
638 {
639  slaruv_ (iseed, &n, X);
640 }
641 
646 static inline void aa_cla_slarnv
647 ( int idist, int iseed[4], int n, float *X )
648 {
649  slarnv_ (&idist, iseed, &n, X);
650 }
651 
656 static inline int aa_cla_slascl
657 ( char TYPE, int KL, int KU,
658  float CFROM, float CTO,
659  int M, int N, float *A, int LDA ) {
660  int info;
661  slascl_
662  ( &TYPE, &KL, &KU, &CFROM, &CTO,
663  &M, &N, A, &LDA, &info );
664  return info;
665 }
666 
667 
672 static inline int aa_cla_slag2s
673 ( int M, int N,
674  double *A, int LDA,
675  float *SA, int LDSA ) {
676  int info;
677  dlag2s_( &M, &N, A, &LDA, SA, &LDSA, &info);
678  return info;
679 }
680 
681 
682 
683 
688 static inline int aa_cla_slag2d
689 ( int M, int N,
690  float * SA, int LDSA,
691  double *A, int LDA ) {
692  int info;
693  slag2d_( &M, &N, SA, &LDSA, A, &LDA, &info );
694  return info;
695 }
696 
697 
698 
699 # 1 "./include/amino/undef.h" 1
700 # 288 "./include/amino/clapack_impl.h" 2
701 # 64 "./include/amino/clapack.h" 2
702 # 7 "doc/clapack_doc.c" 2
AA_API void dgetrf_(const int *M, const int *N, double *A, const int *LDA, int *IPIV, int *INFO)
Computes an LU factorization of a general M-by-N matrix A using partial pivoting with row interchange...
AA_API void dgetri_(const int *N, double *A, const int *LDA, const int *IPIV, double *WORK, const int *LWORK, int *INFO)
type for operations
AA_API void sgetri_(const int *N, float *A, const int *LDA, const int *IPIV, float *WORK, const int *LWORK, int *INFO)
type for operations
static void aa_cla_slacpy(char uplo, int m, int n, const float *A, int lda, float *B, int ldb)
Matrix copy.
Definition: clapack_doc.c:590
#define AA_MIN(a, b)
minimum of a and b
Definition: math.h:69
static int aa_cla_sgeqrf(int m, int n, float *A, int lda, float *tau, float *work, int lwork)
Row Factor.
Definition: clapack_doc.c:508
static void aa_cla_dlaruv(int iseed[4], int n, double *X)
Uniform random vector.
Definition: clapack_doc.c:342
AA_API void slascl_(const char TYPE[1], const int *KL, const int *KU, const float *CFROM, const float *CTO, const int *M, const int *N, float *A, const int *LDA, int *INFO)
Multiplies the M by N real matrix A by the real scalar CTO/CFROM.
AA_API float slapy2_(const float *x, const float *y)
Returns sqrt(x**2+y**2), taking care not to cause unnecessary overflow.
AA_API void dlarnv_(const int *IDIST, int ISEED[4], const int *N, double *X)
Returns a vector of n random real numbers from a uniform or normal distribution.
static int aa_cla_ilaenv(int ispec, const char *name, const char *opts, int n1, int n2, int n3, int n4)
ILAENV is called from the LAPACK routines to choose problem-dependent parameters for the local enviro...
Definition: clapack_doc.c:103
AA_API float slapy3_(const float *x, const float *y, const float *z)
Returns sqrt(x**2+y**2+z**2), taking care not to cause unnecessary overflow.
static int aa_cla_dgetri(int n, double *A, int lda, int *ipiv, double *work, int lwork)
Invert matrix.
Definition: clapack_doc.c:178
AA_API void sgelsd_(const int *M, const int *N, const int *NRHS, float *A, const int *LDA, float *B, const int *LDB, float *S, const float *RCOND, int *RANK, float *WORK, int *LWORK, int *IWORK, int *INFO)
DGELSD computes the minimum-norm solution to a real linear least squares problem. ...
static float aa_cla_slapy2(float x, float y)
Norm-2.
Definition: clapack_doc.c:617
AA_API void sgetrf_(const int *M, const int *N, float *A, const int *LDA, int *IPIV, int *INFO)
Computes an LU factorization of a general M-by-N matrix A using partial pivoting with row interchange...
AA_API void dorgqr_(const int *M, const int *N, const int *K, double *A, const int *LDA, const double *TAU, double *WORK, const int *LWORK, int *INFO)
Generates an M-by-N real matrix Q with orthonormal columns, which is defined as the first N columns o...
static void aa_cla_slaruv(int iseed[4], int n, float *X)
Uniform random vector.
Definition: clapack_doc.c:637
static void aa_cla_dlaset(char UPLO, int M, int N, double ALPHA, double BETA, double *A, int LDA)
Set values in a matrix.
Definition: clapack_doc.c:307
AA_API void dlaruv_(int ISEED[4], const int *N, double *X)
Returns a vector of n random real numbers from a uniform (0,1) distribution (n <= 128)...
AA_API void dgelsd_(const int *M, const int *N, const int *NRHS, double *A, const int *LDA, double *B, const int *LDB, double *S, const double *RCOND, int *RANK, double *WORK, int *LWORK, int *IWORK, int *INFO)
DGELSD computes the minimum-norm solution to a real linear least squares problem. ...
static int aa_cla_dlag2s(int M, int N, double *A, int LDA, float *SA, int LDSA)
Convert double to single float.
Definition: clapack_doc.c:378
AA_API void slag2d_(const int *M, const int *N, float *SA, const int *LDSA, double *A, const int *LDA, const int *INFO)
Converts a SINGLE PRECISION matrix, SA, to a DOUBLE PRECISION matrix, A.
#define AA_MAX(a, b)
maximum of a and b
Definition: math.h:63
static int aa_cla_dgeqrf(int m, int n, double *A, int lda, double *tau, double *work, int lwork)
Row Factor.
Definition: clapack_doc.c:213
static double aa_cla_dlapy2(double x, double y)
Norm-2.
Definition: clapack_doc.c:322
static int aa_cla_dgelsd_miniwork(int m, int n)
Minimum iwork for xgelsd.
Definition: clapack_doc.c:266
AA_API int ilaenv_(const int *ispec, const char *name, const char *opts, const int *n1, const int *n2, const int *n3, const int *n4, int name_length, int opts_length)
ILAENV is called from the LAPACK routines to choose problem-dependent parameters for the local enviro...
AA_API void slaruv_(int ISEED[4], const int *N, float *X)
Returns a vector of n random real numbers from a uniform (0,1) distribution (n <= 128)...
static double aa_cla_dlapy3(double x, double y, double z)
Norm-2.
Definition: clapack_doc.c:332
AA_API void slarnv_(const int *IDIST, int ISEED[4], const int *N, float *X)
Returns a vector of n random real numbers from a uniform or normal distribution.
static int aa_cla_sgetri(int n, float *A, int lda, int *ipiv, float *work, int lwork)
Invert matrix.
Definition: clapack_doc.c:473
AA_API void dlaset_(const char UPLO[1], const int *M, const int *N, const double *ALPHA, const double *BETA, double *A, const int *LDA)
initializes an m-by-n matrix A to BETA on the diagonal and ALPHA on the offdiagonals.
static int aa_cla_slag2s(int M, int N, double *A, int LDA, float *SA, int LDSA)
Convert double to single float.
Definition: clapack_doc.c:673
AA_API void slaset_(const char UPLO[1], const int *M, const int *N, const float *ALPHA, const float *BETA, float *A, const int *LDA)
initializes an m-by-n matrix A to BETA on the diagonal and ALPHA on the offdiagonals.
static int aa_cla_sgelsd_miniwork(int m, int n)
Minimum iwork for xgelsd.
Definition: clapack_doc.c:561
AA_API void sgeqrf_(const int *M, const int *N, float *A, const int *LDA, float *TAU, float *WORK, int *LWORK, int *INFO)
DGEQRF computes a QR factorization of a real M-by-N matrix A: A = Q * R.
static int aa_cla_sgelsd_nlvl(int m, int n)
part of worksize computation for xgelsd
Definition: clapack_doc.c:553
AA_API void dlag2s_(const int *M, const int *N, double *A, const int *LDA, float *SA, const int *LDSA, const int *INFO)
Converts a DOUBLE PRECISION matrix, SA, to a SINGLE PRECISION matrix, A.
AA_API void dlascl_(const char TYPE[1], const int *KL, const int *KU, const double *CFROM, const double *CTO, const int *M, const int *N, double *A, const int *LDA, int *INFO)
Multiplies the M by N real matrix A by the real scalar CTO/CFROM.
static int aa_cla_dgelsd_smlsiz()
part of worksize computation for xgelsd
Definition: clapack_doc.c:251
static int aa_cla_dlascl(char TYPE, int KL, int KU, double CFROM, double CTO, int M, int N, double *A, int LDA)
Scale matrix.
Definition: clapack_doc.c:362
static void aa_cla_dlarnv(int idist, int iseed[4], int n, double *X)
Normal random vector.
Definition: clapack_doc.c:352
AA_API void dgeqrf_(const int *M, const int *N, double *A, const int *LDA, double *TAU, double *WORK, int *LWORK, int *INFO)
DGEQRF computes a QR factorization of a real M-by-N matrix A: A = Q * R.
static int aa_cla_sgelsd(int m, int n, int nrhs, float *A, int lda, float *B, int ldb, float *S, float *rcond, int *rank, float *work, int lwork, int *iwork)
Linear least squares.
Definition: clapack_doc.c:573
static int aa_cla_sgetrf(int m, int n, float *A, int lda, int *ipiv)
Row Factor.
Definition: clapack_doc.c:461
static void aa_cla_slaset(char UPLO, int M, int N, float ALPHA, float BETA, float *A, int LDA)
Set values in a matrix.
Definition: clapack_doc.c:602
static void aa_cla_dlacpy(char uplo, int m, int n, const double *A, int lda, double *B, int ldb)
Matrix copy.
Definition: clapack_doc.c:295
AA_API void sorgqr_(const int *M, const int *N, const int *K, float *A, const int *LDA, const float *TAU, float *WORK, const int *LWORK, int *INFO)
Generates an M-by-N real matrix Q with orthonormal columns, which is defined as the first N columns o...
static int aa_cla_dgelsd(int m, int n, int nrhs, double *A, int lda, double *B, int ldb, double *S, double *rcond, int *rank, double *work, int lwork, int *iwork)
Linear least squares.
Definition: clapack_doc.c:278
static void aa_cla_slarnv(int idist, int iseed[4], int n, float *X)
Normal random vector.
Definition: clapack_doc.c:647
AA_API void slacpy_(const char UPLO[1], const int *M, const int *N, const float *A, const int *LDA, float *B, const int *LDB)
Copies all or part of a two-dimensional matrix A to another matrix B.
static int aa_cla_dgetrf(int m, int n, double *A, int lda, int *ipiv)
Row Factor.
Definition: clapack_doc.c:166
static int aa_cla_slag2d(int M, int N, float *SA, int LDSA, double *A, int LDA)
Convert single to double float.
Definition: clapack_doc.c:689
static int aa_cla_dlag2d(int M, int N, float *SA, int LDSA, double *A, int LDA)
Convert single to double float.
Definition: clapack_doc.c:394
AA_API void dlacpy_(const char UPLO[1], const int *M, const int *N, const double *A, const int *LDA, double *B, const int *LDB)
Copies all or part of a two-dimensional matrix A to another matrix B.
static float aa_cla_slapy3(float x, float y, float z)
Norm-2.
Definition: clapack_doc.c:627
static int aa_cla_dgelsd_nlvl(int m, int n)
part of worksize computation for xgelsd
Definition: clapack_doc.c:258
AA_API double dlapy2_(const double *x, const double *y)
Returns sqrt(x**2+y**2), taking care not to cause unnecessary overflow.
AA_API double dlapy3_(const double *x, const double *y, const double *z)
Returns sqrt(x**2+y**2+z**2), taking care not to cause unnecessary overflow.
static int aa_cla_sgelsd_smlsiz()
part of worksize computation for xgelsd
Definition: clapack_doc.c:546
static int aa_cla_slascl(char TYPE, int KL, int KU, float CFROM, float CTO, int M, int N, float *A, int LDA)
Scale matrix.
Definition: clapack_doc.c:657