Skip to content

Commit

Permalink
Move setting alloc_name into if-body
Browse files Browse the repository at this point in the history
  • Loading branch information
janciesko committed Aug 1, 2022
1 parent 5e7e617 commit dcb9065
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/core/Kokkos_RemoteSpaces_ViewMapping.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1204,14 +1204,14 @@ class ViewMapping<Traits, Kokkos::Experimental::RemoteSpaceSpecializeTag> {
}
#endif

const std::string &alloc_name =
static_cast<Kokkos::Impl::ViewCtorProp<void, std::string> const &>(
arg_prop)
.value;

// Only initialize if the allocation is non-zero.
// May be zero if one of the dimensions is zero.
if (alloc_size && alloc_prop::initialize) {
const std::string &alloc_name =
static_cast<Kokkos::Impl::ViewCtorProp<void, std::string> const &>(
arg_prop)
.value;

// Assume destruction is only required when construction is requested.
// The ViewValueFunctor has both value construction and destruction
// operators.
Expand Down

0 comments on commit dcb9065

Please sign in to comment.