1 #include "gmx_lapack.h"
4 F77_FUNC(dlasrt,DLASRT)(const char *id,
25 if (*id=='D' || *id=='d')
27 else if (*id=='I' || *id=='i')
47 start = stack[(stkpnt << 1) - 2];
48 endd = stack[(stkpnt << 1) - 1];
50 if (endd - start <= 20 && endd - start > 0) {
56 for (i__ = start + 1; i__ <= i__1; ++i__) {
58 for (j = i__; j >= i__2; --j) {
59 if (d__[j] > d__[j - 1]) {
74 for (i__ = start + 1; i__ <= i__1; ++i__) {
76 for (j = i__; j >= i__2; --j) {
77 if (d__[j] < d__[j - 1]) {
91 } else if (endd - start > 20) {
95 i__ = (start + endd) / 2;
100 } else if (d3 < d2) {
108 } else if (d3 < d1) {
122 if (d__[j] < dmnmx) {
127 if (d__[i__] > dmnmx) {
136 if (j - start > endd - j - 1) {
138 stack[(stkpnt << 1) - 2] = start;
139 stack[(stkpnt << 1) - 1] = j;
141 stack[(stkpnt << 1) - 2] = j + 1;
142 stack[(stkpnt << 1) - 1] = endd;
145 stack[(stkpnt << 1) - 2] = j + 1;
146 stack[(stkpnt << 1) - 1] = endd;
148 stack[(stkpnt << 1) - 2] = start;
149 stack[(stkpnt << 1) - 1] = j;
158 if (d__[j] > dmnmx) {
163 if (d__[i__] < dmnmx) {
172 if (j - start > endd - j - 1) {
174 stack[(stkpnt << 1) - 2] = start;
175 stack[(stkpnt << 1) - 1] = j;
177 stack[(stkpnt << 1) - 2] = j + 1;
178 stack[(stkpnt << 1) - 1] = endd;
181 stack[(stkpnt << 1) - 2] = j + 1;
182 stack[(stkpnt << 1) - 1] = endd;
184 stack[(stkpnt << 1) - 2] = start;
185 stack[(stkpnt << 1) - 1] = j;