8 template <
typename Scalar>
37 s.topLeftCorner(
n,
n).template triangularView<StrictlyLower>() = s.topLeftCorner(
n,
n).transpose();
40 for (
j = 0;
j <
n; ++
j) {
54 for (k =
j; k <
n; ++k) {
61 s(k,k) = givens.
c() * s(k,k) + givens.
s() * sdiag[k];
62 temp = givens.
c() * wa[k] + givens.
s() * qtbpj;
63 qtbpj = -givens.
s() * wa[k] + givens.
c() * qtbpj;
67 for (
i = k+1;
i<
n; ++
i) {
68 temp = givens.
c() * s(
i,k) + givens.
s() * sdiag[
i];
69 sdiag[
i] = -givens.
s() * s(
i,k) + givens.
c() * sdiag[
i];
78 for(nsing=0; nsing<
n && sdiag[nsing]!=0; nsing++) {}
81 s.topLeftCorner(nsing, nsing).transpose().template triangularView<Upper>().solveInPlace(wa.head(nsing));
88 for (
j = 0;
j <
n; ++
j)
x[ipvt[
j]] = wa[
j];
void makeGivens(const Scalar &p, const Scalar &q, Scalar *r=0)
EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Derived & setZero(Index rows, Index cols)
void qrsolv(Matrix< Scalar, Dynamic, Dynamic > &s, const VectorXi &ipvt, const Matrix< Scalar, Dynamic, 1 > &diag, const Matrix< Scalar, Dynamic, 1 > &qtb, Matrix< Scalar, Dynamic, 1 > &x, Matrix< Scalar, Dynamic, 1 > &sdiag)
: TensorContractionSycl.h, provides various tensor contraction kernel for SYCL backend
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
EIGEN_DEFAULT_DENSE_INDEX_TYPE DenseIndex