gtsam
3rdparty
Eigen
Eigen
src
SparseLU
SparseLU_Structs.h
Go to the documentation of this file.
1
// This file is part of Eigen, a lightweight C++ template library
2
// for linear algebra.
3
//
4
// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>
5
//
6
// This Source Code Form is subject to the terms of the Mozilla
7
// Public License v. 2.0. If a copy of the MPL was not distributed
8
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
10
/*
11
* NOTE: This file comes from a partly modified version of files slu_[s,d,c,z]defs.h
12
* -- SuperLU routine (version 4.1) --
13
* Univ. of California Berkeley, Xerox Palo Alto Research Center,
14
* and Lawrence Berkeley National Lab.
15
* November, 2010
16
*
17
* Global data structures used in LU factorization -
18
*
19
* nsuper: #supernodes = nsuper + 1, numbered [0, nsuper].
20
* (xsup,supno): supno[i] is the supernode no to which i belongs;
21
* xsup(s) points to the beginning of the s-th supernode.
22
* e.g. supno 0 1 2 2 3 3 3 4 4 4 4 4 (n=12)
23
* xsup 0 1 2 4 7 12
24
* Note: dfs will be performed on supernode rep. relative to the new
25
* row pivoting ordering
26
*
27
* (xlsub,lsub): lsub[*] contains the compressed subscript of
28
* rectangular supernodes; xlsub[j] points to the starting
29
* location of the j-th column in lsub[*]. Note that xlsub
30
* is indexed by column.
31
* Storage: original row subscripts
32
*
33
* During the course of sparse LU factorization, we also use
34
* (xlsub,lsub) for the purpose of symmetric pruning. For each
35
* supernode {s,s+1,...,t=s+r} with first column s and last
36
* column t, the subscript set
37
* lsub[j], j=xlsub[s], .., xlsub[s+1]-1
38
* is the structure of column s (i.e. structure of this supernode).
39
* It is used for the storage of numerical values.
40
* Furthermore,
41
* lsub[j], j=xlsub[t], .., xlsub[t+1]-1
42
* is the structure of the last column t of this supernode.
43
* It is for the purpose of symmetric pruning. Therefore, the
44
* structural subscripts can be rearranged without making physical
45
* interchanges among the numerical values.
46
*
47
* However, if the supernode has only one column, then we
48
* only keep one set of subscripts. For any subscript interchange
49
* performed, similar interchange must be done on the numerical
50
* values.
51
*
52
* The last column structures (for pruning) will be removed
53
* after the numercial LU factorization phase.
54
*
55
* (xlusup,lusup): lusup[*] contains the numerical values of the
56
* rectangular supernodes; xlusup[j] points to the starting
57
* location of the j-th column in storage vector lusup[*]
58
* Note: xlusup is indexed by column.
59
* Each rectangular supernode is stored by column-major
60
* scheme, consistent with Fortran 2-dim array storage.
61
*
62
* (xusub,ucol,usub): ucol[*] stores the numerical values of
63
* U-columns outside the rectangular supernodes. The row
64
* subscript of nonzero ucol[k] is stored in usub[k].
65
* xusub[i] points to the starting location of column i in ucol.
66
* Storage: new row subscripts; that is subscripts of PA.
67
*/
68
69
#ifndef EIGEN_LU_STRUCTS
70
#define EIGEN_LU_STRUCTS
71
namespace
Eigen
{
72
namespace
internal
{
73
74
typedef
enum
{
LUSUP
,
UCOL
,
LSUB
,
USUB
,
LLVL
,
ULVL
}
MemType
;
75
76
template
<
typename
IndexVector,
typename
ScalarVector>
77
struct
LU_GlobalLU_t
{
78
typedef
typename
IndexVector::Scalar
StorageIndex
;
79
IndexVector
xsup
;
//First supernode column ... xsup(s) points to the beginning of the s-th supernode
80
IndexVector
supno
;
// Supernode number corresponding to this column (column to supernode mapping)
81
ScalarVector
lusup
;
// nonzero values of L ordered by columns
82
IndexVector
lsub
;
// Compressed row indices of L rectangular supernodes.
83
IndexVector
xlusup
;
// pointers to the beginning of each column in lusup
84
IndexVector
xlsub
;
// pointers to the beginning of each column in lsub
85
Index
nzlmax
;
// Current max size of lsub
86
Index
nzlumax
;
// Current max size of lusup
87
ScalarVector
ucol
;
// nonzero values of U ordered by columns
88
IndexVector
usub
;
// row indices of U columns in ucol
89
IndexVector
xusub
;
// Pointers to the beginning of each column of U in ucol
90
Index
nzumax
;
// Current max size of ucol
91
Index
n
;
// Number of columns in the matrix
92
Index
num_expansions
;
93
};
94
95
// Values to set for performance
96
struct
perfvalues
{
97
Index
panel_size
;
// a panel consists of at most <panel_size> consecutive columns
98
Index
relax
;
// To control degree of relaxing supernodes. If the number of nodes (columns)
99
// in a subtree of the elimination tree is less than relax, this subtree is considered
100
// as one supernode regardless of the row structures of those columns
101
Index
maxsuper
;
// The maximum size for a supernode in complete LU
102
Index
rowblk
;
// The minimum row dimension for 2-D blocking to be used;
103
Index
colblk
;
// The minimum column dimension for 2-D blocking to be used;
104
Index
fillfactor
;
// The estimated fills factors for L and U, compared with A
105
};
106
107
}
// end namespace internal
108
109
}
// end namespace Eigen
110
#endif // EIGEN_LU_STRUCTS
Scalar
SCALAR Scalar
Definition:
bench_gemm.cpp:46
Eigen::internal::LU_GlobalLU_t::StorageIndex
IndexVector::Scalar StorageIndex
Definition:
SparseLU_Structs.h:78
Eigen::internal::LU_GlobalLU_t::num_expansions
Index num_expansions
Definition:
SparseLU_Structs.h:92
Eigen::internal::perfvalues::colblk
Index colblk
Definition:
SparseLU_Structs.h:103
Eigen::internal::perfvalues::rowblk
Index rowblk
Definition:
SparseLU_Structs.h:102
Eigen::internal::LU_GlobalLU_t::xsup
IndexVector xsup
Definition:
SparseLU_Structs.h:79
Eigen::internal::LU_GlobalLU_t::xlusup
IndexVector xlusup
Definition:
SparseLU_Structs.h:83
Eigen::internal::LU_GlobalLU_t::lusup
ScalarVector lusup
Definition:
SparseLU_Structs.h:81
Eigen
Namespace containing all symbols from the Eigen library.
Definition:
jet.h:637
Eigen::internal::MemType
MemType
Definition:
SparseLU_Structs.h:74
Eigen::internal::LUSUP
Definition:
SparseLU_Structs.h:74
Eigen::internal::LU_GlobalLU_t::usub
IndexVector usub
Definition:
SparseLU_Structs.h:88
Eigen::internal::LU_GlobalLU_t::n
Index n
Definition:
SparseLU_Structs.h:91
Eigen::internal::LU_GlobalLU_t::nzlmax
Index nzlmax
Definition:
SparseLU_Structs.h:85
Eigen::internal::perfvalues::relax
Index relax
Definition:
SparseLU_Structs.h:98
Eigen::internal::LU_GlobalLU_t
Definition:
SparseLU_Structs.h:77
Eigen::internal::LU_GlobalLU_t::nzumax
Index nzumax
Definition:
SparseLU_Structs.h:90
Eigen::internal::perfvalues::maxsuper
Index maxsuper
Definition:
SparseLU_Structs.h:101
Eigen::internal::UCOL
Definition:
SparseLU_Structs.h:74
Eigen::Index
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition:
Meta.h:74
Eigen::internal::LU_GlobalLU_t::xlsub
IndexVector xlsub
Definition:
SparseLU_Structs.h:84
Eigen::internal::perfvalues::panel_size
Index panel_size
Definition:
SparseLU_Structs.h:97
Eigen::internal::LU_GlobalLU_t::xusub
IndexVector xusub
Definition:
SparseLU_Structs.h:89
Eigen::internal::LU_GlobalLU_t::ucol
ScalarVector ucol
Definition:
SparseLU_Structs.h:87
Eigen::internal::LU_GlobalLU_t::lsub
IndexVector lsub
Definition:
SparseLU_Structs.h:82
Eigen::internal::LU_GlobalLU_t::supno
IndexVector supno
Definition:
SparseLU_Structs.h:80
Eigen::internal::LU_GlobalLU_t::nzlumax
Index nzlumax
Definition:
SparseLU_Structs.h:86
internal
Definition:
BandTriangularSolver.h:13
Eigen::internal::USUB
Definition:
SparseLU_Structs.h:74
Eigen::internal::perfvalues::fillfactor
Index fillfactor
Definition:
SparseLU_Structs.h:104
Eigen::internal::perfvalues
Definition:
SparseLU_Structs.h:96
Eigen::internal::ULVL
Definition:
SparseLU_Structs.h:74
Eigen::internal::LLVL
Definition:
SparseLU_Structs.h:74
Eigen::internal::LSUB
Definition:
SparseLU_Structs.h:74
gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:35:59