-
Notifications
You must be signed in to change notification settings - Fork 26
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
P0009r8: Fix various issues including #73 #74
Conversation
No one else has looked at this commit, so please be sure to review it with Dan or someone else.
We still need to change DynamicRank and DynamicIndex to use a more mathematical notation.
Notation improvements include a way of avoiding incorrect syntax in code font for referring to the entries of a parameter pack.
Permutation is a mathematical object; change wording so that we clarify the permutation's interaction with code.
Denote the value of the <math>k</math>-th member of `slices...` | ||
by <math>s<sub>k</sub></math>. | ||
|
||
Define `rank_map` as the length ρ `std::integer_sequence` of `ptrdiff_t` consisting of all k such that `is_convertible_v<`<math>s<sub>k</sub></math>`, pair<ptrdiff_t, ptrdiff_t>> || is_convertible_v<`<math>s<sub>k</sub></math>`, all_type>` is `true`. |
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.
This math wording replaces the code above that defines the rank of the result.
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.
Fixed in P0009r8-more-math branch.
* For all `r` in 0, 1, ..., `sizeof...(slices)-1`, | ||
`0 <= first[r] && first[r] < last[r] && last[r] <= src.extent(r)` is `true`. | ||
* *Constraints:* | ||
* For all types `T` in the parameter pack `SliceSpecifiers...`, |
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.
Add constraint: Input mdspan layout must be left, right, or stride. This is because some layouts (e.g., tiled) don't allow arbitrary subspans.
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.
"Implementation defined whether other layouts are supported" i.e., are a constraint
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.
Fixed in P0009r8-more-math branch.
contiguous set of objects; e.g., restrict `T` to be trivially copyable or have a wider alignment. | ||
An accessor policy defines | ||
a type through which a single element is accessed, | ||
a type through which the contiguous set of elements is accessed, |
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.
What does "through" mean?
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.
"defines a generalization of pointer, which is a handle to the contiguous set of elements." (relax contiguity later, in a later paper, e.g., for segmented allocations)
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.
"defines a reference, which is a handle to a single element"
@@ -1797,7 +1903,7 @@ Table �: Accessor policy requirements | |||
<tr> | |||
<td>`A::offset_policy`</td> | |||
<td></td> | |||
<td>Accessor policy which can access a pointer that has been return by `a.offset(p,i)`.</td> | |||
<td>Accessor policy which can access a pointer that has been returned by `a.offset(p,i)`.</td> | |||
</tr> | |||
<tr> | |||
<td>`a.decay(p)`</td> |
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.
this is another relaxation point, only required under certain circumstances; returns a span
@@ -1797,7 +1903,7 @@ Table �: Accessor policy requirements | |||
<tr> | |||
<td>`A::offset_policy`</td> | |||
<td></td> | |||
<td>Accessor policy which can access a pointer that has been return by `a.offset(p,i)`.</td> | |||
<td>Accessor policy which can access a pointer that has been returned by `a.offset(p,i)`.</td> |
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.
"Accessor policy whose pointer typedef is convertible from a.offset(p,i)
"
Per request by @crtrott, I will make another pass that turns most of the code in |
Agreed. Closing to avoid confusion. |
@crtrott @dsunder @dhollman