-
-
Notifications
You must be signed in to change notification settings - Fork 369
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
Fix model_header include order when STAN_MODEL_FVAR_VAR is defined #3294
Conversation
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: |
Submission Checklist
./runTests.py src/test/unit
make cpplint
Summary
Fixes an issue (initially reported in BridgeStan) where C++ compilation would fail for this model if the forward-mode overloads for the model class were enabled:
This was because
accumulate
was not picking up on the forward mode overload forstan::math::sum
. Moving this includes such that thefwd.hpp
header is included earlier resolves the issue.Intended Effect
Allow compilation to succeed in this case.
How to Verify
Compilation test added which will be picked up by the Github Action that runs with
-DSTAN_MODEL_FVAR_VAR
Side Effects
Documentation
Copyright and Licensing
Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company):
Simons Foundation
By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses: