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

Add Kokkos::create_mirror[_view] WithoutInitializing for Container types #4805

Merged
merged 8 commits into from
Mar 29, 2022

Conversation

masterleinad
Copy link
Contributor

Related to #4794, in continuation of #4486.

StaticCrsGraph also provides create_mirror[_view] but with somewhat different semantics so I decided to omit it here.

@stanmoore1
Copy link
Contributor

Thanks @masterleinad!

@masterleinad masterleinad marked this pull request as draft February 18, 2022 23:51
@masterleinad masterleinad marked this pull request as ready for review February 22, 2022 22:48
containers/src/Kokkos_DynRankView.hpp Show resolved Hide resolved
typename Impl::MirrorDRVType<Space, T, P...>::view_type create_mirror(
const Space&, const Kokkos::DynRankView<T, P...>& src) {
return typename Impl::MirrorDRVType<Space, T, P...>::view_type(
src.label(), Impl::reconstructLayout(src.layout(), src.rank()));
Copy link
Member

Choose a reason for hiding this comment

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

Should this pass the space argument to the view construction? I guess it would be a behavior change with regards to syncing or?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Space is (allowed to be) a memory space. We can discuss if we want to specialize for the case that an execution space is provided but I would prefer to do that uniformly with the other create_mirror overloads in a separate pull request

containers/src/Kokkos_DynRankView.hpp Show resolved Hide resolved
containers/src/Kokkos_DynRankView.hpp Show resolved Hide resolved
containers/src/Kokkos_DynRankView.hpp Show resolved Hide resolved
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.

None yet

4 participants