| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…' into fix/constexpr-probs
There was a problem hiding this comment.
@SteveBronder: amazing! It is much easier to read with your changes.
I added a couple of comments. I think the only real one to answer is what's up with the compiler flags? Was that intentional?
And it didn't pass some of the CI tests. Once that's all good, I think we merge!
Sorry, something went wrong.
| if (include_summand<propto, T_y, T_dof>::value && nu_ref != (k + 1)) { | ||
| lp += 0.5 * (nu_ref - k - 1.0) * log_determinant_ldlt(ldlt_W); | ||
| if constexpr (include_summand<propto, T_y, T_dof>::value) { | ||
| if (nu_ref != (k + 1)) { |
There was a problem hiding this comment.
nice find!
Sorry, something went wrong.
|
@syclik thanks!
This is all happening so that we can finally do #3190 and get rid of one of the odder template tricks we had to do in C++14 |
Sorry, something went wrong.
Jenkins Console Log Machine information No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focal CPU: G++: Clang: |
Sorry, something went wrong.
|
@WardBrian @syclik good to merge? |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM!
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
This PR does two main things which are mostly just a series of clever greps
I think is_any_autodiff is way easier to read then !is_all_constant
Tests
No new tests
Side Effects
Previously is_autodiff only passed for scalars. But now we have an is_autodiff_scalar that only checks if the type is a scalar fvar or var and is_autodiff will return a value of true for any type whose scalar_type is an autodiff type. This should slightly decrease compile times since now the compiler knows it does not need to go through certain paths and so will never generate anything for the paths we do not go down.
Release notes
Replace standard if statements with if constexpr where posssible.
Checklist
Copyright holder: (fill in copyright holder information)
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
the code is written in idiomatic C++ and changes are documented in the doxygen
the new changes are tested