chapel
chapel copied to clipboard
Rename default and reverse comparators in the sort module
This issue captures implementation information for decision made in https://github.com/chapel-lang/chapel/issues/24857
We are renaming the default comparators and removing the associated globals.
Tasks
- [x] Remove
const defaultComarator ...
, replacement isnew defaultComparator()
- [x] Remove
const reverseComarator ...
, replacement isnew reverseDefaultComparator()
- [ ] Rename
DefaultComparator
todefaultComparator
- [ ] Rename
ReverseComparator
toreverseComparator
- [x] ~Add
type reverseDefaultComparator = reverseComparator(defaultComparator);
~ - Add
enum keyPartStatus
with the following enum members- [x] returned
- [x] pre
- [x] post
- [x] Rename
defaultComparator.compare(a, b)
todefaultComparator.compare(x, y: x.type)
- [x] Rename
reverseComparator.compare(a, b)
toreverseComparator.compare(x, y: x.type)
- [x] Rename
TwoArrayDistSortPerBucketTaskStartComparator.key(arg ...
toTwoArrayDistSortPerBucketTaskStartComparator.key(elt ...
- this is an internal implementation detail and will not require a deprecation
- [x] Convert all
keyPart
methods to the new style-
proc keyPart(elt, i: int): (keyPartStatus, integral)
-