aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/SparseLU/SparseLU_Memory.h
diff options
context:
space:
mode:
authorGravatar Desire NUENTSA <desire.nuentsa_wakam@inria.fr>2012-09-25 09:53:40 +0200
committerGravatar Desire NUENTSA <desire.nuentsa_wakam@inria.fr>2012-09-25 09:53:40 +0200
commita01371548dc66ee8cbfac8effd5f560bf5d5697a (patch)
tree67ff5e2b68f97f534cb48161821257260e6a908a /Eigen/src/SparseLU/SparseLU_Memory.h
parent7740127e3da88512d409bf0b2a045f373d067af1 (diff)
Define sparseLU functions as static
Diffstat (limited to 'Eigen/src/SparseLU/SparseLU_Memory.h')
-rw-r--r--Eigen/src/SparseLU/SparseLU_Memory.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/Eigen/src/SparseLU/SparseLU_Memory.h b/Eigen/src/SparseLU/SparseLU_Memory.h
index 48b36f5b4..0396ab61f 100644
--- a/Eigen/src/SparseLU/SparseLU_Memory.h
+++ b/Eigen/src/SparseLU/SparseLU_Memory.h
@@ -49,8 +49,9 @@
* \param keep_prev 1: use length and do not expand the vector; 0: compute new_len and expand
* \param [in,out]num_expansions Number of times the memory has been expanded
*/
-template <typename VectorType >
-int expand(VectorType& vec, int& length, int nbElts, int keep_prev, int& num_expansions)
+template <typename Scalar, typename Index>
+template <typename VectorType>
+int SparseLUBase<Scalar,Index>::expand(VectorType& vec, int& length, int nbElts, int keep_prev, int& num_expansions)
{
float alpha = 1.5; // Ratio of the memory increase
@@ -122,12 +123,9 @@ int expand(VectorType& vec, int& length, int nbElts, int keep_prev, int& num_ex
* \return an estimated size of the required memory if lwork = -1; otherwise, return the size of actually allocated memory when allocation failed, and 0 on success
* NOTE Unlike SuperLU, this routine does not support successive factorization with the same pattern and the same row permutation
*/
-template <typename IndexVector,typename ScalarVector>
-int LUMemInit(int m, int n, int annz, int lwork, int fillratio, int panel_size, LU_GlobalLU_t<IndexVector,ScalarVector>& glu)
+template <typename Scalar, typename Index>
+int SparseLUBase<Scalar,Index>::LUMemInit(int m, int n, int annz, int lwork, int fillratio, int panel_size, GlobalLU_t& glu)
{
- typedef typename ScalarVector::Scalar Scalar;
- typedef typename IndexVector::Scalar Index;
-
int& num_expansions = glu.num_expansions; //No memory expansions so far
num_expansions = 0;
glu.nzumax = glu.nzlumax = std::max(fillratio * annz, m*n); // estimated number of nonzeros in U
@@ -187,8 +185,9 @@ int LUMemInit(int m, int n, int annz, int lwork, int fillratio, int panel_size,
* \param glu Global data structure
* \return 0 on success, > 0 size of the memory allocated so far
*/
+template <typename Scalar, typename Index>
template <typename VectorType>
-int LUMemXpand(VectorType& vec, int& maxlen, int nbElts, LU_MemType memtype, int& num_expansions)
+int SparseLUBase<Scalar,Index>::LUMemXpand(VectorType& vec, int& maxlen, int nbElts, LU_MemType memtype, int& num_expansions)
{
int failed_size;
if (memtype == USUB)