31 #ifndef EIGEN_SPARSELU_MEMORY
32 #define EIGEN_SPARSELU_MEMORY
44 template <
typename Scalar>
57 template <
typename Scalar,
typename StorageIndex>
58 template <
typename VectorType>
60 Index& num_expansions) {
64 if (num_expansions == 0 || keep_prev)
70 if (nbElts > 0) old_vec = vec.segment(0, nbElts);
73 #ifdef EIGEN_EXCEPTIONS
79 #ifdef EIGEN_EXCEPTIONS
80 catch (std::bad_alloc&)
85 if (!num_expansions) {
99 #ifdef EIGEN_EXCEPTIONS
105 #ifdef EIGEN_EXCEPTIONS
106 catch (std::bad_alloc&)
112 if (tries > 10)
return new_len;
114 }
while (!vec.size());
118 if (nbElts > 0) vec.segment(0, nbElts) = old_vec;
121 if (num_expansions) ++num_expansions;
138 template <
typename Scalar,
typename StorageIndex>
149 Index estimated_size;
152 return estimated_size;
158 glu.
xsup.resize(
n + 1);
166 if ((expand<ScalarVector>(glu.
lusup, glu.
nzlumax, 0, 0, num_expansions) < 0) ||
167 (expand<ScalarVector>(glu.
ucol, glu.
nzumax, 0, 0, num_expansions) < 0) ||
168 (expand<IndexVector>(glu.
lsub, glu.
nzlmax, 0, 0, num_expansions) < 0) ||
169 (expand<IndexVector>(glu.
usub, glu.
nzumax, 0, 1, num_expansions) < 0)) {
176 }
while (!glu.
lusup.size() || !glu.
ucol.size() || !glu.
lsub.size() || !glu.
usub.size());
192 template <
typename Scalar,
typename StorageIndex>
193 template <
typename VectorType>
195 Index& num_expansions) {
198 failed_size = this->expand<VectorType>(vec, maxlen, nbElts, 1, num_expansions);
200 failed_size = this->expand<VectorType>(vec, maxlen, nbElts, 0, num_expansions);
202 if (failed_size)
return failed_size;
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
RowVector3d w
Definition: Matrix_resize_int.cpp:3
Scalar * b
Definition: benchVecAdd.cpp:17
SCALAR Scalar
Definition: bench_gemm.cpp:45
Index memXpand(VectorType &vec, Index &maxlen, Index nbElts, MemType memtype, Index &num_expansions)
Expand the existing storage.
Definition: SparseLU_Memory.h:194
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.
Definition: SparseLU_Memory.h:139
Index expand(VectorType &vec, Index &length, Index nbElts, Index keep_prev, Index &num_expansions)
Definition: SparseLU_Memory.h:59
#define min(a, b)
Definition: datatypes.h:22
#define max(a, b)
Definition: datatypes.h:23
RealScalar alpha
Definition: level1_cplx_impl.h:151
int * m
Definition: level2_cplx_impl.h:294
Index LUnumTempV(Index &m, Index &w, Index &t, Index &b)
Definition: SparseLU_Memory.h:42
Index LUTempSpace(Index &m, Index &w)
Definition: SparseLU_Memory.h:45
MemType
Definition: SparseLU_Structs.h:77
@ USUB
Definition: SparseLU_Structs.h:77
@ LUNoMarker
Definition: SparseLU_Memory.h:40
@ 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
t
Definition: plotPSD.py:36
Definition: SparseLU_Structs.h:80
IndexVector usub
Definition: SparseLU_Structs.h:91
Index nzlmax
Definition: SparseLU_Structs.h:88
IndexVector xsup
Definition: SparseLU_Structs.h:82
Index nzumax
Definition: SparseLU_Structs.h:93
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
IndexVector xusub
Definition: SparseLU_Structs.h:92
Index nzlumax
Definition: SparseLU_Structs.h:89
IndexVector xlsub
Definition: SparseLU_Structs.h:87
ScalarVector lusup
Definition: SparseLU_Structs.h:84
ScalarVector ucol
Definition: SparseLU_Structs.h:90
Definition: fft_test_shared.h:66