Counts in the root finder
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 39
- Forks
- 22
- Avg merge
- 10h 22m
- Merged PRs (30d)
- 3
Description
In #243 @mauneyc-LANL suggested that
(none of this implies a blocking review) I'm a bit late to this so apologies if this has been covered. Would the better solution be to use atomic writes? This may require some "portable" atomic routines in PoC, tho.
Keeping the diagnostic would be useful even on device. Perhaps a better approach is to template on an interface
struct DiagStub { // has interface as RootCounts but no-op implementation, e.g. DiagStub::reset() {} }; // solves for f(x,params) - ytarget = 0 template <typename T, typename DiagCount = DiagStub> PORTABLE_INLINE_FUNCTION Status regula_falsi(const T &f, const Real ytarget, const Real guess, Real a, Real b, const Real xtol, const Real ytol, Real &xroot, DiagCounts &counts) {For debug or evaluation builds, this can be changed at build time. You also get the benefit of reducing branch points in the function. (This is a "for instance" snippet, go easy on unintended effects).
Tangentially, there is the question of rolling a custom root-find instead of relying on a more general library, though I'm not sure that this is a "now" concern.
I think both of these ideas are good ones.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the root-finder implementation discussed in #243, with attention to its diagnostic counts and portable device behavior. The issue presents possible atomic-write, diagnostic-interface, and custom-root-finder directions but does not select one; done would require an agreed design and validation of the chosen approach.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100