Fix sparse insert

This commit is contained in:
Charles Schlosser
2023-01-20 21:32:32 +00:00
parent 08c961e837
commit 5a7ca681d5
3 changed files with 208 additions and 145 deletions

View File

@@ -193,10 +193,8 @@ class CompressedStorage
inline void moveChunk(Index from, Index to, Index chunkSize)
{
eigen_internal_assert(chunkSize >= 0 && to+chunkSize <= m_size);
if (chunkSize > 0) {
internal::smart_memmove(m_values + from, m_values + from + chunkSize, m_values + to);
internal::smart_memmove(m_indices + from, m_indices + from + chunkSize, m_indices + to);
}
internal::smart_memmove(m_values + from, m_values + from + chunkSize, m_values + to);
internal::smart_memmove(m_indices + from, m_indices + from + chunkSize, m_indices + to);
}
protected: