Skip to content

Commit

Permalink
tpetra: replace use of impl_dualview_is_single_device
Browse files Browse the repository at this point in the history
replace use of Kokkos impl_* routine, preemptive change in case internal
impl routines become private members
  • Loading branch information
ndellingwood committed Oct 30, 2024
1 parent 09758e9 commit 6d87b05
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/tpetra/core/src/Tpetra_MultiVector_def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1795,7 +1795,7 @@ void MultiVector<Scalar, LocalOrdinal, GlobalOrdinal, Node>::copyAndPermute(
// - CombineMode needs to be INSERT.
// - The number of vectors needs to be 1, otherwise we need to
// reorder the received data.
if ((dual_view_type::impl_dualview_is_single_device::value ||
if ((std::is_same_v<typename dual_view_type::t_dev::device_type, typename dual_view_type::t_host::device_type> ||
(Details::Behavior::assumeMpiIsGPUAware () && !this->need_sync_device()) ||
(!Details::Behavior::assumeMpiIsGPUAware () && !this->need_sync_host())) &&
areRemoteLIDsContiguous &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ namespace {
// MV::imports_ and MV::view_ have the same memory space, the
// imports_ view is aliased to the data view of the target MV.
if ((myImageID == collectRank) && (myImageID == 0)) {
if (mv_type::dual_view_type::impl_dualview_is_single_device::value)
if (std::is_same_v<typename mv_type::dual_view_type::t_dev::device_type, typename mv_type::dual_view_type::t_host::device_type>)
TEUCHOS_ASSERT(tgt_mv->importsAreAliased());
// else {
// We do not know if copyAndPermute was run on host or device.
Expand Down Expand Up @@ -800,7 +800,7 @@ namespace {
// MV::imports_ and MV::view_ have the same memory space, the
// imports_ view is aliased to the data view of the target MV.
if ((myImageID == collectRank) && (myImageID == 0)) {
if (mv_type::dual_view_type::impl_dualview_is_single_device::value)
if (std::is_same_v<typename mv_type::dual_view_type::t_dev::device_type, typename mv_type::dual_view_type::t_host::device_type>)
TEUCHOS_ASSERT(tgt_mv->importsAreAliased());
// else {
// We do not know if copyAndPermute was run on host or device.
Expand Down

0 comments on commit 6d87b05

Please sign in to comment.