mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Explicitly bypass resize and memmoves when there is already the exact right number of elements available.
This commit is contained in:
@@ -164,7 +164,7 @@ public:
|
|||||||
}
|
}
|
||||||
else
|
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
|
// no need to realloc, simply copy the tail at its respective position and insert tmp
|
||||||
matrix.data().resize(start + nnz + tail_size);
|
matrix.data().resize(start + nnz + tail_size);
|
||||||
|
|||||||
Reference in New Issue
Block a user