1 #include "gmx_lapack.h"
3 void F77_FUNC(dlasrt2,DLASRT2)(const char *id,
26 if (*id=='D' || *id=='d')
28 else if (*id=='I' || *id=='i')
49 start = stack[(stkpnt << 1) - 2];
50 endd = stack[(stkpnt << 1) - 1];
52 if (endd - start > 0) {
57 for (i__ = start + 1; i__ <= i__1; ++i__) {
59 for (j = i__; j >= i__2; --j) {
60 if (d__[j] > d__[j - 1]) {
76 for (i__ = start + 1; i__ <= i__1; ++i__) {
78 for (j = i__; j >= i__2; --j) {
79 if (d__[j] < d__[j - 1]) {
94 } else if (endd - start > 20) {
98 i__ = (start + endd) / 2;
103 } else if (d3 < d2) {
111 } else if (d3 < d1) {
125 if (d__[j] < dmnmx) {
130 if (d__[i__] > dmnmx) {
142 if (j - start > endd - j - 1) {
144 stack[(stkpnt << 1) - 2] = start;
145 stack[(stkpnt << 1) - 1] = j;
147 stack[(stkpnt << 1) - 2] = j + 1;
148 stack[(stkpnt << 1) - 1] = endd;
151 stack[(stkpnt << 1) - 2] = j + 1;
152 stack[(stkpnt << 1) - 1] = endd;
154 stack[(stkpnt << 1) - 2] = start;
155 stack[(stkpnt << 1) - 1] = j;
164 if (d__[j] > dmnmx) {
169 if (d__[i__] < dmnmx) {
181 if (j - start > endd - j - 1) {
183 stack[(stkpnt << 1) - 2] = start;
184 stack[(stkpnt << 1) - 1] = j;
186 stack[(stkpnt << 1) - 2] = j + 1;
187 stack[(stkpnt << 1) - 1] = endd;
190 stack[(stkpnt << 1) - 2] = j + 1;
191 stack[(stkpnt << 1) - 1] = endd;
193 stack[(stkpnt << 1) - 2] = start;
194 stack[(stkpnt << 1) - 1] = j;