mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-11 19:29:02 +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
|
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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user