895e1570103f86ad35f2aaea24168b0edd3a287e
[alexxy/gromacs.git] / src / gromacs / linearalgebra / gmx_lapack.h
1 /*
2  * This file is part of the GROMACS molecular simulation package.
3  *
4  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
5  * Copyright (c) 2001-2008, The GROMACS development team.
6  * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
7  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
8  * and including many others, as listed in the AUTHORS file in the
9  * top-level source directory and at http://www.gromacs.org.
10  *
11  * GROMACS is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public License
13  * as published by the Free Software Foundation; either version 2.1
14  * of the License, or (at your option) any later version.
15  *
16  * GROMACS is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * Lesser General Public License for more details.
20  *
21  * You should have received a copy of the GNU Lesser General Public
22  * License along with GROMACS; if not, see
23  * http://www.gnu.org/licenses, or write to the Free Software Foundation,
24  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
25  *
26  * If you want to redistribute modifications to GROMACS, please
27  * consider that scientific software is very special. Version
28  * control is crucial - bugs must be traceable. We will be happy to
29  * consider code for inclusion in the official distribution, but
30  * derived work must not be called official GROMACS. Details are found
31  * in the README & COPYING files - if they are missing, get the
32  * official version at http://www.gromacs.org.
33  *
34  * To help us fund GROMACS development, we humbly ask that you cite
35  * the research papers on the package. Check out http://www.gromacs.org.
36  */
37 /*! \internal \file
38  * \brief
39  * Header definitions for the standard LAPACK library.
40  *
41  * This is the subset of LAPACK routines used for the
42  * linear algebra operations in Gromacs. Most of the execution time
43  * will be spent in the BLAS routines, which you hopefully have an
44  * optimized version of. Gromacs includes reference implementations
45  * of both BLAS and LAPACK so it compiles everywhere, but you should
46  * really try to find a vendor or otherwise optimized version at least
47  * of BLAS for better performance.
48  *
49  * Do NOT use this code for other purposes - we only provide this as a
50  * simple fallback/reference implementation when no optimized BLAS
51  * is present. If you need an implementation for your own code
52  * there are several much faster versions out there.
53  *
54  * All routines are compatible with the LAPACK/BLAS reference implementations,
55  * meaning they assume fortran-style matrix row/column organization.
56  *
57  * There is plenty of documentation for these routines available
58  * at http://www.netlib.org/lapack , so there is no point in repeating
59  * it here.
60  */
61 #ifndef GMX_LAPACK_H
62 #define GMX_LAPACK_H
63
64 /*! \cond */
65
66 #ifdef HAVE_CONFIG_H
67 #include "config.h"
68 #endif
69
70 /* These are not required by this file, but by the internal LAPACK
71  * implementation.  In principle, they could be included in each file
72  * that requires them, but this is simpler.  Since the header is internal
73  * to the linearyalgebra/ module, the added complexity may not be worth it. */
74 #include "gromacs/utility/basedefinitions.h"
75 #include "gromacs/utility/real.h"
76
77 /* Suppress Cygwin compiler warnings from using newlib version of
78  * ctype.h */
79 #ifdef GMX_CYGWIN
80 #undef toupper
81 #endif
82
83 #ifdef __cplusplus
84 extern "C" {
85 #endif
86 #if 0
87 }
88 #endif
89 /* Double precision */
90
91 void
92     F77_FUNC(dbdsdc, DBDSDC) (const char *uplo, const char *compq, int *n, double *d, double *e, double *u,
93                               int *ldu, double *vt, int *ldvt, double *q, int *iq, double *work,
94                               int *iwork, int *info);
95
96 void
97     F77_FUNC(dgetf2, DGETF2) (int *m, int *n, double *a, int *lda, int *ipiv, int *info);
98
99 void
100     F77_FUNC(dlamrg, DLAMRG) (int *n1, int *n2, double *a, int *dtrd1, int *dtrd2, int *index);
101
102 void
103     F77_FUNC(dlarnv, DLARNV) (int *idist, int *iseed, int *n, double *x);
104
105 void
106     F77_FUNC(dlasd0, DLASD0) (int *n, int *sqre, double *d, double *e, double *u,
107                               int *ldu, double *vt, int *ldvt, int *smlsiz, int *iwork,
108                               double *work, int *info);
109
110 void
111     F77_FUNC(dlasda, DLASDA) (int *icompq, int *smlsiz, int *n, int *sqre, double *d, double *e,
112                               double *u, int *ldu, double *vt, int *k, double *difl, double *difr,
113                               double *z, double *poles, int *givptr, int *givcol, int *ldgcol,
114                               int *perm, double *givnum, double *c, double *s,
115                               double *work, int *iwork, int *info);
116
117 void
118     F77_FUNC(dlasq6, DLASQ6) (int *i0, int *n0, double *z, int *pp, double *dmin, double *dmin1,
119                               double *dmin2, double *dn, double *dnm1, double *dnm2);
120
121 void
122     F77_FUNC(dorgl2, DORGL2) (int *m, int *n, int *k, double *a, int *lda,
123                               double *tau, double *work, int *info);
124
125 void
126     F77_FUNC(dbdsqr, DBDSQR) (const char *uplo, int *n, int *ncvt, int *nru, int *ncc, double *d,
127                               double *e, double *vt, int *ldvt, double *u, int *ldu,
128                               double *c, int *ldc, double *work, int *info);
129
130 void
131     F77_FUNC(dgetrf, DGETRF) (int *m, int *n, double *a, int *lda, int *ipiv, int *info);
132
133 void
134     F77_FUNC(dgetri, DGETRI) (int *n, double *a, int *lda, int *ipiv, double *work,
135                               int *lwork, int *info);
136
137 void
138     F77_FUNC(dgetrs, DGETRS) (const char *trans, int *n, int *nrhs,   double *a, int *lda, int *ipiv,
139                               double *b, int *ldb, int *info);
140
141 void
142     F77_FUNC(dtrtri, DTRTRI) (const char *uplo, const char *diag, int *n, double *a, int *lda, int *info);
143
144 void
145     F77_FUNC(dtrti2, DTRTI2) (const char *uplo, const char *diag, int *n, double *a, int *lda, int *info);
146
147 double
148     F77_FUNC(dlange, DLANGE) (const char *norm, int *m, int *n, double *a, int *lda, double *work);
149
150 void
151     F77_FUNC(dlarrbx, DLARRBX) (int *n, double *d, double *l, double *ld, double *lld, int *ifirst,
152                                 int *ilast, double *rtol1, double *rtol2, int *offset, double *w,
153                                 double *wgap, double *werr, double *work, int *iwork, int *info);
154
155 void
156     F77_FUNC(dlasd1, DLASD1) (int *nl, int *nr, int *sqre, double *d, double *alpha, double *beta,
157                               double *u, int *ldu, double *vt, int *ldvt, int *idxq, int *iwork,
158                               double *work, int *info);
159
160 void
161     F77_FUNC(dlasdq, DLASDQ) (const char *uplo, int *sqre, int *n, int *ncvt, int *nru, int *ncc,
162                               double *d, double *e, double *vt, int *ldvt, double *u, int *ldu,
163                               double *c, int *ldc, double *work, int *info);
164
165 void
166     F77_FUNC(dlasr, DLASR) (const char *side, const char *pivot, const char *direct, int *m, int *n, double *c,
167                             double *s, double *a, int *lda);
168
169 void
170     F77_FUNC(dorglq, DORGLQ) (int *m, int *n, int *k, double *a, int *lda,
171                               double *tau, double *work, int *lwork, int *info);
172
173 void
174     F77_FUNC(dormtr, DORMTR) (const char *side, const char *uplo, const char *trans, int *m, int *n, double *a,
175                               int *lda, double *tau, double *c, int *ldc,
176                               double *work, int *lwork, int *info);
177
178 void
179     F77_FUNC(dgebd2, DGEBD2) (int *m, int *n, double *a, int *lda, double *d, double *e,
180                               double *tauq, double *taup, double *work, int *info);
181
182 void
183     F77_FUNC(dlabrd, DLABRD) (int *m, int *n, int *nb, double *a, int *lda, double *d,
184                               double *e, double *tauq, double *taup, double *x,
185                               int *ldx, double *y, int *ldy);
186
187 double
188     F77_FUNC(dlanst, DLANST) (const char *norm, int *n, double *d, double *e);
189
190 double
191     F77_FUNC(dlansy, DLANSY) (const char *norm, const char *uplo, int *n, double *a, int *lda, double *work);
192
193 void
194     F77_FUNC(dlarrex, DLARREX) (const char *range, int *n, double *vl, double *vu, int *il, int *iu,
195                                 double *d, double *e, double *tol, int *nsplit,
196                                 int *isplit, int *m, double *w, int *iblock, int *indexw,
197                                 double *gersch, double *work, int *iwork, int *info);
198
199 void
200     F77_FUNC(dlasd2, DLASD2) (int *nl, int *nr, int *sqre, int *k, double *d, double *z,
201                               double *alpha, double *beta, double *u, int *ldu, double *vt,
202                               int *ldvt, double *dsigma, double *u2, int *ldu2, double *vt2,
203                               int *ldvt2, int *idxp, int *idx, int *idxc,
204                               int *idxq, int *coltyp, int *info);
205
206 void
207     F77_FUNC(dlasdt, DLASDT) (int *n, int *lvl, int *nd, int *inode, int *ndiml,
208                               int *ndimr, int *msub);
209
210 void
211     F77_FUNC(dlasrt, DLASRT) (const char *id, int *n, double *d, int *info);
212
213 void
214     F77_FUNC(dlasrt2, DLASRT2) (const char *id, int *n, double *d, int *key, int *info);
215
216 void
217     F77_FUNC(ilasrt2, ILASRT2) (const char *id, int *n, int *d, int *key, int *info);
218
219 void
220     F77_FUNC(dorgqr, DORGQR) (int *m, int *n, int *k, double *a, int *lda, double *tau,
221                               double *work, int *lwork, int *info);
222
223 void
224     F77_FUNC(dstebz, DSTEBZ) (const char *range, const char *order, int *n, double *vl, double *vu,
225                               int *il, int *iu, double *abstol, double *d, double *e,
226                               int *m, int *nsplit, double *w, int *iblock, int *isplit,
227                               double *work, int *iwork, int *info);
228
229 void
230     F77_FUNC(dsteqr, DSTEQR) (const char *compz, int *n, double *d__, double *e,
231                               double *z__,  int *ldz, double *work, int *info);
232
233 void
234     F77_FUNC(dgebrd, DGEBRD) (int *m, int *n, double *a, int *lda, double *d, double *e,
235                               double *tauq, double *taup, double *work, int *lwork, int *info);
236
237 void
238     F77_FUNC(dlacpy, DLACPY) (const char *uplo, int *m, int *n, double *a, int *lda, double *b, int *ldb);
239
240 double
241     F77_FUNC(dlapy2, DLAPY2) (double * x, double * y);
242
243
244 void
245     F77_FUNC(dlarrfx, DLARRFX) (int *n, double *d, double *l, double *ld, double *lld, int *ifirst,
246                                 int *ilast, double *w, double *sigma, double *dplus, double *lplus,
247                                 double *work, int *info);
248
249 void
250     F77_FUNC(dlasd3, DLASD3) (int *nl, int *nr, int *sqre, int *k, double *d, double *q, int *ldq,
251                               double *dsigma, double *u, int *ldu, double *u2, int *ldu2,
252                               double *vt, int *ldvt, double *vt2, int *ldvt2, int *idxc,
253                               int *ctot, double *z, int *info);
254
255 void
256     F77_FUNC(dlaset, DLASET) (const char *uplo, int *m, int *n, double *alpha,
257                               double *beta, double *a, int *lda);
258
259 void
260     F77_FUNC(dlassq, DLASSQ) (int *n, double *x, int *incx, double *scale, double *sumsq);
261
262 void
263     F77_FUNC(dorm2l, DORM2L) (const char *side, const char *trans, int *m, int *n, int *k, double *a, int *lda,
264                               double *tau, double *c, int *ldc, double *work, int *info);
265
266 void
267     F77_FUNC(dstegr, DSTEGR) (const char *jobz, const char *range, int *n, double *d, double *e, double *vl,
268                               double *vu, int *il, int *iu, double *abstol, int *m, double *w,
269                               double *z, int *ldz, int *isuppz, double *work,
270                               int *lwork, int *iwork, int *liwork, int *info);
271
272 void
273     F77_FUNC(ssteqr, SSTEQR) (const char *compz, int *n, float *d__, float *e,
274                               float *z__,  int *ldz, float *work, int *info);
275
276 void
277     F77_FUNC(dgelq2, DGELQ2) (int *m, int *n, double *a, int *lda, double *tau, double *work, int *info);
278
279 void
280     F77_FUNC(dlae2, DLAE2) (double *a, double *b, double *c, double *rt1, double *rt2);
281
282 void
283     F77_FUNC(dlaev2, DLAEV2) (double *a, double *b, double *c, double *rt1, double *rt2,
284                               double *cs1, double *cs2);
285
286 void
287     F77_FUNC(dlar1vx, DLAR1VX) (int *n, int *b1, int *bn, double *sigma, double *d, double *l, double *ld,
288                                 double *lld, double *eval, double *gersch, double *z, double *ztz, double *mingma,
289                                 int *r, int *isuppz, double *work);
290
291 void
292     F77_FUNC(dlarrvx, DLARRVX) (int *n, double *d, double *l, int *isplit, int *m, double *w,
293                                 int *iblock, int *indexw, double *gersch, double *tol, double *z, int *ldz,
294                                 int *isuppz, double *work, int *iwork, int *info);
295
296 void
297     F77_FUNC(dlasd4, DLASD4) (int *n, int *i, double *d, double *z, double *delta,
298                               double *rho, double *sigma, double *work, int *info);
299
300 void
301     F77_FUNC(dlasq1, DLASQ1) (int *n, double *d, double *e, double *work, int *info);
302
303
304 void
305     F77_FUNC(dlasv2, DLASV2) (double *f, double *g, double *h, double *ssmin, double *ssmax,
306                               double *snr, double *csr, double *snl, double *csl);
307
308 void
309     F77_FUNC(dorm2r, DORM2R) (const char *side, const char *trans, int *m, int *n, int *k, double *a,
310                               int *lda, double *tau, double *c, int *ldc, double *work, int *info);
311
312 void
313     F77_FUNC(dstein, DSTEIN) (int *n, double *d, double *e, int *m, double *w, int *iblock, int *isplit,
314                               double *z, int *ldz, double *work, int *iwork, int *ifail, int *info);
315
316 void
317     F77_FUNC(dgelqf, DGELQF) (int *m, int *n, double *a, int *lda, double *tau,
318                               double *work, int *lwork, int *info);
319
320 void
321     F77_FUNC(dlaebz, DLAEBZ) (int *ijob, int *nitmax, int *n, int *mmax, int *minp, int *nbmin,
322                               double *abstol, double *reltol, double *pivmin, double *d, double *e,
323                               double *e2, int *nval, double *ab, double *c, int *mout, int *nab,
324                               double *work, int *iwork, int *info);
325
326 void
327     F77_FUNC(dlarf, DLARF) (const char *side, int *m, int *n, double *v, int *incv, double *tau,
328                             double *c, int *ldc, double *work);
329
330 void
331     F77_FUNC(dlartg, DLARTG) (double *f, double *g, double *cs, double *sn, double *r);
332
333 void
334     F77_FUNC(dlasd5, DLASD5) (int *i, double *d, double *z, double *delta,
335                               double *rho, double *dsigma, double *work);
336
337 void
338     F77_FUNC(dlasq2, DLASQ2) (int *n, double *z, int *info);
339
340 void
341     F77_FUNC(dlasq3, DLASQ3) (int *i0, int *n0, double *z, int *pp, double *dmin,
342                               double *sigma, double *desig, double *qmax, int *nfail,
343                               int *iter, int *ndiv, int *ieee);
344
345 void
346     F77_FUNC(dlaswp, DLASWP) (int *n, double *a, int *lda, int *k1, int *k2, int *ipiv, int *incx);
347
348 void
349     F77_FUNC(dormbr, DORMBR) (const char *vect, const char *side, const char *trans, int *m, int *n, int *k,
350                               double *a, int *lda, double *tau, double *c, int *ldc, double *work,
351                               int *lwork, int *info);
352
353 void
354     F77_FUNC(dsterf, DSTERF) (int *n, double *d, double *e, int *info);
355
356 void
357     F77_FUNC(dgeqr2, DGEQR2) (int *m, int *n, double *a, int *lda, double *tau,
358                               double *work, int *info);
359
360 void
361     F77_FUNC(dlaed6, DLAED6) (int *kniter, int *orgati, double *rho, double *d,
362                               double *z, double *finit, double *tau, int *info);
363
364 void
365     F77_FUNC(dlarfb, DLARFB) (const char *side, const char *trans, const char *direct, const char *storev, int *m, int *n,
366                               int *k, double *v, int *ldv, double *t, int *ldt, double *c,
367                               int *ldc, double *work, int *ldwork);
368
369 void
370     F77_FUNC(dlaruv, DLARUV) (int *iseed, int *n, double *x);
371
372 void
373     F77_FUNC(dlasd6, DLASD6) (int *icompq, int *nl, int *nr, int *sqre, double *d, double *vf,
374                               double *vl, double *alpha, double *beta, int *idxq, int *perm,
375                               int *givptr, int *givcol, int *ldgcol, double *givnum, int *ldgnum,
376                               double *poles, double *difl, double *difr, double *z, int *k,
377                               double *c, double *s, double *work, int *iwork, int *info);
378
379 void
380     F77_FUNC(dlatrd, DLATRD) (const char *uplo, int *n, int *nb, double *a, int *lda, double *e,
381                               double * tau, double *w, int *ldw);
382
383 void
384     F77_FUNC(dorml2, DORML2) (const char *side, const char *trans, int *m, int *n, int *k, double *a,
385                               int *lda, double *tau, double *c, int *ldc, double *work, int *info);
386
387 void
388     F77_FUNC(dstevr, DSTEVR) (const char *jobz, const char *range, int *n, double *d, double *e, double *vl,
389                               double *vu, int *il, int *iu, double *abstol, int *m, double *w,
390                               double *z, int *ldz, int *isuppz, double *work,
391                               int *lwork, int *iwork, int *liwork, int *info);
392
393 void
394     F77_FUNC(dsytrd, DSYTRD) (const char *uplo, int *n, double *  a, int *lda, double *d,
395                               double *e, double *tau, double *work, int *lwork, int *info);
396
397 void
398     F77_FUNC(dsyevr, DSYEVR) (const char *jobz, const char *range, const char *uplo, int *n,
399                               double *a, int *lda, double *vl, double *vu, int *
400                               il, int *iu, double *abstol, int *m, double *w,
401                               double *z__, int *ldz, int *isuppz, double *work,
402                               int *lwork, int *iwork, int *liwork, int *info);
403
404 void
405     F77_FUNC(dormql, DORMQL) (const char *side, const char *trans, int *m, int *n,
406                               int *k, double *a, int *lda, double *tau, double *
407                               c, int *ldc, double *work, int *lwork, int *info);
408
409 void
410     F77_FUNC(dormqr, DORMQR) (const char *side, const char *trans, int *m, int *n, int *k, double *a,
411                               int *lda, double *tau, double *c, int *ldc,
412                               double *work, int *lwork, int *info);
413
414 void
415     F77_FUNC(dorgbr, DORGBR) (const char *vect, int *m, int *n, int *k, double *a, int *lda,
416                               double *tau, double *work, int *lwork, int *info);
417
418 void
419     F77_FUNC(dlasq5, DLASQ5) (int *i0, int *n0, double *z, int *pp, double *tau, double *dmin,
420                               double *dmin1, double *dmin2, double *dn, double *dnm1,
421                               double *dnm2, int *ieee);
422
423 void
424     F77_FUNC(dlasd8, DLASD8) (int *icompq, int *k, double *d, double *z, double *vf, double *vl,
425                               double *difl, double *difr, int *lddifr, double *dsigma,
426                               double *work, int *info);
427
428 void
429     F77_FUNC(dlascl, DLASCL) (const char *type, int *kl, int *ku, double *cfrom, double *cto, int *m,
430                               int *n, double *a, int *lda, int *info);
431
432 void
433     F77_FUNC(dlarft, DLARFT) (const char *direct, const char *storev, int *n, int *k, double *v,
434                               int *ldv, double *tau, double *t, int *ldt);
435
436 void
437     F77_FUNC(dlagts, DLAGTS) (int *job, int *n, double *a, double *b, double *c, double *d,
438                               int *in, double *y, double *tol, int *info);
439
440 void
441     F77_FUNC(dgesdd, DGESDD) (const char *jobz, int *m, int *n, double *a, int *lda, double *s, double *u,
442                               int *ldu, double *vt, int *ldvt, double *work, int *lwork,
443                               int *iwork, int *info);
444
445 void
446     F77_FUNC(dsytd2, DSYTD2) (const char *uplo, int *n, double *a, int *lda, double *d,
447                               double *e, double *tau, int *info);
448
449 void
450     F77_FUNC(dormlq, DORMLQ) (const char *side, const char *trans, int *m, int *n, int *k, double *a, int *lda,
451                               double *tau, double *c, int *ldc, double *work, int *lwork, int *info);
452
453 void
454     F77_FUNC(dorg2r, DORG2R) (int *m, int *n, int *k, double *a, int *lda, double *tau,
455                               double *work, int *info);
456
457 void
458     F77_FUNC(dlasq4, DLASQ4) (int *i0, int *n0, double *z, int *pp, int *n0in, double *dmin,
459                               double *dmin1, double *dmin2, double *dn, double *dn1,
460                               double *dn2, double *tau, int *ttype);
461
462 void
463     F77_FUNC(dlasd7, DLASD7) (int *icompq, int *nl, int *nr, int *sqre, int *k, double *d, double *z,
464                               double *zw, double *vf, double *vfw, double *vl, double *vlw,
465                               double *alpha, double *beta, double *dsigma, int *idx, int *idxp,
466                               int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol,
467                               double *givnum, int *ldgnum, double *c, double *s, int *info);
468
469 void
470     F77_FUNC(dlas2, DLAS2) (double *f, double *g, double *h, double *ssmin, double *ssmax);
471
472 void
473     F77_FUNC(dlarfg, DLARFG) (int *n, double *alpha, double *x, int *incx, double *tau);
474
475 void
476     F77_FUNC(dlagtf, DLAGTF) (int *n, double *a, double *lambda, double *b, double *c,
477                               double *tol, double *d, int *in, int *info);
478
479 void
480     F77_FUNC(dgeqrf, DGEQRF) (int *m, int *n, double *a, int *lda, double *tau,
481                               double *work, int *lwork, int *info);
482
483
484
485 /* Single precision */
486
487 void
488     F77_FUNC(sbdsdc, SBDSDC) (const char *uplo, const char *compq, int *n, float *d, float *e, float *u,
489                               int *ldu, float *vt, int *ldvt, float *q, int *iq, float *work,
490                               int *iwork, int *info);
491
492 void
493     F77_FUNC(sgetf2, SGETF2) (int *m, int *n, float *a, int *lda, int *ipiv, int *info);
494
495 void
496     F77_FUNC(slamrg, SLAMRG) (int *n1, int *n2, float *a, int *dtrd1, int *dtrd2, int *index);
497
498 void
499     F77_FUNC(slarnv, SLARNV) (int *idist, int *iseed, int *n, float *x);
500
501 void
502     F77_FUNC(slasd0, SLASD0) (int *n, int *sqre, float *d, float *e, float *u,
503                               int *ldu, float *vt, int *ldvt, int *smlsiz, int *iwork,
504                               float *work, int *info);
505
506 void
507     F77_FUNC(slasda, SLASDA) (int *icompq, int *smlsiz, int *n, int *sqre, float *d, float *e,
508                               float *u, int *ldu, float *vt, int *k, float *difl, float *difr,
509                               float *z, float *poles, int *givptr, int *givcol, int *ldgcol,
510                               int *perm, float *givnum, float *c, float *s,
511                               float *work, int *iwork, int *info);
512
513 void
514     F77_FUNC(slasq6, SLASQ6) (int *i0, int *n0, float *z, int *pp, float *dmin, float *dmin1,
515                               float *dmin2, float *dn, float *dnm1, float *dnm2);
516
517 void
518     F77_FUNC(sorgl2, SORGL2) (int *m, int *n, int *k, float *a, int *lda,
519                               float *tau, float *work, int *info);
520
521 void
522     F77_FUNC(sbdsqr, SBDSQR) (const char *uplo, int *n, int *ncvt, int *nru, int *ncc, float *d,
523                               float *e, float *vt, int *ldvt, float *u, int *ldu,
524                               float *c, int *ldc, float *work, int *info);
525
526 void
527     F77_FUNC(sgetrf, SGETRF) (int *m, int *n, float *a, int *lda, int *ipiv, int *info);
528
529 void
530     F77_FUNC(sgetri, SGETRI) (int *n, float *a, int *lda, int *ipiv, float *work,
531                               int *lwork, int *info);
532
533 void
534     F77_FUNC(sgetrs, SGETRS) (const char *trans, int *n, int *nrhs,   float *a, int *lda, int *ipiv,
535                               float *b, int *ldb, int *info);
536
537 void
538     F77_FUNC(strtri, STRTRI) (const char *uplo, const char *diag, int *n, float *a, int *lda, int *info);
539
540 void
541     F77_FUNC(strti2, STRTI2) (const char *uplo, const char *diag, int *n, float *a, int *lda, int *info);
542
543 float
544     F77_FUNC(slange, SLANGE) (const char *norm, int *m, int *n, float *a, int *lda, float *work);
545
546 void
547     F77_FUNC(slarrbx, SLARRBX) (int *n, float *d, float *l, float *ld, float *lld, int *ifirst,
548                                 int *ilast, float *rtol1, float *rtol2, int *offset, float *w,
549                                 float *wgap, float *werr, float *work, int *iwork, int *info);
550
551 void
552     F77_FUNC(slasd1, SLASD1) (int *nl, int *nr, int *sqre, float *d, float *alpha, float *beta,
553                               float *u, int *ldu, float *vt, int *ldvt, int *idxq, int *iwork,
554                               float *work, int *info);
555
556 void
557     F77_FUNC(slasdq, SLASDQ) (const char *uplo, int *sqre, int *n, int *ncvt, int *nru, int *ncc,
558                               float *d, float *e, float *vt, int *ldvt, float *u, int *ldu,
559                               float *c, int *ldc, float *work, int *info);
560
561 void
562     F77_FUNC(slasr, SLASR) (const char *side, const char *pivot, const char *direct, int *m, int *n, float *c,
563                             float *s, float *a, int *lda);
564
565 void
566     F77_FUNC(sorglq, SORGLQ) (int *m, int *n, int *k, float *a, int *lda,
567                               float *tau, float *work, int *lwork, int *info);
568
569 void
570     F77_FUNC(sormtr, SORMTR) (const char *side, const char *uplo, const char *trans, int *m, int *n, float *a,
571                               int *lda, float *tau, float *c, int *ldc,
572                               float *work, int *lwork, int *info);
573
574 void
575     F77_FUNC(sgebd2, SGEBD2) (int *m, int *n, float *a, int *lda, float *d, float *e,
576                               float *tauq, float *taup, float *work, int *info);
577
578 void
579     F77_FUNC(slabrd, SLABRD) (int *m, int *n, int *nb, float *a, int *lda, float *d,
580                               float *e, float *tauq, float *taup, float *x,
581                               int *ldx, float *y, int *ldy);
582
583 float
584     F77_FUNC(slanst, SLANST) (const char *norm, int *n, float *d, float *e);
585
586 float
587     F77_FUNC(slansy, SLANSY) (const char *norm, const char *uplo, int *n, float *a, int *lda, float *work);
588
589 void
590     F77_FUNC(slarrex, SLARREX) (const char *range, int *n, float *vl, float *vu, int *il, int *iu,
591                                 float *d, float *e, float *tol, int *nsplit,
592                                 int *isplit, int *m, float *w, int *iblock, int *indexw,
593                                 float *gersch, float *work, int *iwork, int *info);
594
595 void
596     F77_FUNC(slasd2, SLASD2) (int *nl, int *nr, int *sqre, int *k, float *d, float *z,
597                               float *alpha, float *beta, float *u, int *ldu, float *vt,
598                               int *ldvt, float *dsigma, float *u2, int *ldu2, float *vt2,
599                               int *ldvt2, int *idxp, int *idx, int *idxc,
600                               int *idxq, int *coltyp, int *info);
601
602 void
603     F77_FUNC(slasdt, SLASDT) (int *n, int *lvl, int *nd, int *inode, int *ndiml,
604                               int *ndimr, int *msub);
605
606 void
607     F77_FUNC(slasrt, SLASRT) (const char *id, int *n, float *d, int *info);
608
609 void
610     F77_FUNC(slasrt2, SLASRT2) (const char *id, int *n, float *d, int *key, int *info);
611
612 void
613     F77_FUNC(sorgqr, SORGQR) (int *m, int *n, int *k, float *a, int *lda, float *tau,
614                               float *work, int *lwork, int *info);
615
616 void
617     F77_FUNC(sstebz, SSTEBZ) (const char *range, const char *order, int *n, float *vl, float *vu,
618                               int *il, int *iu, float *abstol, float *d, float *e,
619                               int *m, int *nsplit, float *w, int *iblock, int *isplit,
620                               float *work, int *iwork, int *info);
621
622 void
623     F77_FUNC(sgebrd, SGEBRD) (int *m, int *n, float *a, int *lda, float *d, float *e,
624                               float *tauq, float *taup, float *work, int *lwork, int *info);
625
626 void
627     F77_FUNC(slacpy, SLACPY) (const char *uplo, int *m, int *n, float *a, int *lda, float *b, int *ldb);
628
629 float
630     F77_FUNC(slapy2, SLAPY2) (float * x, float * y);
631
632 void
633     F77_FUNC(slarrfx, SLARRFX) (int *n, float *d, float *l, float *ld, float *lld, int *ifirst,
634                                 int *ilast, float *w, float *sigma, float *dplus, float *lplus,
635                                 float *work, int *info);
636
637 void
638     F77_FUNC(slasd3, SLASD3) (int *nl, int *nr, int *sqre, int *k, float *d, float *q, int *ldq,
639                               float *dsigma, float *u, int *ldu, float *u2, int *ldu2,
640                               float *vt, int *ldvt, float *vt2, int *ldvt2, int *idxc,
641                               int *ctot, float *z, int *info);
642
643 void
644     F77_FUNC(slaset, SLASET) (const char *uplo, int *m, int *n, float *alpha,
645                               float *beta, float *a, int *lda);
646
647 void
648     F77_FUNC(slassq, SLASSQ) (int *n, float *x, int *incx, float *scale, float *sumsq);
649
650 void
651     F77_FUNC(sorm2l, SORM2L) (const char *side, const char *trans, int *m, int *n, int *k, float *a, int *lda,
652                               float *tau, float *c, int *ldc, float *work, int *info);
653
654 void
655     F77_FUNC(sstegr, SSTEGR) (const char *jobz, const char *range, int *n, float *d, float *e, float *vl,
656                               float *vu, int *il, int *iu, float *abstol, int *m, float *w,
657                               float *z, int *ldz, int *isuppz, float *work,
658                               int *lwork, int *iwork, int *liwork, int *info);
659
660 void
661     F77_FUNC(sgelq2, SGELQ2) (int *m, int *n, float *a, int *lda, float *tau, float *work, int *info);
662
663 void
664     F77_FUNC(slae2, SLAE2) (float *a, float *b, float *c, float *rt1, float *rt2);
665
666 void
667     F77_FUNC(slaev2, SLAEV2) (float *a, float *b, float *c, float *rt1, float *rt2,
668                               float *cs1, float *cs2);
669
670 void
671     F77_FUNC(slar1vx, SLAR1VX) (int *n, int *b1, int *bn, float *sigma, float *d, float *l, float *ld,
672                                 float *lld, float *eval, float *gersch, float *z, float *ztz, float *mingma,
673                                 int *r, int *isuppz, float *work);
674
675 void
676     F77_FUNC(slarrvx, SLARRVX) (int *n, float *d, float *l, int *isplit, int *m, float *w,
677                                 int *iblock, int *indexw, float *gersch, float *tol, float *z, int *ldz,
678                                 int *isuppz, float *work, int *iwork, int *info);
679
680 void
681     F77_FUNC(slasd4, SLASD4) (int *n, int *i, float *d, float *z, float *delta,
682                               float *rho, float *sigma, float *work, int *info);
683
684 void
685     F77_FUNC(slasq1, SLASQ1) (int *n, float *d, float *e, float *work, int *info);
686
687
688 void
689     F77_FUNC(slasv2, SLASV2) (float *f, float *g, float *h, float *ssmin, float *ssmax,
690                               float *snr, float *csr, float *snl, float *csl);
691
692 void
693     F77_FUNC(sorm2r, SORM2R) (const char *side, const char *trans, int *m, int *n, int *k, float *a,
694                               int *lda, float *tau, float *c, int *ldc, float *work, int *info);
695
696 void
697     F77_FUNC(sstein, SSTEIN) (int *n, float *d, float *e, int *m, float *w, int *iblock, int *isplit,
698                               float *z, int *ldz, float *work, int *iwork, int *ifail, int *info);
699
700 void
701     F77_FUNC(sgelqf, SGELQF) (int *m, int *n, float *a, int *lda, float *tau,
702                               float *work, int *lwork, int *info);
703
704 void
705     F77_FUNC(slaebz, SLAEBZ) (int *ijob, int *nitmax, int *n, int *mmax, int *minp, int *nbmin,
706                               float *abstol, float *reltol, float *pivmin, float *d, float *e,
707                               float *e2, int *nval, float *ab, float *c, int *mout, int *nab,
708                               float *work, int *iwork, int *info);
709
710 void
711     F77_FUNC(slarf, SLARF) (const char *side, int *m, int *n, float *v, int *incv, float *tau,
712                             float *c, int *ldc, float *work);
713
714 void
715     F77_FUNC(slartg, SLARTG) (float *f, float *g, float *cs, float *sn, float *r);
716
717 void
718     F77_FUNC(slasd5, SLASD5) (int *i, float *d, float *z, float *delta,
719                               float *rho, float *dsigma, float *work);
720
721 void
722     F77_FUNC(slasq2, SLASQ2) (int *n, float *z, int *info);
723
724 void
725     F77_FUNC(slasq3, SLASQ3) (int *i0, int *n0, float *z, int *pp, float *dmin,
726                               float *sigma, float *desig, float *qmax, int *nfail,
727                               int *iter, int *ndiv, int *ieee);
728
729 void
730     F77_FUNC(slaswp, SLASWP) (int *n, float *a, int *lda, int *k1, int *k2, int *ipiv, int *incx);
731
732 void
733     F77_FUNC(sormbr, SORMBR) (const char *vect, const char *side, const char *trans, int *m, int *n, int *k,
734                               float *a, int *lda, float *tau, float *c, int *ldc, float *work,
735                               int *lwork, int *info);
736
737 void
738     F77_FUNC(ssterf, SSTERF) (int *n, float *d, float *e, int *info);
739
740 void
741     F77_FUNC(sgeqr2, SGEQR2) (int *m, int *n, float *a, int *lda, float *tau,
742                               float *work, int *info);
743
744 void
745     F77_FUNC(slaed6, SLAED6) (int *kniter, int *orgati, float *rho, float *d,
746                               float *z, float *finit, float *tau, int *info);
747
748 void
749     F77_FUNC(slarfb, SLARFB) (const char *side, const char *trans, const char *direct, const char *storev, int *m, int *n,
750                               int *k, float *v, int *ldv, float *t, int *ldt, float *c,
751                               int *ldc, float *work, int *ldwork);
752
753 void
754     F77_FUNC(slaruv, SLARUV) (int *iseed, int *n, float *x);
755
756 void
757     F77_FUNC(slasd6, SLASD6) (int *icompq, int *nl, int *nr, int *sqre, float *d, float *vf,
758                               float *vl, float *alpha, float *beta, int *idxq, int *perm,
759                               int *givptr, int *givcol, int *ldgcol, float *givnum, int *ldgnum,
760                               float *poles, float *difl, float *difr, float *z, int *k,
761                               float *c, float *s, float *work, int *iwork, int *info);
762
763 void
764     F77_FUNC(slatrd, SLATRD) (const char *uplo, int *n, int *nb, float *a, int *lda, float *e,
765                               float * tau, float *w, int *ldw);
766
767 void
768     F77_FUNC(sorml2, SORML2) (const char *side, const char *trans, int *m, int *n, int *k, float *a,
769                               int *lda, float *tau, float *c, int *ldc, float *work, int *info);
770
771 void
772     F77_FUNC(sstevr, SSTEVR) (const char *jobz, const char *range, int *n, float *d, float *e, float *vl,
773                               float *vu, int *il, int *iu, float *abstol, int *m, float *w,
774                               float *z, int *ldz, int *isuppz, float *work,
775                               int *lwork, int *iwork, int *liwork, int *info);
776
777 void
778     F77_FUNC(ssytrd, SSYTRD) (const char *uplo, int *n, float *  a, int *lda, float *d,
779                               float *e, float *tau, float *work, int *lwork, int *info);
780
781 void
782     F77_FUNC(ssyevr, SSYEVR) (const char *jobz, const char *range, const char *uplo, int *n,
783                               float *a, int *lda, float *vl, float *vu, int *
784                               il, int *iu, float *abstol, int *m, float *w,
785                               float *z__, int *ldz, int *isuppz, float *work,
786                               int *lwork, int *iwork, int *liwork, int *info);
787
788 void
789     F77_FUNC(sormql, SORMQL) (const char *side, const char *trans, int *m, int *n,
790                               int *k, float *a, int *lda, float *tau, float *
791                               c, int *ldc, float *work, int *lwork, int *info);
792
793 void
794     F77_FUNC(sormqr, SORMQR) (const char *side, const char *trans, int *m, int *n, int *k, float *a,
795                               int *lda, float *tau, float *c, int *ldc,
796                               float *work, int *lwork, int *info);
797
798 void
799     F77_FUNC(sorgbr, SORGBR) (const char *vect, int *m, int *n, int *k, float *a, int *lda,
800                               float *tau, float *work, int *lwork, int *info);
801
802 void
803     F77_FUNC(slasq5, SLASQ5) (int *i0, int *n0, float *z, int *pp, float *tau, float *dmin,
804                               float *dmin1, float *dmin2, float *dn, float *dnm1,
805                               float *dnm2, int *ieee);
806
807 void
808     F77_FUNC(slasd8, SLASD8) (int *icompq, int *k, float *d, float *z, float *vf, float *vl,
809                               float *difl, float *difr, int *lddifr, float *dsigma,
810                               float *work, int *info);
811
812 void
813     F77_FUNC(slascl, SLASCL) (const char *type, int *kl, int *ku, float *cfrom, float *cto, int *m,
814                               int *n, float *a, int *lda, int *info);
815
816 void
817     F77_FUNC(slarft, SLARFT) (const char *direct, const char *storev, int *n, int *k, float *v,
818                               int *ldv, float *tau, float *t, int *ldt);
819
820 void
821     F77_FUNC(slagts, SLAGTS) (int *job, int *n, float *a, float *b, float *c, float *d,
822                               int *in, float *y, float *tol, int *info);
823
824 void
825     F77_FUNC(sgesdd, SGESDD) (const char *jobz, int *m, int *n, float *a, int *lda, float *s, float *u,
826                               int *ldu, float *vt, int *ldvt, float *work, int *lwork,
827                               int *iwork, int *info);
828
829 void
830     F77_FUNC(ssytd2, SSYTD2) (const char *uplo, int *n, float *a, int *lda, float *d,
831                               float *e, float *tau, int *info);
832
833 void
834     F77_FUNC(sormlq, SORMLQ) (const char *side, const char *trans, int *m, int *n, int *k, float *a, int *lda,
835                               float *tau, float *c, int *ldc, float *work, int *lwork, int *info);
836
837 void
838     F77_FUNC(sorg2r, SORG2R) (int *m, int *n, int *k, float *a, int *lda, float *tau,
839                               float *work, int *info);
840
841 void
842     F77_FUNC(slasq4, SLASQ4) (int *i0, int *n0, float *z, int *pp, int *n0in, float *dmin,
843                               float *dmin1, float *dmin2, float *dn, float *dn1,
844                               float *dn2, float *tau, int *ttype);
845
846 void
847     F77_FUNC(slasd7, SLASD7) (int *icompq, int *nl, int *nr, int *sqre, int *k, float *d, float *z,
848                               float *zw, float *vf, float *vfw, float *vl, float *vlw,
849                               float *alpha, float *beta, float *dsigma, int *idx, int *idxp,
850                               int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol,
851                               float *givnum, int *ldgnum, float *c, float *s, int *info);
852
853 void
854     F77_FUNC(slas2, SLAS2) (float *f, float *g, float *h, float *ssmin, float *ssmax);
855
856 void
857     F77_FUNC(slarfg, SLARFG) (int *n, float *alpha, float *x, int *incx, float *tau);
858
859 void
860     F77_FUNC(slagtf, SLAGTF) (int *n, float *a, float *lambda, float *b, float *c,
861                               float *tol, float *d, int *in, int *info);
862
863 void
864     F77_FUNC(sgeqrf, SGEQRF) (int *m, int *n, float *a, int *lda, float *tau,
865                               float *work, int *lwork, int *info);
866
867
868 #ifdef __cplusplus
869 }
870 #endif
871
872 /*! \endcond */
873
874 #endif /* GMX_LAPACK_H */