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