29#ifndef SPARSELU_COPY_TO_UCOL_H
30#define SPARSELU_COPY_TO_UCOL_H
33#include "./InternalHeaderCheck.h"
52template <
typename Scalar,
typename StorageIndex>
53Index SparseLUImpl<Scalar, StorageIndex>::copy_to_ucol(
const Index jcol,
const Index nseg, IndexVector& segrep,
54 BlockIndexVector repfnz, IndexVector& perm_r,
55 BlockScalarVector dense, GlobalLU_t& glu) {
56 Index ksub, krep, ksupno;
58 Index jsupno = glu.supno(jcol);
61 Index k = nseg - 1, i;
62 StorageIndex nextu = glu.xusub(jcol);
63 Index kfnz, isub, segsize;
66 for (ksub = 0; ksub < nseg; ksub++) {
69 ksupno = glu.supno(krep);
73 if (kfnz != emptyIdxLU) {
74 fsupc = glu.xsup(ksupno);
75 isub = glu.xlsub(fsupc) + kfnz - fsupc;
76 segsize = krep - kfnz + 1;
77 new_next = nextu + segsize;
78 while (new_next > glu.nzumax) {
79 mem = memXpand<ScalarVector>(glu.ucol, glu.nzumax, nextu, UCOL, glu.num_expansions);
81 mem = memXpand<IndexVector>(glu.usub, glu.nzumax, nextu, USUB, glu.num_expansions);
85 for (i = 0; i < segsize; i++) {
86 irow = glu.lsub(isub);
87 glu.usub(nextu) = perm_r(irow);
88 glu.ucol(nextu) = dense(irow);
89 dense(irow) = Scalar(0.0);
99 glu.xusub(jcol + 1) = nextu;
Namespace containing all symbols from the Eigen library.
Definition Core:137