-
Notifications
You must be signed in to change notification settings - Fork 407
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
Assert that layout construction from extents is valid where used #5209
Conversation
Fixes #5205 |
core/src/Kokkos_View.hpp
Outdated
check_input_args::yes) { | ||
static_assert(traits::array_layout::is_extent_constructible, | ||
"Layout is not extent constructible. Use overload taking a " | ||
"layout object instead.\n"); |
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.
"layout object instead.\n"); | |
"layout object instead."); |
same comment everywhere
core/src/Kokkos_View.hpp
Outdated
check_input_args::yes) {} | ||
check_input_args::yes) { | ||
static_assert(traits::array_layout::is_extent_constructible, | ||
"Layout is not extent constructible. Use overload taking a " |
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.
Please suggest a message that will be easier to understand for users
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 know, seems pretty obvious to me?
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.
"is not constructible from extent arguments. Use ..."
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 would just use the second sentence "Use the overload taking a layout object instead!".
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.
applied
Also introduces a missing layout overload for required_allocation_size
Also introduces a missing layout overload for required_allocation_size