1 #include "gmx_lapack.h"
2 #include "lapack_limits.h"
6 F77_FUNC(dormlq,DORMLQ)(const char *side,
20 int a_dim1, a_offset, c_dim1, c_offset, i__1, i__2, i__4,
25 double t[4160] /* was [65][64] */;
26 int i1, i2, i3, ib, ic, jc, nb, mi, ni, nq, nw, iws;
37 a_offset = 1 + a_dim1;
41 c_offset = 1 + c_dim1;
48 left = (*side=='L' || *side=='l');
49 notran = (*trans=='N' || *trans=='n');
50 lquery = *lwork == -1;
60 nb = DORMLQ_BLOCKSIZE;
62 work[1] = (double) lwkopt;
71 if (*m == 0 || *n == 0 || *k == 0) {
78 if (nb > 1 && nb < *k) {
82 nbmin = DORMLQ_MINBLOCKSIZE;
88 if (nb < nbmin || nb >= *k) {
91 F77_FUNC(dorml2,DORML2)(side, trans, m, n, k, &a[a_offset], lda, &tau[1], &c__[
92 c_offset], ldc, &work[1], &iinfo);
95 if ((left && notran) || (!left && !notran)) {
100 i1 = (*k - 1) / nb * nb + 1;
114 *(unsigned char *)transt = 'T';
116 *(unsigned char *)transt = 'N';
121 for (i__ = i1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) {
122 i__4 = nb, i__5 = *k - i__ + 1;
123 ib = (i__4<i__5) ? i__4 : i__5;
126 F77_FUNC(dlarft,DLARFT)("Forward", "Rowwise", &i__4, &ib, &a[i__ + i__ * a_dim1],
127 lda, &tau[i__], t, &ldt);
138 F77_FUNC(dlarfb,DLARFB)(side, transt, "Forward", "Rowwise", &mi, &ni, &ib, &a[i__
139 + i__ * a_dim1], lda, t, &ldt, &c__[ic + jc * c_dim1],
140 ldc, &work[1], &ldwork);
143 work[1] = (double) lwkopt;