-
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
fix padded layout annotations and add tagged raw array constructor to layout_stride
#327
fix padded layout annotations and add tagged raw array constructor to layout_stride
#327
Conversation
/* | ||
* TODO: check preconditions | ||
* - s[i] > 0 is true for all i in the range [0, rank_ ). | ||
* - REQUIRED-SPAN-SIZE(e, s) is a representable value of type index_type ([basic.fundamental]). | ||
* - If rank_ is greater than 0, then there exists a permutation P of the integers in the | ||
* range [0, rank_), such that s[ pi ] >= s[ pi − 1 ] * e.extent( pi − 1 ) is true for | ||
* all i in the range [1, rank_ ), where pi is the ith element of P. | ||
*/ |
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 TODO is just a copy and paste from the std::array
constructor
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 for this fix!
0940586
to
0ad1b26
Compare
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.
Did you ran clang-format over this thing?
namespace MDSPAN_IMPL_STANDARD_NAMESPACE { | ||
constexpr struct mdspan_non_standard_tag { | ||
} mdspan_non_standard; | ||
} // namespace MDSPAN_IMPL_STANDARD_NAMESPACE |
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 should go into the utility header introduced by the cpp14 support PR
… layouts and reformat code
… a raw array type as std::array is not compatible
0ad1b26
to
f08661a
Compare
Fixes #326
Additionally, some device code cannot use
std::array
so this adds a "non-standard" constructor tolayout_stride
that accepts a raw array to support this use case