aboutsummaryrefslogtreecommitdiff
path: root/unsupported/Eigen/src/SparseExtra/RandomSetter.h
diff options
context:
space:
mode:
authorMiao Wang <miaowang@google.com>2017-03-08 17:23:02 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-03-08 17:23:02 +0000
commit4b1361e1aca4189cfba2bd2c0fc87d593da76728 (patch)
tree0488797fc544fe977bec6418c73445759f052482 /unsupported/Eigen/src/SparseExtra/RandomSetter.h
parent29a3140b512228375adb9f24414fb2996c2889e6 (diff)
parentd3ea081e6f4a81b7086df9f35f08f25e54f20863 (diff)
downloadeigen-4b1361e1aca4189cfba2bd2c0fc87d593da76728.tar.gz
Merge "Rebase Eigen to 3.3.3." am: 7de1f32623 am: 6688b8b260
am: d3ea081e6f Change-Id: Id61115ffaa6ad3c134b182547652c7248e8aa5cd
Diffstat (limited to 'unsupported/Eigen/src/SparseExtra/RandomSetter.h')
-rw-r--r--unsupported/Eigen/src/SparseExtra/RandomSetter.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/unsupported/Eigen/src/SparseExtra/RandomSetter.h b/unsupported/Eigen/src/SparseExtra/RandomSetter.h
index dee1708e7..ee97299af 100644
--- a/unsupported/Eigen/src/SparseExtra/RandomSetter.h
+++ b/unsupported/Eigen/src/SparseExtra/RandomSetter.h
@@ -95,10 +95,10 @@ template<typename Scalar> struct GoogleSparseHashMapTraits
*
* \brief The RandomSetter is a wrapper object allowing to set/update a sparse matrix with random access
*
- * \param SparseMatrixType the type of the sparse matrix we are updating
- * \param MapTraits a traits class representing the map implementation used for the temporary sparse storage.
+ * \tparam SparseMatrixType the type of the sparse matrix we are updating
+ * \tparam MapTraits a traits class representing the map implementation used for the temporary sparse storage.
* Its default value depends on the system.
- * \param OuterPacketBits defines the number of rows (or columns) manage by a single map object
+ * \tparam OuterPacketBits defines the number of rows (or columns) manage by a single map object
* as a power of two exponent.
*
* This class temporarily represents a sparse matrix object using a generic map implementation allowing for
@@ -154,7 +154,7 @@ template<typename SparseMatrixType,
class RandomSetter
{
typedef typename SparseMatrixType::Scalar Scalar;
- typedef typename SparseMatrixType::Index Index;
+ typedef typename SparseMatrixType::StorageIndex StorageIndex;
struct ScalarWrapper
{
@@ -296,7 +296,7 @@ class RandomSetter
const Index inner = SetterRowMajor ? col : row;
const Index outerMajor = outer >> OuterPacketBits; // index of the packet/map
const Index outerMinor = outer & OuterPacketMask; // index of the inner vector in the packet
- const KeyType key = (KeyType(outerMinor)<<m_keyBitsOffset) | inner;
+ const KeyType key = internal::convert_index<KeyType>((outerMinor<<m_keyBitsOffset) | inner);
return m_hashmaps[outerMajor][key].value;
}