30#ifndef SPARSELU_PANEL_DFS_H
31#define SPARSELU_PANEL_DFS_H
37template<
typename IndexVector>
60template <
typename Scalar,
typename StorageIndex>
61template <
typename Traits>
70 StorageIndex kmark = marker(krow);
74 StorageIndex kperm = perm_r(krow);
77 panel_lsub(nextl_col++) = StorageIndex(krow);
79 traits.mem_expand(panel_lsub, nextl_col, kmark);
86 StorageIndex krep = glu.
xsup(glu.
supno(kperm)+1) - 1;
88 StorageIndex myfnz = repfnz_col(krep);
93 if (myfnz > kperm ) repfnz_col(krep) = kperm;
100 parent(krep) = oldrep;
101 repfnz_col(krep) = kperm;
102 StorageIndex xdfs = glu.
xlsub(krep);
103 Index maxdfs = xprune(krep);
109 while (xdfs < maxdfs)
111 StorageIndex kchild = glu.
lsub(xdfs);
113 StorageIndex chmark = marker(kchild);
118 StorageIndex chperm = perm_r(kchild);
123 panel_lsub(nextl_col++) = kchild;
124 traits.mem_expand(panel_lsub, nextl_col, chmark);
131 StorageIndex chrep = glu.
xsup(glu.
supno(chperm)+1) - 1;
132 myfnz = repfnz_col(chrep);
137 repfnz_col(chrep) = chperm;
144 parent(krep) = oldrep;
145 repfnz_col(krep) = chperm;
146 xdfs = glu.
xlsub(krep);
147 maxdfs = xprune(krep);
160 if(
traits.update_segrep(krep,jj))
173 maxdfs = xprune(krep);
218template <
typename Scalar,
typename StorageIndex>
219void SparseLUImpl<Scalar,StorageIndex>::panel_dfs(
const Index m,
const Index w,
const Index jcol,
MatrixType& A,
IndexVector& perm_r,
Index& nseg,
ScalarVector& dense,
IndexVector& panel_lsub,
IndexVector& segrep,
IndexVector& repfnz,
IndexVector& xprune,
IndexVector& marker,
IndexVector& parent,
IndexVector& xplore,
GlobalLU_t& glu)
230 for (StorageIndex jj = StorageIndex(jcol); jj < jcol + w; jj++)
232 nextl_col = (jj - jcol) * m;
241 Index krow = it.row();
242 dense_col(krow) = it.value();
244 StorageIndex kmark = marker(krow);
248 dfs_kernel(jj, perm_r, nseg, panel_lsub, segrep, repfnz_col, xprune, marker, parent,
249 xplore, glu, nextl_col, krow,
traits);
A matrix or vector expression mapping an existing expression.
Definition: Ref.h:283
Definition: SparseCompressedBase.h:159
Expression of a fixed-size or dynamic-size sub-vector.
Definition: VectorBlock.h:60
void panel_dfs(const Index m, const Index w, const Index jcol, MatrixType &A, IndexVector &perm_r, Index &nseg, ScalarVector &dense, IndexVector &panel_lsub, IndexVector &segrep, IndexVector &repfnz, IndexVector &xprune, IndexVector &marker, IndexVector &parent, IndexVector &xplore, GlobalLU_t &glu)
Performs a symbolic factorization on a panel of columns [jcol, jcol+w)
Definition: SparseLU_panel_dfs.h:219
void dfs_kernel(const StorageIndex jj, IndexVector &perm_r, Index &nseg, IndexVector &panel_lsub, IndexVector &segrep, Ref< IndexVector > repfnz_col, IndexVector &xprune, Ref< IndexVector > marker, IndexVector &parent, IndexVector &xplore, GlobalLU_t &glu, Index &nextl_col, Index krow, Traits &traits)
Definition: SparseLU_panel_dfs.h:62
@ emptyIdxLU
Definition: SparseLU_Memory.h:38
Namespace containing all symbols from the Eigen library.
Definition: Core:141
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
Definition: Eigen_Colamd.h:50
Definition: SparseLU_Structs.h:77
IndexVector xsup
Definition: SparseLU_Structs.h:79
IndexVector supno
Definition: SparseLU_Structs.h:80
IndexVector lsub
Definition: SparseLU_Structs.h:82
IndexVector xlsub
Definition: SparseLU_Structs.h:84
Definition: SparseLU_panel_dfs.h:39
bool update_segrep(Index krep, StorageIndex jj)
Definition: SparseLU_panel_dfs.h:44
@ ExpandMem
Definition: SparseLU_panel_dfs.h:54
panel_dfs_traits(Index jcol, StorageIndex *marker)
Definition: SparseLU_panel_dfs.h:41
void mem_expand(IndexVector &, Index, Index)
Definition: SparseLU_panel_dfs.h:53
StorageIndex * m_marker
Definition: SparseLU_panel_dfs.h:56
IndexVector::Scalar StorageIndex
Definition: SparseLU_panel_dfs.h:40
Index m_jcol
Definition: SparseLU_panel_dfs.h:55
Definition: ForwardDeclarations.h:17