Skip to content

Commit

Permalink
Rationalize which space to pass to MirrorViewType
Browse files Browse the repository at this point in the history
  • Loading branch information
pzehner committed Mar 12, 2024
1 parent 978d9d5 commit 7cc7de3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions core/src/Kokkos_CopyViews.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3489,7 +3489,7 @@ inline auto create_mirror(const Kokkos::View<T, P...>& src,
// get desired space
using space_type = std::conditional_t<Impl::ViewCtorProp<ViewCtorArgs...>::has_memory_space,
typename Impl::ViewCtorProp<ViewCtorArgs...>::memory_space,
DefaultHostExecutionSpace>;
DefaultHostExecutionSpace::memory_space>;

using mirror_view_type = typename Impl::MirrorViewType<space_type, T, P...>;

Expand Down Expand Up @@ -3545,7 +3545,7 @@ inline auto create_mirror_view(const Kokkos::View<T, P...>& src,
// get desired space
using space_type = std::conditional_t<Impl::ViewCtorProp<ViewCtorArgs...>::has_memory_space,
typename Impl::ViewCtorProp<ViewCtorArgs...>::memory_space,
DefaultHostExecutionSpace>;
DefaultHostExecutionSpace::memory_space>;

using mirror_view_type = typename Impl::MirrorViewType<space_type, T, P...>;

Expand Down Expand Up @@ -3626,7 +3626,7 @@ auto create_mirror_view_and_copy(
// get desired space
using space_type = std::conditional_t<alloc_prop_input::has_memory_space,
typename alloc_prop_input::memory_space,
DefaultHostExecutionSpace>;
DefaultHostExecutionSpace::memory_space>;

using mirror_view_type = typename Impl::MirrorViewType<space_type, T, P...>;

Expand All @@ -3638,7 +3638,6 @@ auto create_mirror_view_and_copy(

return src;
} else {

using nonconst_mirror = typename mirror_view_type::dest_view_type;
auto arg_prop_copy = Impl::with_properties_if_unset(
arg_prop, std::string{}, WithoutInitializing,
Expand Down

0 comments on commit 7cc7de3

Please sign in to comment.