File indexing completed on 2025-01-18 09:57:06
0001 namespace Eigen {
0002
0003 namespace internal {
0004
0005
0006
0007 template <typename Scalar>
0008 void r1mpyq(DenseIndex m, DenseIndex n, Scalar *a, const std::vector<JacobiRotation<Scalar> > &v_givens, const std::vector<JacobiRotation<Scalar> > &w_givens)
0009 {
0010 typedef DenseIndex Index;
0011
0012
0013 for (Index j = n-2; j>=0; --j)
0014 for (Index i = 0; i<m; ++i) {
0015 Scalar temp = v_givens[j].c() * a[i+m*j] - v_givens[j].s() * a[i+m*(n-1)];
0016 a[i+m*(n-1)] = v_givens[j].s() * a[i+m*j] + v_givens[j].c() * a[i+m*(n-1)];
0017 a[i+m*j] = temp;
0018 }
0019
0020 for (Index j = 0; j<n-1; ++j)
0021 for (Index i = 0; i<m; ++i) {
0022 Scalar temp = w_givens[j].c() * a[i+m*j] + w_givens[j].s() * a[i+m*(n-1)];
0023 a[i+m*(n-1)] = -w_givens[j].s() * a[i+m*j] + w_givens[j].c() * a[i+m*(n-1)];
0024 a[i+m*j] = temp;
0025 }
0026 }
0027
0028 }
0029
0030 }