9 #ifndef SPARSELU_IMPL_H 10 #define SPARSELU_IMPL_H 19 template <
typename Scalar,
typename StorageIndex>
34 template <
typename VectorType>
37 template <
typename VectorType>
39 void heap_relax_snode (
const Index n, IndexVector& et,
const Index relax_columns, IndexVector& descendants, IndexVector& relax_end);
40 void relax_snode (
const Index n, IndexVector& et,
const Index relax_columns, IndexVector& descendants, IndexVector& relax_end);
41 Index snode_dfs(
const Index jcol,
const Index kcol,
const MatrixType&
mat, IndexVector& xprune, IndexVector& marker, GlobalLU_t& glu);
43 Index pivotL(
const Index jcol,
const RealScalar& diagpivotthresh, IndexVector& perm_r, IndexVector& iperm_c,
Index& pivrow, GlobalLU_t& glu);
44 template <
typename Traits>
45 void dfs_kernel(
const StorageIndex jj, IndexVector& perm_r,
46 Index& nseg, IndexVector& panel_lsub, IndexVector& segrep,
48 IndexVector& xplore, GlobalLU_t& glu,
Index& nextl_col,
Index krow, Traits&
traits);
49 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);
51 void panel_bmod(
const Index m,
const Index w,
const Index jcol,
const Index nseg, ScalarVector& dense, ScalarVector& tempv, IndexVector& segrep, IndexVector& repfnz, GlobalLU_t& glu);
52 Index column_dfs(
const Index m,
const Index jcol, IndexVector& perm_r,
Index maxsuper,
Index& nseg, BlockIndexVector lsub_col, IndexVector& segrep, BlockIndexVector repfnz, IndexVector& xprune, IndexVector& marker, IndexVector& parent, IndexVector& xplore, GlobalLU_t& glu);
53 Index column_bmod(
const Index jcol,
const Index nseg, BlockScalarVector dense, ScalarVector& tempv, BlockIndexVector segrep, BlockIndexVector repfnz,
Index fpanelc, GlobalLU_t& glu);
54 Index copy_to_ucol(
const Index jcol,
const Index nseg, IndexVector& segrep, BlockIndexVector repfnz ,IndexVector& perm_r, BlockScalarVector dense, GlobalLU_t& glu);
55 void pruneL(
const Index jcol,
const IndexVector& perm_r,
const Index pivrow,
const Index nseg,
const IndexVector& segrep, BlockIndexVector repfnz, IndexVector& xprune, GlobalLU_t& glu);
57 void fixupL(
const Index n,
const IndexVector& perm_r, GlobalLU_t& glu);
59 template<
typename ,
typename >
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.
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.
Ref< Matrix< Scalar, Dynamic, 1 > > BlockScalarVector
A matrix or vector expression mapping an existing array of data.
Index snode_dfs(const Index jcol, const Index kcol, const MatrixType &mat, IndexVector &xprune, IndexVector &marker, GlobalLU_t &glu)
void relax_snode(const Index n, IndexVector &et, const Index relax_columns, IndexVector &descendants, IndexVector &relax_end)
Identify the initial relaxed supernodes.
void pruneL(const Index jcol, const IndexVector &perm_r, const Index pivrow, const Index nseg, const IndexVector &segrep, BlockIndexVector repfnz, IndexVector &xprune, GlobalLU_t &glu)
Prunes the L-structure.
SparseMatrix< Scalar, ColMajor, StorageIndex > MatrixType
Namespace containing all symbols from the Eigen library.
void heap_relax_snode(const Index n, IndexVector &et, const Index relax_columns, IndexVector &descendants, IndexVector &relax_end)
Identify the initial relaxed supernodes.
void fixupL(const Index n, const IndexVector &perm_r, GlobalLU_t &glu)
Fix up the data storage lsub for L-subscripts.
LU_GlobalLU_t< IndexVector, ScalarVector > GlobalLU_t
void countnz(const Index n, Index &nnzL, Index &nnzU, GlobalLU_t &glu)
Count Nonzero elements in the factors.
void panel_bmod(const Index m, const Index w, const Index jcol, const Index nseg, ScalarVector &dense, ScalarVector &tempv, IndexVector &segrep, IndexVector &repfnz, GlobalLU_t &glu)
Performs numeric block updates (sup-panel) in topological order.
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)
Matrix< StorageIndex, Dynamic, 1 > IndexVector
Matrix< Scalar, Dynamic, 1 > ScalarVector
Ref< Matrix< StorageIndex, Dynamic, 1 > > BlockIndexVector
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Index pivotL(const Index jcol, const RealScalar &diagpivotthresh, IndexVector &perm_r, IndexVector &iperm_c, Index &pivrow, GlobalLU_t &glu)
Performs the numerical pivotin on the current column of L, and the CDIV operation.
Index column_dfs(const Index m, const Index jcol, IndexVector &perm_r, Index maxsuper, Index &nseg, BlockIndexVector lsub_col, IndexVector &segrep, BlockIndexVector repfnz, IndexVector &xprune, IndexVector &marker, IndexVector &parent, IndexVector &xplore, GlobalLU_t &glu)
Performs a symbolic factorization on column jcol and decide the supernode boundary.
Index memXpand(VectorType &vec, Index &maxlen, Index nbElts, MemType memtype, Index &num_expansions)
Expand the existing storage.
A matrix or vector expression mapping an existing expression.
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)
Index memInit(Index m, Index n, Index annz, Index lwork, Index fillratio, Index panel_size, GlobalLU_t &glu)
Allocate various working space for the numerical factorization phase.
Matrix< Scalar, Dynamic, Dynamic, ColMajor > ScalarMatrix
ScalarVector::RealScalar RealScalar
NumTraits< Scalar >::Real RealScalar
Index snode_bmod(const Index jcol, const Index fsupc, ScalarVector &dense, GlobalLU_t &glu)
Index expand(VectorType &vec, Index &length, Index nbElts, Index keep_prev, Index &num_expansions)
Map< ScalarMatrix, 0, OuterStride<> > MappedMatrixBlock