Skip to content
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

update mdarray to p1684r5 #296

Merged
merged 5 commits into from
Nov 10, 2023
Merged

Conversation

nmm0
Copy link
Contributor

@nmm0 nmm0 commented Nov 10, 2023

Part 1 of changes

Comment on lines -136 to -148
// Constructors from container
MDSPAN_TEMPLATE_REQUIRES(
class... SizeTypes,
/* requires */ (
_MDSPAN_FOLD_AND(_MDSPAN_TRAIT( std::is_convertible, SizeTypes, index_type) /* && ... */) &&
_MDSPAN_TRAIT( std::is_constructible, extents_type, SizeTypes...) &&
_MDSPAN_TRAIT( std::is_constructible, mapping_type, extents_type)
)
)
MDSPAN_INLINE_FUNCTION
explicit constexpr mdarray(const container_type& ctr, SizeTypes... dynamic_extents)
: map_(extents_type(dynamic_extents...)), ctr_(ctr)
{ assert(ctr.size() >= static_cast<size_t>(map_.required_span_size())); }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not in the paper anymore

Comment on lines -163 to -175
// Constructors from container
MDSPAN_TEMPLATE_REQUIRES(
class... SizeTypes,
/* requires */ (
_MDSPAN_FOLD_AND(_MDSPAN_TRAIT( std::is_convertible, SizeTypes, index_type) /* && ... */) &&
_MDSPAN_TRAIT( std::is_constructible, extents_type, SizeTypes...) &&
_MDSPAN_TRAIT( std::is_constructible, mapping_type, extents_type)
)
)
MDSPAN_INLINE_FUNCTION
explicit constexpr mdarray(container_type&& ctr, SizeTypes... dynamic_extents)
: map_(extents_type(dynamic_extents...)), ctr_(std::move(ctr))
{ assert(ctr_.size() >= static_cast<size_t>(map_.required_span_size())); }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not in the paper anymore

@nmm0
Copy link
Contributor Author

nmm0 commented Nov 10, 2023

TODO: mdspan constructors and single value constructors

@crtrott crtrott marked this pull request as ready for review November 10, 2023 21:27
@crtrott crtrott merged commit a8eca1b into kokkos:stable Nov 10, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants