Registered Member
|
What happens under the hood if I returned the result matrix from a method, e.g.
What performance hit (memory allocation, etc.) do I get? Is this the right way of returning a matrix? Thanks. |
Moderator
|
In this case the block will be copied into a temporary matrix. To avoid that, your function should return a Block<MatrixXd,Dynamic,Dynamic> object which is what data.block(...) returns.
|
Registered users: Baidu [Spider], Bing [Bot], Google [Bot], rblackwell