aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/Solve.h
diff options
context:
space:
mode:
authorGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2014-12-04 22:48:53 +0100
committerGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2014-12-04 22:48:53 +0100
commite8cdbedefb1913b5a0e2f2b7d38470f081cb8d29 (patch)
treeb64cb33df57f4cfcd87bf42643279629dc0900d3 /Eigen/src/Core/Solve.h
parent6ccf97f3e6ce39c210e225ba7aae66da15b71660 (diff)
bug #877, bug #572: Introduce a global Index typedef. Rename Sparse*::Index to StorageIndex, make Dense*::StorageIndex an alias to DenseIndex. Overall this commit gets rid of all Index conversion warnings.
Diffstat (limited to 'Eigen/src/Core/Solve.h')
-rw-r--r--Eigen/src/Core/Solve.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/Eigen/src/Core/Solve.h b/Eigen/src/Core/Solve.h
index 3905cd616..5a3a4235e 100644
--- a/Eigen/src/Core/Solve.h
+++ b/Eigen/src/Core/Solve.h
@@ -48,6 +48,7 @@ struct traits<Solve<Decomposition, RhsType> >
: traits<typename solve_traits<Decomposition,RhsType,typename internal::traits<RhsType>::StorageKind>::PlainObject>
{
typedef typename solve_traits<Decomposition,RhsType,typename internal::traits<RhsType>::StorageKind>::PlainObject PlainObject;
+ typedef typename promote_index_type<typename Decomposition::StorageIndex, typename RhsType::StorageIndex>::type StorageIndex;
typedef traits<PlainObject> BaseTraits;
enum {
Flags = BaseTraits::Flags & RowMajorBit,
@@ -62,15 +63,15 @@ template<typename Decomposition, typename RhsType>
class Solve : public SolveImpl<Decomposition,RhsType,typename internal::traits<RhsType>::StorageKind>
{
public:
- typedef typename RhsType::Index Index;
typedef typename internal::traits<Solve>::PlainObject PlainObject;
+ typedef typename internal::traits<Solve>::StorageIndex StorageIndex;
Solve(const Decomposition &dec, const RhsType &rhs)
: m_dec(dec), m_rhs(rhs)
{}
- EIGEN_DEVICE_FUNC Index rows() const { return m_dec.cols(); }
- EIGEN_DEVICE_FUNC Index cols() const { return m_rhs.cols(); }
+ EIGEN_DEVICE_FUNC StorageIndex rows() const { return m_dec.cols(); }
+ EIGEN_DEVICE_FUNC StorageIndex cols() const { return m_rhs.cols(); }
EIGEN_DEVICE_FUNC const Decomposition& dec() const { return m_dec; }
EIGEN_DEVICE_FUNC const RhsType& rhs() const { return m_rhs; }