2 * This file is part of the GROMACS molecular simulation package.
4 * Copyright (c) 2012, by the GROMACS development team, led by
5 * David van der Spoel, Berk Hess, Erik Lindahl, and including many
6 * others, as listed in the AUTHORS file in the top-level source
7 * directory and at http://www.gromacs.org.
9 * GROMACS is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public License
11 * as published by the Free Software Foundation; either version 2.1
12 * of the License, or (at your option) any later version.
14 * GROMACS is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with GROMACS; if not, see
21 * http://www.gnu.org/licenses, or write to the Free Software Foundation,
22 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 * If you want to redistribute modifications to GROMACS, please
25 * consider that scientific software is very special. Version
26 * control is crucial - bugs must be traceable. We will be happy to
27 * consider code for inclusion in the official distribution, but
28 * derived work must not be called official GROMACS. Details are found
29 * in the README & COPYING files - if they are missing, get the
30 * official version at http://www.gromacs.org.
32 * To help us fund GROMACS development, we humbly ask that you cite
33 * the research papers on the package. Check out http://www.gromacs.org.
37 #include "gmx_lapack.h"
40 F77_FUNC(slasd6,SLASD6)(int *icompq,
67 int givcol_dim1, givcol_offset, givnum_dim1, givnum_offset,
68 poles_dim1, poles_offset, i__1;
71 int i__, m, n, n1, n2, iw, idx, idxc, idxp, ivfw, ivlw;
84 givcol_dim1 = *ldgcol;
85 givcol_offset = 1 + givcol_dim1;
86 givcol -= givcol_offset;
88 poles_offset = 1 + poles_dim1;
89 poles -= poles_offset;
90 givnum_dim1 = *ldgnum;
91 givnum_offset = 1 + givnum_dim1;
92 givnum -= givnum_offset;
114 orgnrm = (d__1 > d__2) ? d__1 : d__2;
117 for (i__ = 1; i__ <= i__1; ++i__) {
118 d__1 = fabs(d__[i__]);
122 F77_FUNC(slascl,SLASCL)("G", &c__0, &c__0, &orgnrm, &one, &n, &c__1, &d__[1], &n, info);
126 F77_FUNC(slasd7,SLASD7)(icompq, nl, nr, sqre, k, &d__[1], &z__[1], &work[iw], &vf[1], &
127 work[ivfw], &vl[1], &work[ivlw], alpha, beta, &work[isigma], &
128 iwork[idx], &iwork[idxp], &idxq[1], &perm[1], givptr, &givcol[
129 givcol_offset], ldgcol, &givnum[givnum_offset], ldgnum, c__, s,
132 F77_FUNC(slasd8,SLASD8)(icompq, k, &d__[1], &z__[1], &vf[1], &vl[1], &difl[1], &difr[1],
133 ldgnum, &work[isigma], &work[iw], info);
136 F77_FUNC(scopy,SCOPY)(k, &d__[1], &c__1, &poles[poles_dim1 + 1], &c__1);
137 F77_FUNC(scopy,SCOPY)(k, &work[isigma], &c__1, &poles[(poles_dim1 << 1) + 1], &c__1);
140 F77_FUNC(slascl,SLASCL)("G", &c__0, &c__0, &one, &orgnrm, &n, &c__1, &d__[1], &n, info);
144 F77_FUNC(slamrg,SLAMRG)(&n1, &n2, &d__[1], &c__1, &c_n1, &idxq[1]);