29 #ifndef SPARSELU_COPY_TO_UCOL_H 30 #define SPARSELU_COPY_TO_UCOL_H 49 template <
typename Scalar,
typename StorageIndex>
53 Index ksub, krep, ksupno;
55 Index jsupno = glu.supno(jcol);
58 Index k = nseg - 1, i;
59 StorageIndex nextu = glu.xusub(jcol);
60 Index kfnz, isub, segsize;
63 for (ksub = 0; ksub < nseg; ksub++)
65 krep = segrep(k); k--;
66 ksupno = glu.supno(krep);
67 if (jsupno != ksupno )
70 if (kfnz != emptyIdxLU)
72 fsupc = glu.xsup(ksupno);
73 isub = glu.xlsub(fsupc) + kfnz - fsupc;
74 segsize = krep - kfnz + 1;
75 new_next = nextu + segsize;
76 while (new_next > glu.nzumax)
78 mem = memXpand<ScalarVector>(glu.ucol, glu.nzumax, nextu, UCOL, glu.num_expansions);
80 mem = memXpand<IndexVector>(glu.usub, glu.nzumax, nextu, USUB, glu.num_expansions);
85 for (i = 0; i < segsize; i++)
87 irow = glu.lsub(isub);
88 glu.usub(nextu) = perm_r(irow);
89 glu.ucol(nextu) = dense(irow);
90 dense(irow) = Scalar(0.0);
100 glu.xusub(jcol + 1) = nextu;
107 #endif // SPARSELU_COPY_TO_UCOL_H Index copy_to_ucol(const Index jcol, const Index nseg, IndexVector &segrep, BlockIndexVector repfnz, IndexVector &perm_r, BlockScalarVector dense, GlobalLU_t &glu)
Performs numeric block updates (sup-col) in topological order.
Definition: SparseLU_copy_to_ucol.h:50
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:85
Definition: SparseLU_Structs.h:77
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:33
A matrix or vector expression mapping an existing expression.
Definition: Ref.h:190
Definition: BandTriangularSolver.h:13
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:178