Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Eigen.hpp out of prim #3128

Open
SteveBronder opened this issue Nov 15, 2024 · 2 comments
Open

Move Eigen.hpp out of prim #3128

SteveBronder opened this issue Nov 15, 2024 · 2 comments

Comments

@SteveBronder
Copy link
Collaborator

Description

Right now most files include stan/math/prim/fun/Eigen.hpp before everything else.

#include <stan/math/prim/fun/Eigen.hpp>
#include <stan/math/rev/meta.hpp>
#include <stan/math/rev/core.hpp>
#include <stan/math/rev/fun/value_of.hpp>

But our rules for fwd and rev are the you should always include fwd/rev files before including anything from prim. So we should move Eigen.hpp up to the math folder so it is out of prim.

Current Version:

v4.9.0

@WardBrian
Copy link
Member

I think this is a good idea, but we should probably leave Eigen.hpp in prim/fun, that includes whatever the new location is, because it is used outside of just this repo:

https://github.com/search?q=org%3Astan-dev+stan%2Fmath%2Fprim%2Ffun%2FEigen.hpp+NOT+repo%3Astan-dev%2Fmath&type=code

@SteveBronder
Copy link
Collaborator Author

Yes that's reasonable. We can have the prim/fun file just include the other file

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

No branches or pull requests

2 participants