Lapack.h 121 KB
Newer Older
1 2
/*
 *  R : A Computer Language for Statistical Data Analysis
3 4
 *  Copyright (C) 2003-2019 The R Core Team.
 *  Copyright (C) 2008-2019 The R Foundation
5
 *
6
 *  This header file is free software; you can redistribute it and/or modify
7 8 9 10
 *  it under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation; either version 2.1 of the License, or
 *  (at your option) any later version.
 *
11 12 13 14
 *  This file is part of R. R is distributed under the terms of the
 *  GNU General Public License, either Version 2, June 1991 or Version 3,
 *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
 *
15 16 17 18 19 20
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public License
21
 *  along with this program; if not, a copy is available at
22
 *  https://www.R-project.org/Licenses/
23 24
 */

25
/*
26 27 28 29 30 31 32 33 34 35
   C declarations of LAPACK Fortran subroutines included in R.
   Just those used (currently or previously) by C routines in R itself.

   Part of the API.

   R packages that use these should have PKG_LIBS in src/Makevars include 
   $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
 */


36 37 38 39 40 41 42
#ifndef R_LAPACK_H
#define R_LAPACK_H

#include <R_ext/RS.h>		/* for F77_... */
#include <R_ext/Complex.h>	/* for Rcomplex */
#include <R_ext/BLAS.h>

43

44
/*
45 46 47
  LAPACK function names are [dz]<name>(), where d denotes the real
  version of the function, z the complex version.  (Only
  double-precision versions are used in R.)
48 49 50
*/

#ifdef	__cplusplus
51 52 53
extern "C" {
#endif

54 55 56 57 58
/* The LAPACK version: might change after installation with
   external LAPACK
*/
extern void F77_NAME(ilaver)(int *major, int *minor, int *patch);

59
// Never defined by R itself.
60 61 62 63
#ifndef La_extern
#define La_extern extern
#endif

64 65
// Utilities for Lapack-using packages :
// ------------------------------------
66 67 68

/* matrix norms: converting typstr[]  to one of {'M', 'O', 'I', 'F'}
 * or signal error(): */
69
// La_extern char La_norm_type(const char *typstr);
70 71 72

/* matrix (reciprocal) condition numbers: convert typstr[]  to 'O'(ne) or 'I'(nf)
 * or signal error(): */
73
// La_extern char La_rcond_type(const char *typstr);
74 75 76


/* Selected Double Precision Lapack Routines
77 78 79
   ========
 */

80
//* Double precision BiDiagonal and DIagonal matrices  -> DBD & DDI
81 82 83

/* DBDSQR - compute the singular value decomposition (SVD) of a real */
/* N-by-N (upper or lower) bidiagonal matrix B */
84
La_extern void
85 86 87 88 89 90 91 92
F77_NAME(dbdsqr)(const char* uplo, const int* n, const int* ncvt,
		 const int* nru, const int* ncc, double* d, double* e,
		 double* vt, const int* ldvt, double* u, const int* ldu,
		 double* c, const int* ldc, double* work, int* info);
/* DDISNA - compute the reciprocal condition numbers for the */
/* eigenvectors of a real symmetric or complex Hermitian matrix or */
/* for the left or right singular vectors of a general m-by-n */
/* matrix */
93
La_extern void
94 95 96
F77_NAME(ddisna)(const char* job, const int* m, const int* n,
		 double* d, double* sep, int* info);

97 98

//* Double precision General Banded matrices -> DGB
99 100 101

/* DGBBRD - reduce a real general m-by-n band matrix A to upper */
/* bidiagonal form B by an orthogonal transformation  */
102
La_extern void
103 104 105 106 107 108 109 110 111 112
F77_NAME(dgbbrd)(const char* vect, const int* m, const int* n,
		 const int* ncc, const int* kl, const int* ku,
		 double* ab, const int* ldab,
		 double* d, double* e, double* q,
		 const int* ldq, double* pt, const int* ldpt,
		 double* c, const int* ldc,
		 double* work, int* info);
/* DGBCON - estimate the reciprocal of the condition number of a */
/* real general band matrix A, in either the 1-norm or the */
/* infinity-norm */
113
La_extern void
114 115 116 117 118 119
F77_NAME(dgbcon)(const char* norm, const int* n, const int* kl,
		 const int* ku, double* ab, const int* ldab,
		 int* ipiv, const double* anorm, double* rcond,
		 double* work, int* iwork, int* info);
/* DGBEQU - compute row and column scalings intended to equilibrate */
/* an M-by-N band matrix A and reduce its condition number */
120
La_extern void
121 122 123 124 125 126
F77_NAME(dgbequ)(const int* m, const int* n, const int* kl, const int* ku,
		 double* ab, const int* ldab, double* r, double* c,
		 double* rowcnd, double* colcnd, double* amax, int* info);
/* DGBRFS - improve the computed solution to a system of linear */
/* equations when the coefficient matrix is banded, and provides */
/* error bounds and backward error estimates for the solution */
127
La_extern void
128 129 130 131 132 133 134 135 136 137
F77_NAME(dgbrfs)(const char* trans, const int* n, const int* kl,
		 const int* ku, const int* nrhs, double* ab,
		 const int* ldab, double* afb, const int* ldafb,
		 int* ipiv, double* b, const int* ldb,
		 double* x, const int* ldx, double* ferr, double* berr,
		 double* work, int* iwork, int* info);
/* DGBSV - compute the solution to a real system of linear */
/* equations A * X = B, where A is a band matrix of order N with */
/* KL subdiagonals and KU superdiagonals, and X and B are */
/* N-by-NRHS matrices */
138
La_extern void
139 140 141 142 143
F77_NAME(dgbsv)(const int* n, const int* kl,const int* ku,
		const int* nrhs, double* ab, const int* ldab,
		int* ipiv, double* b, const int* ldb, int* info);
/* DGBSVX - use the LU factorization to compute the solution to a */
/* real system of linear equations A * X = B or A**T * X = B */
144
La_extern void
145 146 147 148
F77_NAME(dgbsvx)(const int* fact, const char* trans,
		 const int* n, const int* kl,const int* ku,
		 const int* nrhs, double* ab, const int* ldab,
		 double* afb, const int* ldafb, int* ipiv,
149
		 const char* equed, double* r, double* c,
150 151 152 153 154 155
		 double* b, const int* ldb,
		 double* x, const int* ldx,
		 double* rcond, double* ferr, double* berr,
		 double* work, int* iwork, int* info);
/* DGBTF2 - compute an LU factorization of a real m-by-n band */
/* matrix A using partial pivoting with row interchanges */
156
La_extern void
157 158 159 160
F77_NAME(dgbtf2)(const int* m, const int* n, const int* kl,const int* ku,
		 double* ab, const int* ldab, int* ipiv, int* info);
/* DGBTRF - compute an LU factorization of a real m-by-n band */
/* matrix A using partial pivoting with row interchanges */
161
La_extern void
162
F77_NAME(dgbtrf)(const int* m, const int* n, const int* kl,const int* ku,
163 164
		  double* ab, const int* ldab, int* ipiv, int* info);
/* DGBTRS - solve a system of linear equations	A * X = B or  */
165 166
/* A' * X = B with a general band matrix A using the LU */
/* factorization computed by DGBTRF */
167
La_extern void
168 169 170 171 172
F77_NAME(dgbtrs)(const char* trans, const int* n,
		 const int* kl, const int* ku, const int* nrhs,
		 const double* ab, const int* ldab, const int* ipiv,
		 double* b, const int* ldb, int* info);

173 174

//* Double precision GEneral matrices -> DGE
175 176 177 178

/* DGEBAK - form the right or left eigenvectors of a real general */
/* matrix by backward transformation on the computed eigenvectors */
/* of the balanced matrix output by DGEBAL  */
179
La_extern void
180 181 182 183
F77_NAME(dgebak)(const char* job, const char* side, const int* n,
		 const int* ilo, const int* ihi, double* scale,
		 const int* m, double* v, const int* ldv, int* info);
/* DGEBAL - balance a general real matrix A */
184
La_extern void
185
F77_NAME(dgebal)(const char* job, const int* n, double* a, const int* lda,
186
		  int* ilo, int* ihi, double* scale, int* info);
187 188
/* DGEBD2 - reduce a real general m by n matrix A to upper or */
/* lower bidiagonal form B by an orthogonal transformation */
189
La_extern void
190 191 192 193 194
F77_NAME(dgebd2)(const int* m, const int* n, double* a, const int* lda,
		 double* d, double* e, double* tauq, double* taup,
		 double* work, int* info);
/* DGEBRD - reduce a general real M-by-N matrix A to upper or */
/* lower bidiagonal form B by an orthogonal transformation */
195
La_extern void
196 197 198 199 200 201
F77_NAME(dgebrd)(const int* m, const int* n, double* a, const int* lda,
		 double* d, double* e, double* tauq, double* taup,
		 double* work, const int* lwork, int* info);
/* DGECON - estimate the reciprocal of the condition number of a */
/* general real matrix A, in either the 1-norm or the */
/* infinity-norm, using the LU factorization computed by DGETRF */
202
La_extern void
203 204 205 206
F77_NAME(dgecon)(const char* norm, const int* n,
		 const double* a, const int* lda,
		 const double* anorm, double* rcond,
		 double* work, int* iwork, int* info);
207 208
/* DGEEQU - compute row and column scalings intended to equilibrate */
/* an M-by-N matrix A and reduce its condition number */
209
La_extern void
210 211 212 213 214 215
F77_NAME(dgeequ)(const int* m, const int* n, double* a, const int* lda,
		 double* r, double* c, double* rowcnd, double* colcnd,
		 double* amax, int* info);
/* DGEES - compute for an N-by-N real nonsymmetric matrix A, the */
/* eigenvalues, the real Schur form T, and, optionally, the matrix */
/* of Schur vectors Z */
216
La_extern void
217 218 219 220 221 222 223 224 225
F77_NAME(dgees)(const char* jobvs, const char* sort,
		int (*select)(const double*, const double*),
		const int* n, double* a, const int* lda,
		int* sdim, double* wr, double* wi,
		double* vs, const int* ldvs,
		double* work, const int* lwork, int* bwork, int* info);
/* DGEESX - compute for an N-by-N real nonsymmetric matrix A, the */
/* eigenvalues, the real Schur form T, and, optionally, the matrix */
/* of Schur vectors Z */
226
La_extern void
227 228 229 230 231 232 233 234 235
F77_NAME(dgeesx)(const char* jobvs, const char* sort,
		 int (*select)(const double*, const double*),
		 const char* sense, const int* n, double* a,
		 const int* lda, int* sdim, double* wr, double* wi,
		 double* vs, const int* ldvs, double* rconde,
		 double* rcondv, double* work, const int* lwork,
		 int* iwork, const int* liwork, int* bwork, int* info);
/* DGEEV - compute for an N-by-N real nonsymmetric matrix A, the */
/* eigenvalues and, optionally, the left and/or right eigenvectors */
236
La_extern void
237 238 239 240 241 242 243
F77_NAME(dgeev)(const char* jobvl, const char* jobvr,
		const int* n, double* a, const int* lda,
		double* wr, double* wi, double* vl, const int* ldvl,
		double* vr, const int* ldvr,
		double* work, const int* lwork, int* info);
/* DGEEVX - compute for an N-by-N real nonsymmetric matrix A, the */
/* eigenvalues and, optionally, the left and/or right eigenvectors */
244
La_extern void
245 246 247 248 249 250 251 252
F77_NAME(dgeevx)(const char* balanc, const char* jobvl, const char* jobvr,
		 const char* sense, const int* n, double* a, const int* lda,
		 double* wr, double* wi, double* vl, const int* ldvl,
		 double* vr, const int* ldvr, int* ilo, int* ihi,
		 double* scale, double* abnrm, double* rconde, double* rcondv,
		 double* work, const int* lwork, int* iwork, int* info);
/* DGEHD2 - reduce a real general matrix A to upper Hessenberg */
/* form H by an orthogonal similarity transformation */
253
La_extern void
254 255 256 257 258
F77_NAME(dgehd2)(const int* n, const int* ilo, const int* ihi,
		 double* a, const int* lda, double* tau,
		 double* work, int* info);
/* DGEHRD - reduce a real general matrix A to upper Hessenberg */
/* form H by an orthogonal similarity transformation */
259
La_extern void
260 261 262 263
F77_NAME(dgehrd)(const int* n, const int* ilo, const int* ihi,
		 double* a, const int* lda, double* tau,
		 double* work, const int* lwork, int* info);
/* DGELQ2 - compute an LQ factorization of a real m by n matrix A */
264
La_extern void
265 266 267 268
F77_NAME(dgelq2)(const int* m, const int* n,
		 double* a, const int* lda, double* tau,
		 double* work, int* info);
/* DGELQF - compute an LQ factorization of a real M-by-N matrix A */
269
La_extern void
270 271 272 273 274 275
F77_NAME(dgelqf)(const int* m, const int* n,
		 double* a, const int* lda, double* tau,
		 double* work, const int* lwork, int* info);
/* DGELS - solve overdetermined or underdetermined real linear */
/* systems involving an M-by-N matrix A, or its transpose, using a */
/* QR or LQ factorization of A */
276
La_extern void
277 278 279 280 281 282
F77_NAME(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);
/* DGELSS - compute the minimum norm solution to a real linear */
/* least squares problem */
283
La_extern void
284 285 286 287 288 289
F77_NAME(dgelss)(const int* m, const int* n, const int* nrhs,
		 double* a, const int* lda, double* b, const int* ldb,
		 double* s, double* rcond, int* rank,
		 double* work, const int* lwork, int* info);
/* DGELSY - compute the minimum-norm solution to a real linear */
/* least squares problem */
290
La_extern void
291 292 293 294 295
F77_NAME(dgelsy)(const int* m, const int* n, const int* nrhs,
		 double* a, const int* lda, double* b, const int* ldb,
		 int* jpvt, const double* rcond, int* rank,
		 double* work, const int* lwork, int* info);
/* DGEQL2 - compute a QL factorization of a real m by n matrix A */
296
La_extern void
297 298 299
F77_NAME(dgeql2)(const int* m, const int* n, double* a, const int* lda,
		 double* tau, double* work, int* info);
/* DGEQLF - compute a QL factorization of a real M-by-N matrix A */
300
La_extern void
301 302 303 304 305
F77_NAME(dgeqlf)(const int* m, const int* n,
		 double* a, const int* lda, double* tau,
		 double* work, const int* lwork, int* info);
/* DGEQP3 - compute a QR factorization with column pivoting of a */
/* real M-by-N matrix A using level 3 BLAS */
306
La_extern void
307 308 309 310
F77_NAME(dgeqp3)(const int* m, const int* n, double* a, const int* lda,
		 int* jpvt, double* tau, double* work, const int* lwork,
		 int* info);
/* DGEQR2 - compute a QR factorization of a real m by n matrix A */
311
La_extern void
312 313 314
F77_NAME(dgeqr2)(const int* m, const int* n, double* a, const int* lda,
		 double* tau, double* work, int* info);
/* DGEQRF - compute a QR factorization of a real M-by-N matrix A */
315
La_extern void
316 317 318 319 320
F77_NAME(dgeqrf)(const int* m, const int* n, double* a, const int* lda,
		 double* tau, double* work, const int* lwork, int* info);
/* DGERFS - improve the computed solution to a system of linear */
/* equations and provides error bounds and backward error */
/* estimates for the solution */
321
La_extern void
322 323 324 325 326 327
F77_NAME(dgerfs)(const char* trans, const int* n, const int* nrhs,
		 double* a, const int* lda, double* af, const int* ldaf,
		 int* ipiv, double* b, const int* ldb,
		 double* x, const int* ldx, double* ferr, double* berr,
		 double* work, int* iwork, int* info);
/* DGERQ2 - compute an RQ factorization of a real m by n matrix A */
328
La_extern void
329 330 331
F77_NAME(dgerq2)(const int* m, const int* n, double* a, const int* lda,
		 double* tau, double* work, int* info);
/* DGERQF - compute an RQ factorization of a real M-by-N matrix A */
332
La_extern void
333 334 335 336
F77_NAME(dgerqf)(const int* m, const int* n, double* a, const int* lda,
		 double* tau, double* work, const int* lwork, int* info);
/* DGESV - compute the solution to a real system of linear */
/* equations  A * X = B, */
337
La_extern void
338 339 340 341 342
F77_NAME(dgesv)(const int* n, const int* nrhs, double* a, const int* lda,
		int* ipiv, double* b, const int* ldb, int* info);
/* DGESVD - compute the singular value decomposition (SVD); of a */
/* real M-by-N matrix A, optionally computing the left and/or */
/* right singular vectors */
343
La_extern void
344 345 346 347 348 349
F77_NAME(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);
/* DGESVX - use the LU factorization to compute the solution to a */
/* real system of linear equations  A * X = B, */
350
La_extern void
351
F77_NAME(dgesvx)(const char* fact, const char* trans, const int* n,
352 353 354 355 356 357 358 359 360
		 const int* nrhs, double* a, const int* lda,
		 double* af, const int* ldaf, int* ipiv,
		 char *equed, double* r, double* c,
		 double* b, const int* ldb,
		 double* x, const int* ldx,
		 double* rcond, double* ferr, double* berr,
		 double* work, int* iwork, int* info);
/* DGETF2 - compute an LU factorization of a general m-by-n */
/* matrix A using partial pivoting with row interchanges */
361
La_extern void
362 363 364 365
F77_NAME(dgetf2)(const int* m, const int* n, double* a, const int* lda,
		 int* ipiv, int* info);
/* DGETRF - compute an LU factorization of a general M-by-N */
/* matrix A using partial pivoting with row interchanges */
366
La_extern void
367 368 369 370
F77_NAME(dgetrf)(const int* m, const int* n, double* a, const int* lda,
		 int* ipiv, int* info);
/* DGETRI - compute the inverse of a matrix using the LU */
/* factorization computed by DGETRF */
371
La_extern void
372 373
F77_NAME(dgetri)(const int* n, double* a, const int* lda,
		 int* ipiv, double* work, const int* lwork, int* info);
374
/* DGETRS - solve a system of linear equations	A * X = B or A' * */
375 376
/* X = B with a general N-by-N matrix A using the LU factorization */
/* computed by DGETRF */
377
La_extern void
378 379 380 381
F77_NAME(dgetrs)(const char* trans, const int* n, const int* nrhs,
		 const double* a, const int* lda, const int* ipiv,
		 double* b, const int* ldb, int* info);

382 383

//* Double precision General matrices Generalized problems -> DGG
384 385 386 387 388

/* DGGBAK - form the right or left eigenvectors of a real */
/* generalized eigenvalue problem A*x = lambda*B*x, by backward */
/* transformation on the computed eigenvectors of the balanced */
/* pair of matrices output by DGGBAL */
389
La_extern void
390 391 392 393 394
F77_NAME(dggbak)(const char* job, const char* side,
		 const int* n, const int* ilo, const int* ihi,
		 double* lscale, double* rscale, const int* m,
		 double* v, const int* ldv, int* info);
/* DGGBAL - balance a pair of general real matrices (A,B); */
395
La_extern void
396 397 398 399 400 401 402
F77_NAME(dggbal)(const char* job, const int* n, double* a, const int* lda,
		 double* b, const int* ldb, int* ilo, int* ihi,
		 double* lscale, double* rscale, double* work, int* info);
/* DGGES - compute for a pair of N-by-N real nonsymmetric */
/* matrices A, B the generalized eigenvalues, the generalized */
/* real Schur form (S,T), optionally, the left and/or right matrices */
/* of Schur vectors (VSL and VSR)*/
403
La_extern void
404 405 406 407 408 409 410 411 412 413
F77_NAME(dgges)(const char* jobvsl, const char* jobvsr, const char* sort,
		int (*delztg)(double*, double*, double*),
		const int* n, double* a, const int* lda,
		double* b, const int* ldb, double* alphar,
		double* alphai, const double* beta,
		double* vsl, const int* ldvsl,
		double* vsr, const int* ldvsr,
		double* work, const int* lwork, int* bwork, int* info);

/* DGGGLM - solve a general Gauss-Markov linear model (GLM) problem */
414
La_extern void
415 416 417 418 419 420 421
F77_NAME(dggglm)(const int* n, const int* m, const int* p,
		 double* a, const int* lda, double* b, const int* ldb,
		 double* d, double* x, double* y,
		 double* work, const int* lwork, int* info);
/* DGGHRD - reduce a pair of real matrices (A,B); to generalized */
/* upper Hessenberg form using orthogonal transformations, where A */
/* is a general matrix and B is upper triangular */
422
La_extern void
423 424 425 426 427 428
F77_NAME(dgghrd)(const char* compq, const char* compz, const int* n,
		 const int* ilo, const int* ihi, double* a, const int* lda,
		 double* b, const int* ldb, double* q, const int* ldq,
		 double* z, const int* ldz, int* info);
/* DGGLSE - solve the linear equality-constrained least squares */
/* (LSE) problem */
429
La_extern void
430 431 432 433 434 435 436
F77_NAME(dgglse)(const int* m, const int* n, const int* p,
		 double* a, const int* lda,
		 double* b, const int* ldb,
		 double* c, double* d, double* x,
		 double* work, const int* lwork, int* info);
/* DGGQRF - compute a generalized QR factorization of an N-by-M */
/* matrix A and an N-by-P matrix B */
437
La_extern void
438 439 440 441 442 443
F77_NAME(dggqrf)(const int* n, const int* m, const int* p,
		 double* a, const int* lda, double* taua,
		 double* b, const int* ldb, double* taub,
		 double* work, const int* lwork, int* info);
/* DGGRQF - compute a generalized RQ factorization of an M-by-N */
/* matrix A and a P-by-N matrix B */
444
La_extern void
445 446 447 448
F77_NAME(dggrqf)(const int* m, const int* p, const int* n,
		 double* a, const int* lda, double* taua,
		 double* b, const int* ldb, double* taub,
		 double* work, const int* lwork, int* info);
449 450

//* Double precision General Tridiagonal matrices  -> DGT
451 452 453

/* DGTCON - estimate the reciprocal of the condition number of a real */
/* tridiagonal matrix A using the LU factorization as computed by DGTTRF */
454
La_extern void
455 456 457 458 459 460
F77_NAME(dgtcon)(const char* norm, const int* n, double* dl, double* d,
		 double* du, double* du2, int* ipiv, const double* anorm,
		 double* rcond, double* work, int* iwork, int* info);
/* DGTRFS - improve the computed solution to a system of linear equations */
/* when the coefficient matrix is tridiagonal, and provides error bounds */
/* and backward error estimates for the solution */
461
La_extern void
462 463 464 465 466 467 468
F77_NAME(dgtrfs)(const char* trans, const int* n, const int* nrhs,
		 double* dl, double* d, double* du, double* dlf,
		 double* df, double* duf, double* du2,
		 int* ipiv, double* b, const int* ldb,
		 double* x, const int* ldx,
		 double* ferr, double* berr,
		 double* work, int* iwork, int* info);
469 470
/* DGTSV - solve the equation	A*X = B, */
La_extern void
471 472 473 474 475
F77_NAME(dgtsv)(const int* n, const int* nrhs,
		double* dl, double* d, double* du,
		double* b, const int* ldb, int* info);
/* DGTSVX - use the LU factorization to compute the solution to a */
/* real system of linear equations A * X = B or A**T * X = B, */
476
La_extern void
477 478 479 480 481 482 483 484 485 486 487
F77_NAME(dgtsvx)(const int* fact, const char* trans,
		 const int* n, const int* nrhs,
		 double* dl, double* d, double* du,
		 double* dlf, double* df, double* duf,
		 double* du2, int* ipiv,
		 double* b, const int* ldb,
		 double* x, const int* ldx,
		 double* rcond, double* ferr, double* berr,
		 double* work, int* iwork, int* info);
/* DGTTRF - compute an LU factorization of a real tridiagonal matrix */
/* A using elimination with partial pivoting and row interchanges */
488
La_extern void
489 490 491 492
F77_NAME(dgttrf)(const int* n, double* dl, double* d,
		 double* du, double* du2, int* ipiv, int* info);
/* DGTTRS - solve one of the systems of equations  A*X = B or */
/* A'*X = B, */
493
La_extern void
494 495 496 497
F77_NAME(dgttrs)(const char* trans, const int* n, const int* nrhs,
		 double* dl, double* d, double* du, double* du2,
		 int* ipiv, double* b, const int* ldb, int* info);

498 499

//* Double precision Orthogonal matrices  -> DOP & DOR
500 501 502 503

/* DOPGTR - generate a real orthogonal matrix Q which is defined */
/* as the product of n-1 elementary reflectors H(i); of order n, */
/* as returned by DSPTRD using packed storage */
504
La_extern void
505 506 507 508 509 510
F77_NAME(dopgtr)(const char* uplo, const int* n,
		 const double* ap, const double* tau,
		 double* q, const int* ldq,
		 double* work, int* info);
/* DOPMTR - overwrite the general real M-by-N matrix C with */
/* SIDE = 'L' SIDE = 'R' TRANS = 'N' */
511
La_extern void
512 513 514 515 516 517 518
F77_NAME(dopmtr)(const char* side, const char* uplo,
		 const char* trans, const int* m, const int* n,
		 const double* ap, const double* tau,
		 double* c, const int* ldc,
		 double* work, int* info);
/* DORG2L - generate an m by n real matrix Q with orthonormal */
/* columns, */
519
La_extern void
520 521 522 523 524
F77_NAME(dorg2l)(const int* m, const int* n, const int* k,
		 double* a, const int* lda,
		 const double* tau, double* work, int* info);
/* DORG2R - generate an m by n real matrix Q with orthonormal */
/* columns, */
525
La_extern void
526 527 528 529 530 531
F77_NAME(dorg2r)(const int* m, const int* n, const int* k,
		 double* a, const int* lda,
		 const double* tau, double* work, int* info);
/* DORGBR - generate one of the real orthogonal matrices Q or */
/* P**T determined by DGEBRD when reducing a real matrix A to */
/* bidiagonal form */
532
La_extern void
533 534 535 536 537 538 539 540
F77_NAME(dorgbr)(const char* vect, const int* m,
		 const int* n, const int* k,
		 double* a, const int* lda,
		 const double* tau, double* work,
		 const int* lwork, int* info);
/* DORGHR - generate a real orthogonal matrix Q which is defined */
/* as the product of IHI-ILO elementary reflectors of order N, as */
/* returned by DGEHRD */
541
La_extern void
542 543 544 545 546
F77_NAME(dorghr)(const int* n, const int* ilo, const int* ihi,
		 double* a, const int* lda, const double* tau,
		 double* work, const int* lwork, int* info);
/* DORGL2 - generate an m by n real matrix Q with orthonormal */
/* rows, */
547
La_extern void
548 549 550 551 552
F77_NAME(dorgl2)(const int* m, const int* n, const int* k,
		 double* a, const int* lda, const double* tau,
		 double* work, int* info);
/* DORGLQ - generate an M-by-N real matrix Q with orthonormal */
/* rows, */
553
La_extern void
554 555 556 557 558 559
F77_NAME(dorglq)(const int* m, const int* n, const int* k,
		 double* a, const int* lda,
		 const double* tau, double* work,
		 const int* lwork, int* info);
/* DORGQL - generate an M-by-N real matrix Q with orthonormal */
/* columns, */
560
La_extern void
561 562 563 564 565 566
F77_NAME(dorgql)(const int* m, const int* n, const int* k,
		 double* a, const int* lda,
		 const double* tau, double* work,
		 const int* lwork, int* info);
/* DORGQR - generate an M-by-N real matrix Q with orthonormal */
/* columns, */
567
La_extern void
568 569 570 571 572
F77_NAME(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);
/* DORGR2 - generate an m by n real matrix Q with orthonormal */
/* rows, */
573
La_extern void
574 575 576 577
F77_NAME(dorgr2)(const int* m, const int* n, const int* k,
		 double* a, const int* lda, const double* tau,
		 double* work, int* info);
/* DORGRQ - generate an M-by-N real matrix Q with orthonormal rows */
578
La_extern void
579 580 581 582 583 584
F77_NAME(dorgrq)(const int* m, const int* n, const int* k,
		 double* a, const int* lda, const double* tau,
		 double* work, const int* lwork, int* info);
/* DORGTR - generate a real orthogonal matrix Q which is defined */
/* as the product of n-1 elementary reflectors of order const int* n, as */
/* returned by DSYTRD */
585
La_extern void
586 587 588 589
F77_NAME(dorgtr)(const char* uplo, const int* n,
		 double* a, const int* lda, const double* tau,
		 double* work, const int* lwork, int* info);
/* DORM2L - overwrite the general real m by n matrix C with   Q * */
590
/* C if SIDE = 'L' and TRANS = 'N', or	 Q'* C if SIDE = 'L' and */
591 592
/* TRANS = 'T', or   C * Q if SIDE = 'R' and TRANS = 'N', or   C * */
/* Q' if SIDE = 'R' and TRANS = 'T', */
593
La_extern void
594 595 596 597 598 599 600 601 602
F77_NAME(dorm2l)(const char* side, const char* trans,
		 const int* m, const int* n, const int* k,
		 const double* a, const int* lda,
		 const double* tau, double* c, const int* ldc,
		 double* work, int* info);
/* DORM2R - overwrite the general real m by n matrix C with   Q * C */
/* if SIDE = 'L' and TRANS = 'N', or   Q'* C if SIDE = 'L' and */
/* TRANS = 'T', or   C * Q if SIDE = 'R' and TRANS = 'N', or   C * */
/* Q' if SIDE = 'R' and TRANS = 'T', */
603
La_extern void
604 605 606 607 608 609
F77_NAME(dorm2r)(const char* side, const char* trans,
		 const int* m, const int* n, const int* k,
		 const double* a, const int* lda, const double* tau,
		 double* c, const int* ldc, double* work, int* info);
/* DORMBR - VECT = 'Q', DORMBR overwrites the general real M-by-N */
/* matrix C with  SIDE = 'L' SIDE = 'R' TRANS = 'N' */
610
La_extern void
611 612 613 614 615 616 617
F77_NAME(dormbr)(const char* vect, const char* side, const char* trans,
		 const int* m, const int* n, const int* k,
		 const double* a, const int* lda, const double* tau,
		 double* c, const int* ldc,
		 double* work, const int* lwork, int* info);
/* DORMHR - overwrite the general real M-by-N matrix C with */
/* SIDE = 'L' SIDE = 'R' TRANS = 'N' */
618
La_extern void
619 620 621 622 623 624
F77_NAME(dormhr)(const char* side, const char* trans, const int* m,
		 const int* n, const int* ilo, const int* ihi,
		 const double* a, const int* lda, const double* tau,
		 double* c, const int* ldc,
		 double* work, const int* lwork, int* info);
/* DORML2 - overwrite the general real m by n matrix C with   Q * */
625
/* C if SIDE = 'L' and TRANS = 'N', or	 Q'* C if SIDE = 'L' and */
626 627
/* TRANS = 'T', or   C * Q if SIDE = 'R' and TRANS = 'N', or   C * */
/* Q' if SIDE = 'R' and TRANS = 'T', */
628
La_extern void
629 630 631 632 633 634
F77_NAME(dorml2)(const char* side, const char* trans,
		 const int* m, const int* n, const int* k,
		 const double* a, const int* lda, const double* tau,
		 double* c, const int* ldc, double* work, int* info);
/* DORMLQ - overwrite the general real M-by-N matrix C with */
/* SIDE = 'L' SIDE = 'R' TRANS = 'N'  */
635
La_extern void
636 637 638 639 640 641 642
F77_NAME(dormlq)(const char* side, const char* trans,
		 const int* m, const int* n, const int* k,
		 const double* a, const int* lda,
		 const double* tau, double* c, const int* ldc,
		 double* work, const int* lwork, int* info);
/* DORMQL - overwrite the general real M-by-N matrix C with */
/* SIDE = 'L' SIDE = 'R' TRANS = 'N' */
643
La_extern void
644 645 646 647 648 649 650
F77_NAME(dormql)(const char* side, const char* trans,
		 const int* m, const int* n, const int* k,
		 const double* a, const int* lda,
		 const double* tau, double* c, const int* ldc,
		 double* work, const int* lwork, int* info);
/* DORMQR - overwrite the general real M-by-N matrix C with   SIDE = */
/* 'L' SIDE = 'R' TRANS = 'N' */
651
La_extern void
652 653 654 655 656 657
F77_NAME(dormqr)(const char* side, const char* trans,
		 const int* m, const int* n, const int* k,
		 const double* a, const int* lda,
		 const double* tau, double* c, const int* ldc,
		 double* work, const int* lwork, int* info);
/* DORMR2 - overwrite the general real m by n matrix C with   Q * */
658
/* C if SIDE = 'L' and TRANS = 'N', or	 Q'* C if SIDE = 'L' and */
659 660
/* TRANS = 'T', or   C * Q if SIDE = 'R' and TRANS = 'N', or   C * */
/* Q' if SIDE = 'R' and TRANS = 'T', */
661
La_extern void
662 663 664 665 666 667 668
F77_NAME(dormr2)(const char* side, const char* trans,
		 const int* m, const int* n, const int* k,
		 const double* a, const int* lda,
		 const double* tau, double* c, const int* ldc,
		 double* work, int* info);
/* DORMRQ - overwrite the general real M-by-N matrix C with */
/* SIDE = 'L' SIDE = 'R' TRANS = 'N' */
669
La_extern void
670 671 672 673 674 675 676
F77_NAME(dormrq)(const char* side, const char* trans,
		 const int* m, const int* n, const int* k,
		 const double* a, const int* lda,
		 const double* tau, double* c, const int* ldc,
		 double* work, const int* lwork, int* info);
/* DORMTR - overwrite the general real M-by-N matrix C with */
/* SIDE = 'L' SIDE = 'R' TRANS = 'N' */
677
La_extern void
678 679 680 681 682 683
F77_NAME(dormtr)(const char* side, const char* uplo,
		 const char* trans, const int* m, const int* n,
		 const double* a, const int* lda,
		 const double* tau, double* c, const int* ldc,
		 double* work, const int* lwork, int* info);

684 685

//* Double precision Positive definite Band matrices  -> DPB
686 687 688 689 690

/* DPBCON - estimate the reciprocal of the condition number (in */
/* the 1-norm); of a real symmetric positive definite band matrix */
/* using the Cholesky factorization A = U**T*U or A = L*L**T */
/* computed by DPBTRF */
691
La_extern void
692 693 694 695 696 697 698
F77_NAME(dpbcon)(const char* uplo, const int* n, const int* kd,
		 const double* ab, const int* ldab,
		 const double* anorm, double* rcond,
		 double* work, int* iwork, int* info);
/* DPBEQU - compute row and column scalings intended to */
/* equilibrate a symmetric positive definite band matrix A and */
/* reduce its condition number (with respect to the two-norm); */
699
La_extern void
700 701 702 703 704 705 706
F77_NAME(dpbequ)(const char* uplo, const int* n, const int* kd,
		 const double* ab, const int* ldab,
		 double* s, double* scond, double* amax, int* info);
/* DPBRFS - improve the computed solution to a system of linear */
/* equations when the coefficient matrix is symmetric positive */
/* definite and banded, and provides error bounds and backward */
/* error estimates for the solution */
707
La_extern void
708 709 710 711 712 713 714 715 716 717
F77_NAME(dpbrfs)(const char* uplo, const int* n,
		 const int* kd, const int* nrhs,
		 const double* ab, const int* ldab,
		 const double* afb, const int* ldafb,
		 const double* b, const int* ldb,
		 double* x, const int* ldx,
		 double* ferr, double* berr,
		 double* work, int* iwork, int* info);
/* DPBSTF - compute a split Cholesky factorization of a real */
/* symmetric positive definite band matrix A */
718
La_extern void
719 720 721 722
F77_NAME(dpbstf)(const char* uplo, const int* n, const int* kd,
		 double* ab, const int* ldab, int* info);
/* DPBSV - compute the solution to a real system of linear */
/* equations  A * X = B, */
723
La_extern void
724 725 726 727 728 729 730
F77_NAME(dpbsv)(const char* uplo, const int* n,
		const int* kd, const int* nrhs,
		double* ab, const int* ldab,
		double* b, const int* ldb, int* info);
/* DPBSVX - use the Cholesky factorization A = U**T*U or A = */
/* L*L**T to compute the solution to a real system of linear */
/* equations  A * X = B, */
731
La_extern void
732 733 734 735 736 737 738 739 740 741 742
F77_NAME(dpbsvx)(const int* fact, const char* uplo, const int* n,
		 const int* kd, const int* nrhs,
		 double* ab, const int* ldab,
		 double* afb, const int* ldafb,
		 char* equed, double* s,
		 double* b, const int* ldb,
		 double* x, const int* ldx, double* rcond,
		 double* ferr, double* berr,
		 double* work, int* iwork, int* info);
/* DPBTF2 - compute the Cholesky factorization of a real */
/* symmetric positive definite band matrix A */
743
La_extern void
744 745 746 747
F77_NAME(dpbtf2)(const char* uplo, const int* n, const int* kd,
		 double* ab, const int* ldab, int* info);
/* DPBTRF - compute the Cholesky factorization of a real */
/* symmetric positive definite band matrix A */
748
La_extern void
749 750 751 752 753
F77_NAME(dpbtrf)(const char* uplo, const int* n, const int* kd,
		 double* ab, const int* ldab, int* info);
/* DPBTRS - solve a system of linear equations A*X = B with a */
/* symmetric positive definite band matrix A using the Cholesky */
/* factorization A = U**T*U or A = L*L**T computed by DPBTRF */
754
La_extern void
755 756 757 758 759
F77_NAME(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);

760 761

//* Double precision Positive definite matrices  -> DPO
762 763 764 765 766

/* DPOCON - estimate the reciprocal of the condition number (in */
/* the 1-norm); of a real symmetric positive definite matrix using */
/* the Cholesky factorization A = U**T*U or A = L*L**T computed by */
/* DPOTRF */
767
La_extern void
768 769 770 771 772 773 774
F77_NAME(dpocon)(const char* uplo, const int* n,
		 const double* a, const int* lda,
		 const double* anorm, double* rcond,
		 double* work, int* iwork, int* info);
/* DPOEQU - compute row and column scalings intended to */
/* equilibrate a symmetric positive definite matrix A and reduce */
/* its condition number (with respect to the two-norm); */
775
La_extern void
776 777 778 779 780
F77_NAME(dpoequ)(const int* n, const double* a, const int* lda,
		 double* s, double* scond, double* amax, int* info);
/* DPORFS - improve the computed solution to a system of linear */
/* equations when the coefficient matrix is symmetric positive */
/* definite, */
781
La_extern void
782 783 784 785 786 787 788 789 790
F77_NAME(dporfs)(const char* uplo, const int* n, const int* nrhs,
		 const double* a, const int* lda,
		 const double* af, const int* ldaf,
		 const double* b, const int* ldb,
		 double* x, const int* ldx,
		 double* ferr, double* berr,
		 double* work, int* iwork, int* info);
/* DPOSV - compute the solution to a real system of linear */
/* equations  A * X = B, */
791
La_extern void
792 793 794 795 796 797
F77_NAME(dposv)(const char* uplo, const int* n, const int* nrhs,
		double* a, const int* lda,
		double* b, const int* ldb, int* info);
/* DPOSVX - use the Cholesky factorization A = U**T*U or A = */
/* L*L**T to compute the solution to a real system of linear */
/* equations  A * X = B, */
798
La_extern void
799 800 801 802 803 804 805 806 807 808
F77_NAME(dposvx)(const int* fact, const char* uplo,
		 const int* n, const int* nrhs,
		 double* a, const int* lda,
		 double* af, const int* ldaf, char* equed,
		 double* s, double* b, const int* ldb,
		 double* x, const int* ldx, double* rcond,
		 double* ferr, double* berr, double* work,
		 int* iwork, int* info);
/* DPOTF2 - compute the Cholesky factorization of a real */
/* symmetric positive definite matrix A */
809
La_extern void
810 811 812 813
F77_NAME(dpotf2)(const char* uplo, const int* n,
		 double* a, const int* lda, int* info);
/* DPOTRF - compute the Cholesky factorization of a real */
/* symmetric positive definite matrix A */
814
La_extern void
815 816 817 818 819
F77_NAME(dpotrf)(const char* uplo, const int* n,
		 double* a, const int* lda, int* info);
/* DPOTRI - compute the inverse of a real symmetric positive */
/* definite matrix A using the Cholesky factorization A = U**T*U */
/* or A = L*L**T computed by DPOTRF */
820
La_extern void
821 822 823 824 825
F77_NAME(dpotri)(const char* uplo, const int* n,
		 double* a, const int* lda, int* info);
/* DPOTRS - solve a system of linear equations A*X = B with a */
/* symmetric positive definite matrix A using the Cholesky */
/* factorization A = U**T*U or A = L*L**T computed by DPOTRF */
826
La_extern void
827 828 829 830 831 832 833
F77_NAME(dpotrs)(const char* uplo, const int* n,
		 const int* nrhs, const double* a, const int* lda,
		 double* b, const int* ldb, int* info);
/* DPPCON - estimate the reciprocal of the condition number (in */
/* the 1-norm); of a real symmetric positive definite packed */
/* matrix using the Cholesky factorization A = U**T*U or A = */
/* L*L**T computed by DPPTRF */
834
La_extern void
835 836 837 838 839 840 841
F77_NAME(dppcon)(const char* uplo, const int* n,
		 const double* ap, const double* anorm, double* rcond,
		 double* work, int* iwork, int* info);
/* DPPEQU - compute row and column scalings intended to */
/* equilibrate a symmetric positive definite matrix A in packed */
/* storage and reduce its condition number (with respect to the */
/* two-norm); */
842
La_extern void
843 844 845 846
F77_NAME(dppequ)(const char* uplo, const int* n,
		 const double* ap, double* s, double* scond,
		 double* amax, int* info);

847 848

//* Double precision Positive definite matrices in Packed storage  -> DPP
849 850 851 852 853

/* DPPRFS - improve the computed solution to a system of linear */
/* equations when the coefficient matrix is symmetric positive */
/* definite and packed, and provides error bounds and backward */
/* error estimates for the solution */
854
La_extern void
855 856 857 858 859 860 861 862
F77_NAME(dpprfs)(const char* uplo, const int* n, const int* nrhs,
		 const double* ap, const double* afp,
		 const double* b, const int* ldb,
		 double* x, const int* ldx,
		 double* ferr, double* berr,
		 double* work, int* iwork, int* info);
/* DPPSV - compute the solution to a real system of linear */
/* equations  A * X = B, */
863
La_extern void
864 865 866 867 868 869
F77_NAME(dppsv)(const char* uplo, const int* n,
		const int* nrhs, const double* ap,
		double* b, const int* ldb, int* info);
/* DPPSVX - use the Cholesky factorization A = U**T*U or A = */
/* L*L**T to compute the solution to a real system of linear */
/* equations  A * X = B, */
870
La_extern void
871
F77_NAME(dppsvx)(const char* fact, const char* uplo,
872 873 874 875 876 877 878 879
		 const int* n, const int* nrhs, double* ap,
		 double* afp, char* equed, double* s,
		 double* b, const int* ldb,
		 double* x, const int* ldx,
		 double* rcond, double* ferr, double* berr,
		 double* work, int* iwork, int* info);
/* DPPTRF - compute the Cholesky factorization of a real */
/* symmetric positive definite matrix A stored in packed format */
880
La_extern void
881 882 883 884
F77_NAME(dpptrf)(const char* uplo, const int* n, double* ap, int* info);
/* DPPTRI - compute the inverse of a real symmetric positive */
/* definite matrix A using the Cholesky factorization A = U**T*U */
/* or A = L*L**T computed by DPPTRF  */
885
La_extern void
886 887 888 889 890
F77_NAME(dpptri)(const char* uplo, const int* n, double* ap, int* info);
/* DPPTRS - solve a system of linear equations A*X = B with a */
/* symmetric positive definite matrix A in packed storage using */
/* the Cholesky factorization A = U**T*U or A = L*L**T computed by */
/* DPPTRF */
891
La_extern void
892 893
F77_NAME(dpptrs)(const char* uplo, const int* n,
		 const int* nrhs, const double* ap,
894
		 double* b, const int* ldb, int* info);
895

896
//* Double precision symmetric Positive definite Tridiagonal matrices  -> DPT
897 898 899 900 901

/* DPTCON - compute the reciprocal of the condition number (in */
/* the 1-norm); of a real symmetric positive definite tridiagonal */
/* matrix using the factorization A = L*D*L**T or A = U**T*D*U */
/* computed by DPTTRF */
902
La_extern void
903 904
F77_NAME(dptcon)(const int* n,
		 const double* d, const double* e,
905 906
		 const double* anorm, double* rcond,
		 double* work, int* info);
907 908 909 910
/* DPTEQR - compute all eigenvalues and, optionally, eigenvectors */
/* of a symmetric positive definite tridiagonal matrix by first */
/* factoring the matrix using DPTTRF, and then calling DBDSQR to */
/* compute the singular values of the bidiagonal factor */
911
La_extern void
912 913
F77_NAME(dpteqr)(const char* compz, const int* n, double* d,
		 double* e, double* z, const int* ldz,
914
		 double* work, int* info);
915 916 917 918
/* DPTRFS - improve the computed solution to a system of linear */
/* equations when the coefficient matrix is symmetric positive */
/* definite and tridiagonal, and provides error bounds and */
/* backward error estimates for the solution */
919
La_extern void
920
F77_NAME(dptrfs)(const int* n, const int* nrhs,
921 922 923 924 925 926
		 const double* d, const double* e,
		 const double* df, const double* ef,
		 const double* b, const int* ldb,
		 double* x, const int* ldx,
		 double* ferr, double* berr,
		 double* work, int* info);
927 928 929
/* DPTSV - compute the solution to a real system of linear */
/* equations A*X = B, where A is an N-by-N symmetric positive */
/* definite tridiagonal matrix, and X and B are N-by-NRHS matrices */
930
La_extern void
931
F77_NAME(dptsv)(const int* n, const int* nrhs, double* d,
932
		double* e, double* b, const int* ldb, int* info);
933 934 935 936
/* DPTSVX - use the factorization A = L*D*L**T to compute the */
/* solution to a real system of linear equations A*X = B, where A */
/* is an N-by-N symmetric positive definite tridiagonal matrix and */
/* X and B are N-by-NRHS matrices */
937
La_extern void
938
F77_NAME(dptsvx)(const int* fact, const int* n,
939 940 941 942 943 944 945
		 const int* nrhs,
		 const double* d, const double* e,
		 double* df, double* ef,
		 const double* b, const int* ldb,
		 double* x, const int* ldx, double* rcond,
		 double* ferr, double* berr,
		 double* work, int* info);
946 947
/* DPTTRF - compute the factorization of a real symmetric */
/* positive definite tridiagonal matrix A */
948
La_extern void
949 950 951 952
F77_NAME(dpttrf)(const int* n, double* d, double* e, int* info);
/* DPTTRS - solve a system of linear equations A * X = B with a */
/* symmetric positive definite tridiagonal matrix A using the */
/* factorization A = L*D*L**T or A = U**T*D*U computed by DPTTRF */
953
La_extern void
954
F77_NAME(dpttrs)(const int* n, const int* nrhs,
955 956
		 const double* d, const double* e,
		 double* b, const int* ldb, int* info);
957 958
/* DRSCL - multiply an n-element real vector x by the real scalar */
/* 1/a */
959
La_extern void
960
F77_NAME(drscl)(const int* n, const double* da,
961
		double* x, const int* incx);
962

963
//* Double precision Symmetric Band matrices  -> DSB
964 965 966

/* DSBEV - compute all the eigenvalues and, optionally, */
/* eigenvectors of a real symmetric band matrix A */
967
La_extern void
968
F77_NAME(dsbev)(const char* jobz, const char* uplo,
969 970 971 972
		const int* n, const int* kd,
		double* ab, const int* ldab,
		double* w, double* z, const int* ldz,
		double* work, int* info);
973 974
/* DSBEVD - compute all the eigenvalues and, optionally, */
/* eigenvectors of a real symmetric band matrix A */
975
La_extern void
976
F77_NAME(dsbevd)(const char* jobz, const char* uplo,
977 978 979 980 981
		 const int* n, const int* kd,
		 double* ab, const int* ldab,
		 double* w, double* z, const int* ldz,
		 double* work, const int* lwork,
		 int* iwork, const int* liwork, int* info);
982 983
/* DSBEVX - compute selected eigenvalues and, optionally, */
/* eigenvectors of a real symmetric band matrix A */
984
La_extern void
985
F77_NAME(dsbevx)(const char* jobz, const char* range,
986 987 988 989 990 991 992 993 994 995
		 const char* uplo, const int* n, const int* kd,
		 double* ab, const int* ldab,
		 double* q, const int* ldq,
		 const double* vl, const double* vu,
		 const int* il, const int* iu,
		 const double* abstol,
		 int* m, double* w,
		 double* z, const int* ldz,
		 double* work, int* iwork,
		 int* ifail, int* info);
996 997
/* DSBGST - reduce a real symmetric-definite banded generalized */
/* eigenproblem A*x = lambda*B*x to standard form C*y = lambda*y, */
998
La_extern void
999
F77_NAME(dsbgst)(const char* vect, const char* uplo,
1000 1001 1002 1003 1004
		 const int* n, const int* ka, const int* kb,
		 double* ab, const int* ldab,
		 double* bb, const int* ldbb,
		 double* x, const int* ldx,
		 double* work, int* info);
1005 1006 1007
/* DSBGV - compute all the eigenvalues, and optionally, the */
/* eigenvectors of a real generalized symmetric-definite banded */
/* eigenproblem, of the form A*x=(lambda);*B*x */
1008
La_extern void
1009
F77_NAME(dsbgv)(const char* jobz, const char* uplo,
1010 1011 1012 1013 1014
		const int* n, const int* ka, const int* kb,
		double* ab, const int* ldab,
		double* bb, const int* ldbb,
		double* w, double* z, const int* ldz,
		double* work, int* info);
1015 1016
/* DSBTRD - reduce a real symmetric band matrix A to symmetric */
/* tridiagonal form T by an orthogonal similarity transformation */
1017
La_extern void
1018
F77_NAME(dsbtrd)(const char* vect, const char* uplo,
1019 1020 1021 1022 1023
		 const int* n, const int* kd,
		 double* ab, const int* ldab,
		 double* d, double* e,
		 double* q, const int* ldq,
		 double* work, int* info);
1024

1025
//* Double precision Symmetric Packed matrices  -> DSP
1026 1027 1028 1029

/* DSPCON - estimate the reciprocal of the condition number (in */
/* the 1-norm); of a real symmetric packed matrix A using the */
/* factorization A = U*D*U**T or A = L*D*L**T computed by DSPTRF */
1030
La_extern void
1031
F77_NAME(dspcon)(const char* uplo, const int* n,
1032 1033 1034
		 const double* ap, const int* ipiv,
		 const double* anorm, double* rcond,
		 double* work, int* iwork, int* info);
1035 1036
/* DSPEV - compute all the eigenvalues and, optionally, */
/* eigenvectors of a real symmetric matrix A in packed storage */
1037
La_extern void
1038
F77_NAME(dspev)(const char* jobz, const char* uplo, const int* n,
1039 1040
		double* ap, double* w, double* z, const int* ldz,
		double* work, int* info);
1041 1042
/* DSPEVD - compute all the eigenvalues and, optionally, */
/* eigenvectors of a real symmetric matrix A in packed storage */
1043
La_extern void
1044
F77_NAME(dspevd)(const char* jobz, const char* uplo,
1045 1046 1047 1048
		 const int* n, double* ap, double* w,
		 double* z, const int* ldz,
		 double* work, const int* lwork,
		 int* iwork, const int* liwork, int* info);
1049 1050
/* DSPEVX - compute selected eigenvalues and, optionally, */
/* eigenvectors of a real symmetric matrix A in packed storage */
1051
La_extern void
1052
F77_NAME(dspevx)(const char* jobz, const char* range,
1053 1054 1055 1056 1057 1058 1059 1060
		 const char* uplo, const int* n, double* ap,
		 const double* vl, const double* vu,
		 const int* il, const int* iu,
		 const double* abstol,
		 int* m, double* w,
		 double* z, const int* ldz,
		 double* work, int* iwork,
		 int* ifail, int* info);
1061 1062
/* DSPGST - reduce a real symmetric-definite generalized */
/* eigenproblem to standard form, using packed storage */
1063
La_extern void
1064
F77_NAME(dspgst)(const int* itype, const char* uplo,
1065
		 const int* n, double* ap, double* bp, int* info);
1066 1067 1068 1069
/* DSPGV - compute all the eigenvalues and, optionally, the */
/* eigenvectors of a real generalized symmetric-definite */
/* eigenproblem, of the form A*x=(lambda)*B*x, A*Bx=(lambda)*x, */
/* or B*A*x=(lambda)*x */
1070
La_extern void
1071
F77_NAME(dspgv)(const int* itype, const char* jobz,
1072 1073 1074 1075
		const char* uplo, const int* n,
		double* ap, double* bp, double* w,
		double* z, const int* ldz,
		double* work, int* info);
1076 1077 1078 1079 1080

/* DSPRFS - improve the computed solution to a system of linear */
/* equations when the coefficient matrix is symmetric indefinite */
/* and packed, and provides error bounds and backward error */
/* estimates for the solution */
1081
La_extern void
1082
F77_NAME(dsprfs)(const char* uplo, const int* n,
1083 1084 1085 1086 1087 1088
		 const int* nrhs, const double* ap,
		 const double* afp, const int* ipiv,
		 const double* b, const int* ldb,
		 double* x, const int* ldx,
		 double* ferr, double* berr,
		 double* work, int* iwork, int* info);
1089 1090 1091

/* DSPSV - compute the solution to a real system of linear */
/* equations  A * X = B, */
1092
La_extern void
1093
F77_NAME(dspsv)(const char* uplo, const int* n,
1094 1095
		const int* nrhs, double* ap, int* ipiv,
		double* b, const int* ldb, int* info);
1096 1097 1098 1099 1100 1101

/* DSPSVX - use the diagonal pivoting factorization A = U*D*U**T */
/* or A = L*D*L**T to compute the solution to a real system of */
/* linear equations A * X = B, where A is an N-by-N symmetric */
/* matrix stored in packed format and X and B are N-by-NRHS */
/* matrices */
1102
La_extern void
1103
F77_NAME(dspsvx)(const int* fact, const char* uplo,
1104 1105 1106 1107 1108 1109
		 const int* n, const int* nrhs,
		 const double* ap, double* afp, int* ipiv,
		 const double* b, const int* ldb,
		 double* x, const int* ldx,
		 double* rcond, double* ferr, double* berr,
		 double* work, int* iwork, int* info);
1110 1111 1112 1113

/* DSPTRD - reduce a real symmetric matrix A stored in packed */
/* form to symmetric tridiagonal form T by an orthogonal */
/* similarity transformation */
1114
La_extern void
1115
F77_NAME(dsptrd)(const char* uplo, const int* n,
1116 1117
		 double* ap, double* d, double* e,
		 double* tau, int* info);
1118 1119 1120 1121

/* DSPTRF - compute the factorization of a real symmetric matrix */
/* A stored in packed format using the Bunch-Kaufman diagonal */
/* pivoting method */
1122
La_extern void
1123
F77_NAME(dsptrf)(const char* uplo, const int* n,
1124
		 double* ap, int* ipiv, int* info);
1125 1126 1127 1128

/* DSPTRI - compute the inverse of a real symmetric indefinite */
/* matrix A in packed storage using the factorization A = U*D*U**T */
/* or A = L*D*L**T computed by DSPTRF */
1129
La_extern void
1130
F77_NAME(dsptri)(const char* uplo, const int* n,
1131 1132
		 double* ap, const int* ipiv,
		 double* work, int* info);
1133 1134 1135 1136

/* DSPTRS - solve a system of linear equations A*X = B with a */
/* real symmetric matrix A stored in packed format using the */
/* factorization A = U*D*U**T or A = L*D*L**T computed by DSPTRF */
1137
La_extern void
1138
F77_NAME(dsptrs)(const char* uplo, const int* n,
1139 1140
		 const int* nrhs, const double* ap,
		 const int* ipiv, double* b, const int* ldb, int* info);
1141

1142 1143

//* Double precision Symmetric Tridiagonal matrices  -> DST
1144 1145 1146

/* DSTEBZ - compute the eigenvalues of a symmetric tridiagonal */
/* matrix T */
1147
La_extern void
1148
F77_NAME(dstebz)(const char* range, const char* order, const int* n,
1149 1150 1151 1152 1153 1154 1155 1156
		 const double* vl, const double* vu,
		 const int* il, const int* iu,
		 const double *abstol,
		 const double* d, const double* e,
		 int* m, int* nsplit, double* w,
		 int* iblock, int* isplit,
		 double* work, int* iwork,
		 int* info);
1157 1158 1159
/* DSTEDC - compute all eigenvalues and, optionally, eigenvectors */
/* of a symmetric tridiagonal matrix using the divide and conquer */
/* method */
1160
La_extern void
1161
F77_NAME(dstedc)(const char* compz, const int* n,
1162 1163 1164 1165
		 double* d, double* e,
		 double* z, const int* ldz,
		 double* work, const int* lwork,
		 int* iwork, const int* liwork, int* info);
1166 1167 1168
/* DSTEIN - compute the eigenvectors of a real symmetric */
/* tridiagonal matrix T corresponding to specified eigenvalues, */
/* using inverse iteration */
1169
La_extern void
1170
F77_NAME(dstein)(const int* n, const double* d, const double* e,
1171 1172 1173 1174 1175
		 const int* m, const double* w,
		 const int* iblock, const int* isplit,
		 double* z, const int* ldz,
		 double* work, int* iwork,
		 int* ifail, int* info);
1176 1177 1178
/* DSTEQR - compute all eigenvalues and, optionally, eigenvectors */
/* of a symmetric tridiagonal matrix using the implicit QL or QR */
/* method */
1179
La_extern void
1180 1181 1182 1183 1184
F77_NAME(dsteqr)(const char* compz, const int* n, double* d, double* e,
		 double* z, const int* ldz, double* work, int* info);
/* DSTERF - compute all eigenvalues of a symmetric tridiagonal */
/* matrix using the Pal-Walker-Kahan variant of the QL or QR */
/* algorithm */
1185
La_extern void
1186 1187 1188
F77_NAME(dsterf)(const int* n, double* d, double* e, int* info);
/* DSTEV - compute all eigenvalues and, optionally, eigenvectors */
/* of a real symmetric tridiagonal matrix A */
1189
La_extern void
1190
F77_NAME(dstev)(const char* jobz, const int* n,
1191 1192 1193
		double* d, double* e,
		double* z, const int* ldz,
		double* work, int* info);
1194 1195
/* DSTEVD - compute all eigenvalues and, optionally, eigenvectors */
/* of a real symmetric tridiagonal matrix */
1196
La_extern void
1197
F77_NAME(dstevd)(const char* jobz, const int* n,
1198 1199 1200 1201
		 double* d, double* e,
		 double* z, const int* ldz,
		 double* work, const int* lwork,
		 int* iwork, const int* liwork, int* info);
1202 1203
/* DSTEVX - compute selected eigenvalues and, optionally, */
/* eigenvectors of a real symmetric tridiagonal matrix A */
1204
La_extern void
1205
F77_NAME(dstevx)(const char* jobz, const char* range,
1206 1207 1208 1209 1210 1211 1212 1213
		 const int* n, double* d, double* e,
		 const double* vl, const double* vu,
		 const int* il, const int* iu,
		 const double* abstol,
		 int* m, double* w,
		 double* z, const int* ldz,
		 double* work, int* iwork,
		 int* ifail, int* info);
1214

1215
//* Double precision SYmmetric matrices  -> DSY
1216 1217 1218 1219

/* DSYCON - estimate the reciprocal of the condition number (in */
/* the 1-norm); of a real symmetric matrix A using the */
/* factorization A = U*D*U**T or A = L*D*L**T computed by DSYTRF */
1220
La_extern void
1221
F77_NAME(dsycon)(const char* uplo, const int* n,
1222 1223 1224 1225
		 const double* a, const int* lda,
		 const int* ipiv,
		 const double* anorm, double* rcond,
		 double* work, int* iwork, int* info);
1226 1227
/* DSYEV - compute all eigenvalues and, optionally, eigenvectors */
/* of a real symmetric matrix A */
1228
La_extern void
1229
F77_NAME(dsyev)(const char* jobz, const char* uplo,
1230 1231
		const int* n, double* a, const int* lda,
		double* w, double* work, const int* lwork, int* info);
1232 1233
/* DSYEVD - compute all eigenvalues and, optionally, eigenvectors */
/* of a real symmetric matrix A */
1234
La_extern void
1235
F77_NAME(dsyevd)(const char* jobz, const char* uplo,
1236 1237 1238
		 const int* n, double* a, const int* lda,
		 double* w, double* work, const int* lwork,
		 int* iwork, const int* liwork, int* info);
1239 1240
/* DSYEVX - compute selected eigenvalues and, optionally, */
/* eigenvectors of a real symmetric matrix A */
1241
La_extern void
1242
F77_NAME(dsyevx)(const char* jobz, const char* range,
1243 1244 1245 1246 1247 1248 1249 1250
		 const char* uplo, const int* n,
		 double* a, const int* lda,
		 const double* vl, const double* vu,
		 const int* il, const int* iu,
		 const double* abstol,
		 int* m, double* w,
		 double* z, const int* ldz,
		 double* work, const int* lwork, int* iwork,
1251 1252
		 int* ifail, int* info);
/* DSYEVR - compute all eigenvalues and, optionally, eigenvectors   */
1253 1254
/* of a real symmetric matrix A					   */
La_extern void
1255 1256 1257 1258
F77_NAME(dsyevr)(const char *jobz, const char *range, const char *uplo,
		 const int *n, double *a, const int *lda,
		 const double *vl, const double *vu,
		 const int *il, const int *iu,
1259 1260
		 const double *abstol, int *m, double *w,
		 double *z, const int *ldz, int *isuppz,
1261 1262 1263
		 double *work, const int *lwork,
		 int *iwork, const int *liwork,
		 int *info);
1264 1265
/* DSYGS2 - reduce a real symmetric-definite generalized */
/* eigenproblem to standard form */
1266
La_extern void
1267
F77_NAME(dsygs2)(const int* itype, const char* uplo,
1268 1269
		 const int* n, double* a, const int* lda,
		 const double* b, const int* ldb, int* info);
1270 1271
/* DSYGST - reduce a real symmetric-definite generalized */
/* eigenproblem to standard form */
1272
La_extern void
1273
F77_NAME(dsygst)(const int* itype, const char* uplo,
1274 1275
		 const int* n, double* a, const int* lda,
		 const double* b, const int* ldb, int* info);
1276 1277 1278 1279
/* DSYGV - compute all the eigenvalues, and optionally, the */
/* eigenvectors of a real generalized symmetric-definite */
/* eigenproblem, of the form A*x=(lambda);*B*x, A*Bx=(lambda);*x, */
/* or B*A*x=(lambda);*x */
1280
La_extern void
1281
F77_NAME(dsygv)(const int* itype, const char* jobz,
1282 1283 1284 1285 1286
		const char* uplo, const int* n,
		double* a, const int* lda,
		double* b, const int* ldb,
		double* w, double* work, const int* lwork,
		int* info);
1287 1288 1289 1290
/* DSYRFS - improve the computed solution to a system of linear */
/* equations when the coefficient matrix is symmetric indefinite, */
/* and provides error bounds and backward error estimates for the */
/* solution */
1291
La_extern void
1292
F77_NAME(dsyrfs)(const char* uplo, const int* n,
1293