31#ifndef EIGEN_SPARSELU_MEMORY
32#define EIGEN_SPARSELU_MEMORY
37enum { LUNoMarker = 3 };
38enum {emptyIdxLU = -1};
41 return (std::max)(m, (t+b)*w);
44template<
typename Scalar>
47 return (2*w + 4 + LUNoMarker) * m *
sizeof(
Index) + (w + 1) * m *
sizeof(Scalar);
61template <
typename Scalar,
typename StorageIndex>
62template <
typename VectorType>
79#ifdef EIGEN_EXCEPTIONS
85#ifdef EIGEN_EXCEPTIONS
86 catch(std::bad_alloc& )
108 alpha = (alpha + 1)/2;
110#ifdef EIGEN_EXCEPTIONS
116#ifdef EIGEN_EXCEPTIONS
117 catch(std::bad_alloc& )
125 }
while (!vec.size());
134 if(num_expansions) ++num_expansions;
150template <
typename Scalar,
typename StorageIndex>
153 Index& num_expansions =
glu.num_expansions;
159 tempSpace = (2*panel_size + 4 + LUNoMarker) * m *
sizeof(
Index) + (panel_size + 1) * m *
sizeof(Scalar);
160 if (
lwork == emptyIdxLU)
162 Index estimated_size;
164 + (
glu.nzlmax +
glu.nzumax) *
sizeof(
Index) + (
glu.nzlumax+
glu.nzumax) *
sizeof(Scalar) + n;
165 return estimated_size;
191 }
while (!
glu.lusup.size() || !
glu.ucol.size() || !
glu.lsub.size() || !
glu.usub.size());
207template <
typename Scalar,
typename StorageIndex>
208template <
typename VectorType>
EIGEN_DEVICE_FUNC void resize(Index newSize)
Only plain matrices/arrays, not expressions, may be resized; therefore the only useful resize methods...
Definition DenseBase.h:246
Base class for all dense matrices, vectors, and expressions.
Definition MatrixBase.h:50
Index memXpand(VectorType &vec, Index &maxlen, Index nbElts, MemType memtype, Index &num_expansions)
Expand the existing storage.
Definition SparseLU_Memory.h:209
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:151
Index expand(VectorType &vec, Index &length, Index nbElts, Index keep_prev, Index &num_expansions)
Expand the existing storage to accommodate more fill-ins.
Definition SparseLU_Memory.h:63
Namespace containing all symbols from the Eigen library.
Definition LDLT.h:16
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:74
Definition SparseLU_Structs.h:77