mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-03-07 18:27:40 +08:00
Explicitly bypass resize and memmoves when there is already the exact right number of elements available.
This commit is contained in:
parent
36da231a41
commit
196de2efe3
@ -164,7 +164,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
if(m_matrix.isCompressed())
|
||||
if(m_matrix.isCompressed() && nnz!=block_size)
|
||||
{
|
||||
// no need to realloc, simply copy the tail at its respective position and insert tmp
|
||||
matrix.data().resize(start + nnz + tail_size);
|
||||
|
Loading…
Reference in New Issue
Block a user