1 #include "gmx_lapack.h"
2 #include "lapack_limits.h"
5 F77_FUNC(sormqr,SORMQR)(const char *side,
19 int a_dim1, a_offset, c_dim1, c_offset, i__1, i__2, i__4, i__5;
23 int i1, i2, i3, ib, ic, jc, nb, mi, ni, nq, nw, iws;
32 a_offset = 1 + a_dim1;
36 c_offset = 1 + c_dim1;
41 left = (*side=='L' || *side=='l');
42 notran = (*trans=='N' || *trans=='n');
43 lquery = *lwork == -1;
54 nb = DORMQR_BLOCKSIZE;
56 work[1] = (float) lwkopt;
65 if (*m == 0 || *n == 0 || *k == 0) {
72 if (nb > 1 && nb < *k) {
76 nbmin = DORMQR_MINBLOCKSIZE;
82 if (nb < nbmin || nb >= *k) {
84 F77_FUNC(sorm2r,SORM2R)(side, trans, m, n, k, &a[a_offset], lda, &tau[1], &c__[
85 c_offset], ldc, &work[1], &iinfo);
88 if ((left && !notran) || (!left && notran)) {
93 i1 = (*k - 1) / nb * nb + 1;
108 for (i__ = i1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) {
109 i__4 = nb, i__5 = *k - i__ + 1;
110 ib = (i__4<i__5) ? i__4 : i__5;
113 F77_FUNC(slarft,SLARFT)("Forward", "Columnwise", &i__4, &ib, &a[i__ + i__ *
114 a_dim1], lda, &tau[i__], t, &ldt);
124 F77_FUNC(slarfb,SLARFB)(side, trans, "Forward", "Columnwise", &mi, &ni, &ib, &a[
125 i__ + i__ * a_dim1], lda, t, &ldt, &c__[ic + jc *
126 c_dim1], ldc, &work[1], &ldwork);
129 work[1] = (float) lwkopt;