-
Notifications
You must be signed in to change notification settings - Fork 32
(Towards #2381 #2674) add min max access types and new LFRic builtins #3263
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
base: master
Are you sure you want to change the base?
Conversation
…into 2381_arp_global_reduction
…into 2381_arp_global_reduction
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3263 +/- ##
=======================================
Coverage 99.91% 99.91%
=======================================
Files 376 376
Lines 53529 53562 +33
=======================================
+ Hits 53484 53517 +33
Misses 45 45 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Ready for a first look from anyone still working @sergisiso or @hiker ? |
sergisiso
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arporter Most of the PR looks good but I am getting confused by the need of these specific access types, these seem regular writes to me. It would be good to clarify if these are really needed before continuing.
| access_mapping = gh_read: read, gh_write: write, gh_readwrite: readwrite, | ||
| gh_inc: inc, gh_readinc: readinc, gh_sum: sum | ||
| gh_inc: inc, gh_readinc: readinc, gh_sum: sum, | ||
| gh_min: min, gh_max: max |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tab to spaces :)
| | GH_SCALAR | GH_REAL | n/a | GH_READ, GH_SUM, | | ||
| | | | | GH_MIN, GH_MAX | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why do we need GH_SUM, GH_MIN or GH_MAX. These is the output scalar of the built-in which will only be written to, Why not GH_WRITE?
| #: Is the output of a MIN reduction (i.e. global minimum value). | ||
| MIN = 11 | ||
| #: Is the output of a MAX reduction (i.e. global maximum value). | ||
| MAX = 12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again MIN/MAX is not an AccessType (same with the pre-existing SUM). It is even more confusing that this refer to the output scalar, which is just written to. So why do we differentiate them?
This is a step towards both #2381 (generalising global reductions) and #2674 (new field_min_max builtin). It attempts to reduce the size of #3222 by only adding the two new access types for reductions as well as the skeletons for the new builtins.