29 #ifndef SPARSELU_COPY_TO_UCOL_H
30 #define SPARSELU_COPY_TO_UCOL_H
51 template <
typename Scalar,
typename StorageIndex>
53 BlockIndexVector repfnz ,IndexVector& perm_r, BlockScalarVector dense, GlobalLU_t& glu)
55 Index ksub, krep, ksupno;
57 Index jsupno = glu.supno(jcol);
61 StorageIndex nextu = glu.xusub(jcol);
62 Index kfnz, isub, segsize;
65 for (ksub = 0; ksub < nseg; ksub++)
67 krep = segrep(k); k--;
68 ksupno = glu.supno(krep);
69 if (jsupno != ksupno )
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)
80 mem = memXpand<ScalarVector>(glu.ucol, glu.nzumax, nextu,
UCOL, glu.num_expansions);
82 mem = memXpand<IndexVector>(glu.usub, glu.nzumax, nextu,
USUB, glu.num_expansions);
87 for (
i = 0;
i < segsize;
i++)
89 irow = glu.lsub(isub);
90 glu.usub(nextu) = perm_r(irow);
91 glu.ucol(nextu) = dense(irow);
92 dense(irow) = Scalar(0.0);
102 glu.xusub(jcol + 1) = nextu;
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.