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