diff options
author | Gael Guennebaud <g.gael@free.fr> | 2015-02-16 13:19:05 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2015-02-16 13:19:05 +0100 |
commit | aa6c516ec17fb44dff85b1abf3a1b05d58d3bc01 (patch) | |
tree | cd0b6ce4d023ff6734beecc167749d00f301c017 /Eigen/src/PaStiXSupport | |
parent | fc202bab398ed9b78ef8452f8e4ef35e233965f6 (diff) |
Fix many long to int conversion warnings:
- fix usage of Index (API) versus StorageIndex (when multiple indexes are stored)
- use StorageIndex(val) when the input has already been check
- use internal::convert_index<StorageIndex>(val) when val is potentially unsafe (directly comes from user input)
Diffstat (limited to 'Eigen/src/PaStiXSupport')
-rw-r--r-- | Eigen/src/PaStiXSupport/PaStiXSupport.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Eigen/src/PaStiXSupport/PaStiXSupport.h b/Eigen/src/PaStiXSupport/PaStiXSupport.h index e20c9ba2a..4e73edf5b 100644 --- a/Eigen/src/PaStiXSupport/PaStiXSupport.h +++ b/Eigen/src/PaStiXSupport/PaStiXSupport.h @@ -308,7 +308,7 @@ void PastixBase<Derived>::analyzePattern(ColSpMatrix& mat) if(m_size>0) clean(); - m_size = mat.rows(); + m_size = internal::convert_index<int>(mat.rows()); m_perm.resize(m_size); m_invp.resize(m_size); @@ -337,7 +337,7 @@ void PastixBase<Derived>::factorize(ColSpMatrix& mat) eigen_assert(m_analysisIsOk && "The analysis phase should be called before the factorization phase"); m_iparm(IPARM_START_TASK) = API_TASK_NUMFACT; m_iparm(IPARM_END_TASK) = API_TASK_NUMFACT; - m_size = mat.rows(); + m_size = internal::convert_index<int>(mat.rows()); internal::eigen_pastix(&m_pastixdata, MPI_COMM_WORLD, m_size, mat.outerIndexPtr(), mat.innerIndexPtr(), mat.valuePtr(), m_perm.data(), m_invp.data(), 0, 0, m_iparm.data(), m_dparm.data()); @@ -373,7 +373,7 @@ bool PastixBase<Base>::_solve_impl(const MatrixBase<Rhs> &b, MatrixBase<Dest> &x m_iparm[IPARM_START_TASK] = API_TASK_SOLVE; m_iparm[IPARM_END_TASK] = API_TASK_REFINE; - internal::eigen_pastix(&m_pastixdata, MPI_COMM_WORLD, x.rows(), 0, 0, 0, + internal::eigen_pastix(&m_pastixdata, MPI_COMM_WORLD, internal::convert_index<int>(x.rows()), 0, 0, 0, m_perm.data(), m_invp.data(), &x(0, i), rhs, m_iparm.data(), m_dparm.data()); } |