30 #ifndef SPARSELU_PANEL_DFS_H
31 #define SPARSELU_PANEL_DFS_H
40 template <
typename IndexVector>
57 template <
typename Scalar,
typename StorageIndex>
58 template <
typename Traits>
64 StorageIndex kmark = marker(krow);
68 StorageIndex kperm = perm_r(krow);
71 panel_lsub(nextl_col++) = StorageIndex(krow);
73 traits.mem_expand(panel_lsub, nextl_col, kmark);
78 StorageIndex krep = glu.
xsup(glu.
supno(kperm) + 1) - 1;
80 StorageIndex myfnz = repfnz_col(krep);
84 if (myfnz > kperm) repfnz_col(krep) = kperm;
89 parent(krep) = oldrep;
90 repfnz_col(krep) = kperm;
91 StorageIndex xdfs = glu.
xlsub(krep);
92 Index maxdfs = xprune(krep);
97 while (xdfs < maxdfs) {
98 StorageIndex kchild = glu.
lsub(xdfs);
100 StorageIndex chmark = marker(kchild);
104 StorageIndex chperm = perm_r(kchild);
108 panel_lsub(nextl_col++) = kchild;
109 traits.mem_expand(panel_lsub, nextl_col, chmark);
114 StorageIndex chrep = glu.
xsup(glu.
supno(chperm) + 1) - 1;
115 myfnz = repfnz_col(chrep);
118 if (myfnz > chperm) repfnz_col(chrep) = chperm;
123 parent(krep) = oldrep;
124 repfnz_col(krep) = chperm;
125 xdfs = glu.
xlsub(krep);
126 maxdfs = xprune(krep);
139 if (
traits.update_segrep(krep, jj))
151 maxdfs = xprune(krep);
196 template <
typename Scalar,
typename StorageIndex>
211 for (StorageIndex jj = StorageIndex(jcol); jj < jcol +
w; jj++) {
212 nextl_col = (jj - jcol) *
m;
219 Index krow = it.row();
220 dense_col(krow) = it.value();
222 StorageIndex kmark = marker(krow);
223 if (kmark == jj)
continue;
225 dfs_kernel(jj, perm_r, nseg, panel_lsub, segrep, repfnz_col, xprune, marker, parent, xplore, glu, nextl_col, krow,
RowVector3d w
Definition: Matrix_resize_int.cpp:3
SCALAR Scalar
Definition: bench_gemm.cpp:45
The matrix class, also used for vectors and row-vectors.
Definition: Eigen/Eigen/src/Core/Matrix.h:186
A matrix or vector expression mapping an existing expression.
Definition: Ref.h:264
Base::InnerIterator InnerIterator
Definition: SparseMatrix.h:138
Expression of a fixed-size or dynamic-size sub-vector.
Definition: VectorBlock.h:58
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:197
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:59
int * m
Definition: level2_cplx_impl.h:294
@ emptyIdxLU
Definition: SparseLU_Memory.h:41
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
IndexVector supno
Definition: SparseLU_Structs.h:83
IndexVector lsub
Definition: SparseLU_Structs.h:85
IndexVector xlsub
Definition: SparseLU_Structs.h:87
Definition: SparseLU_panel_dfs.h:41
bool update_segrep(Index krep, StorageIndex jj)
Definition: SparseLU_panel_dfs.h:44
panel_dfs_traits(Index jcol, StorageIndex *marker)
Definition: SparseLU_panel_dfs.h:43
@ ExpandMem
Definition: SparseLU_panel_dfs.h:52
void mem_expand(IndexVector &, Index, Index)
Definition: SparseLU_panel_dfs.h:51
StorageIndex * m_marker
Definition: SparseLU_panel_dfs.h:54
IndexVector::Scalar StorageIndex
Definition: SparseLU_panel_dfs.h:42
Index m_jcol
Definition: SparseLU_panel_dfs.h:53
Definition: ForwardDeclarations.h:21