-
Notifications
You must be signed in to change notification settings - Fork 69
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
Padded layout #237
Padded layout #237
Conversation
|
||
template <typename _T> | ||
static constexpr auto | ||
__construct_with_type(const _Extents &__extents, const extents<typename _Extents::index_type, _NewExtent> &__new_extents) |
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.
That's a neat way to do it! I hadn't thought about how to make the left and right versions share implementation details.
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.
Looks pretty good. There are a few renames which I think would improve clarity.
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.
Thanks so much for taking care of this!
static constexpr rank_type __extent_to_pad_rank = 0; | ||
|
||
static_assert((padding_stride != 0) | ||
|| (extents_type::static_extent(__extent_to_pad_rank) == 0) |
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.
Would you consider reformatting so that the ||
goes at the end of the line? The spacing here looks a bit odd.
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 personally prefer the operator at the beginning of the line for readability; however you're right that the spacing is weird. I retabbed it so that the || is aligned with the opening parenthesis
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 think the condition on the layout_left/right constructors are wrong?
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.
only scratched the surface
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.
Lots of great tests -- great work!!!
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.
Bunch of comments
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.
First partial pass
…for __is_layout_*_padded_mapping
…ntal use of inner_mapping from operator()
Co-authored-by: Damien L-G <[email protected]>
dd784ad
to
63965b5
Compare
This has all of p2642 except 4.3 4.4 submdspan.* which I'm adding in another PR