Registered Member
|
Hi, I was curious how memory is handled when objects with the assignment operator in Eigen.
If I do Eigen::ArrayXf myArray, someOtherArray; Initialize them, put some data inside. when I do, myArray = someOtherArray; Does myArray try to minimize its re-allocation with a conservativeResize? |
Registered Member
|
Hi,
Assignment uses resize and not conservativeResize thus re-allocations are never used. The question on the other hand side is whether re-allocation is faster than a simple allocation of uninitialized memory. I guess the current approach is already optimal. Regards, Hauke |
Registered users: Baidu [Spider], Bing [Bot], Google [Bot], Yahoo [Bot]