Skip to content

Conversation

@SteveBronder
Copy link
Collaborator

@SteveBronder SteveBronder commented Jan 21, 2026

Summary

This moves Stan math up to Eigen 5.0.1. I broke this up by commit so that the changes would be more legible

14cbe65 removes the old Eigen
3d74c35 adds new eigen
4607907 adds the patch as discussed in RcppCore/RcppEigen#143 (comment)
7164bb2 for stan specific changes

The biggest stan changes are the we have to use val_op() instead of plain val() more often. Then we had some type deduction issues with mdivide_lower_tri. Besides that it was not too bad!

Note that this is just for Stan Math, I still need to run all of the tests with the stan repo. I'm guessing we will have some issues up there since we use a few weird views

Tests

No new tests

Release notes

Update to Eigen 5.0.1

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

    • unit tests pass (to run, use: ./runTests.py test/unit)
    • header checks pass, (make test-headers)
    • dependencies checks pass, (make test-math-dependencies)
    • docs build, (make doxygen)
    • code passes the built in C++ standards checks (make cpplint)
  • the code is written in idiomatic C++ and changes are documented in the doxygen

  • the new changes are tested

@WardBrian
Copy link
Member

4607907 should probably lead to a STAN_CHANGES file like we do for tbb, just for documentation: https://github.com/stan-dev/math/blob/develop/lib/tbb_2020.3/STAN_CHANGES

@SteveBronder
Copy link
Collaborator Author

Yes. Also I tried to rebase / squash some commits right before I pushed and that has made a few tests break. But I can fix that stuff and repush.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants