31 #ifndef SPARSELU_COLUMN_BMOD_H
32 #define SPARSELU_COLUMN_BMOD_H
55 template <
typename Scalar,
typename StorageIndex>
59 Index jsupno,
k, ksub, krep, ksupno;
60 Index lptr, nrow, isub, irow, nextlu, new_next, ufirst;
61 Index fsupc, nsupc, nsupr, luptr, kfnz, no_zeros;
71 jsupno = glu.
supno(jcol);
78 for (ksub = 0; ksub < nseg; ksub++) {
81 ksupno = glu.
supno(krep);
82 if (jsupno != ksupno) {
84 fsupc = glu.
xsup(ksupno);
85 fst_col = (
std::max)(fsupc, fpanelc);
89 d_fsupc = fst_col - fsupc;
91 luptr = glu.
xlusup(fst_col) + d_fsupc;
92 lptr = glu.
xlsub(fsupc) + d_fsupc;
97 segsize = krep - kfnz + 1;
98 nsupc = krep - fst_col + 1;
99 nsupr = glu.
xlsub(fsupc + 1) - glu.
xlsub(fsupc);
100 nrow = nsupr - d_fsupc - nsupc;
105 no_zeros = kfnz - fst_col;
114 nextlu = glu.
xlusup(jcol);
115 fsupc = glu.
xsup(jsupno);
119 new_next = nextlu + glu.
xlsub(fsupc + 1) - glu.
xlsub(fsupc);
121 if (offset) new_next += offset;
122 while (new_next > glu.
nzlumax) {
127 for (isub = glu.
xlsub(fsupc); isub < glu.
xlsub(fsupc + 1); isub++) {
128 irow = glu.
lsub(isub);
129 glu.
lusup(nextlu) = dense(irow);
130 dense(irow) =
Scalar(0.0);
135 glu.
lusup.segment(nextlu, offset).setZero();
138 glu.
xlusup(jcol + 1) = StorageIndex(nextlu);
146 fst_col = (
std::max)(fsupc, fpanelc);
148 if (fst_col < jcol) {
151 d_fsupc = fst_col - fsupc;
153 lptr = glu.
xlsub(fsupc) + d_fsupc;
154 luptr = glu.
xlusup(fst_col) + d_fsupc;
155 nsupr = glu.
xlsub(fsupc + 1) - glu.
xlsub(fsupc);
156 nsupc = jcol - fst_col;
157 nrow = nsupr - d_fsupc - nsupc;
160 ufirst = glu.
xlusup(jcol) + d_fsupc;
162 MappedMatrixBlock
A(&(glu.
lusup.data()[luptr]), nsupc, nsupc, OuterStride<>(
lda));
163 VectorBlock<ScalarVector> u(glu.
lusup, ufirst, nsupc);
164 u =
A.template triangularView<UnitLower>().solve(u);
166 new (&
A) MappedMatrixBlock(&(glu.
lusup.data()[luptr + nsupc]), nrow, nsupc, OuterStride<>(
lda));
167 VectorBlock<ScalarVector> l(glu.
lusup, ufirst + nsupc, nrow);
168 l.noalias() -=
A * u;
SCALAR Scalar
Definition: bench_gemm.cpp:45
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
Definition: bench_gemm.cpp:47
A matrix or vector expression mapping an existing expression.
Definition: Ref.h:264
Index column_bmod(const Index jcol, const Index nseg, BlockScalarVector dense, ScalarVector &tempv, BlockIndexVector segrep, BlockIndexVector repfnz, Index fpanelc, GlobalLU_t &glu)
Performs numeric block updates (sup-col) in topological order.
Definition: SparseLU_column_bmod.h:56
#define max(a, b)
Definition: datatypes.h:23
const char const int const RealScalar const RealScalar const int * lda
Definition: level2_cplx_impl.h:20
char char char int int * k
Definition: level2_impl.h:374
@ LUSUP
Definition: SparseLU_Structs.h:77
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
Definition: Eigen_Colamd.h:49
Definition: SparseLU_Structs.h:80
IndexVector xsup
Definition: SparseLU_Structs.h:82
Index num_expansions
Definition: SparseLU_Structs.h:95
IndexVector xlusup
Definition: SparseLU_Structs.h:86
IndexVector supno
Definition: SparseLU_Structs.h:83
IndexVector lsub
Definition: SparseLU_Structs.h:85
Index nzlumax
Definition: SparseLU_Structs.h:89
IndexVector xlsub
Definition: SparseLU_Structs.h:87
ScalarVector lusup
Definition: SparseLU_Structs.h:84
static EIGEN_DONT_INLINE void run(const Index segsize, BlockScalarVector &dense, ScalarVector &tempv, ScalarVector &lusup, Index &luptr, const Index lda, const Index nrow, IndexVector &lsub, const Index lptr, const Index no_zeros)
Performs numeric block updates from a given supernode to a single column.
Definition: SparseLU_kernel_bmod.h:43
Definition: GenericPacketMath.h:108