Add `par_reduce_inner` functions
All credit for these to @pdmullen! I will fix bugs if they come up though.
At some point @pdmullen sent me some implementations of inner loops for performing reductions, i.e. par_for_inner but for par_reduce. This is useful if reducing to a vector, replacing values with an average, etc.
I am using the 1D variant in production happily, but haven't needed the 2D and 3D versions yet -- it seems difficult to believe they're incorrect though. I'm poking them upstream as a part of reducing the changeset between KHARMA's parthenon and develop, which is now quite small!
It might be useful to have a unit test for these, which I can add soon.
PR Checklist
- [ ] Code passes cpplint
- [ ] New features are documented.
- [ ] Adds a test for any bugs fixed. Adds tests for new features.
- [ ] Code is formatted
- [ ] Changes are summarized in CHANGELOG.md
- [ ] Change is breaking (API, behavior, ...)
- [ ] Change is additionally added to CHANGELOG.md in the breaking section
- [ ] PR is marked as breaking
- [ ] Short summary API changes at the top of the PR (plus optionally with an automated update/fix script)
- [ ] CI has been triggered on Darwin for performance regression tests.
- [ ] Docs build
- [ ] (@lanl.gov employees) Update copyright on changed files
Does #1142 provide this functionality @acreyes?
Does #1142 provide this functionality @acreyes?
It doesn't at the moment, but it should be straightforward to add