Fix 3331: make_holder(...) with var_value<Matrix> output now eagerly executes#3334
Conversation
WardBrian
left a comment
There was a problem hiding this comment.
Seems like a simple fix. Was this always broken and just not being used, or did something recently change?
|
My guess is that this was always latent, but we just never had a path where SoA and |
Jenkins Console Log Machine informationNo LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focalCPU: G++: Clang: |
Summary
Fixes #3331
The new test for
transposeshows the errror, but we had incorrect type deduction inmake_holder(...);. When the output of the function is avar_value<View<Matrix>>we should always eagerly evaluate. This is safe since the memory for the SoA matrix is on the stack, so any views will be safe for the forward and reverse pass.Tests
Test added that shows the error
Checklist
Copyright holder: Simons Foundation
The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses:
- Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
- Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
the basic tests are passing
./runTests.py test/unit)make test-headers)make test-math-dependencies)make doxygen)make cpplint)the code is written in idiomatic C++ and changes are documented in the doxygen
the new changes are tested