![]() Registered Member ![]()
|
Following the guidance here [0], I have:
If I create an Eigen::Matrix and call test like so, it works fine:
However, the following doesn't work:
However, the following does work:
Is .eval() the right approach here? Should I being doing something else at the call site, or in my function definition to better handle this? Does the return value of `.block<2, 1>(0, 1)` constitute a "plain matrix or vector (not an expression)" [1] or not, so that I can be certain this isn't creating a useless copy? Sincerely, Luke [0] https://eigen.tuxfamily.org/dox/TopicFu ... Types.html [1] https://eigen.tuxfamily.org/dox/classEi ... ml#title39 |
![]() Registered Member ![]()
|
The solution I landed upon was to change to this:
|
Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell