Fix compile error with latest Kokkos lib
This commit is contained in:
@ -86,7 +86,7 @@ class AtomKokkos : public Atom {
|
||||
|
||||
template<class DeviceType>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
static int map_kokkos(tagint global, int map_style, DAT::tdual_int_1d k_map_array, dual_hash_type k_map_hash)
|
||||
static int map_kokkos(tagint global, int map_style, const DAT::tdual_int_1d &k_map_array, const dual_hash_type &k_map_hash)
|
||||
{
|
||||
if (map_style == 1)
|
||||
return k_map_array.view<DeviceType>()(global);
|
||||
@ -98,10 +98,10 @@ class AtomKokkos : public Atom {
|
||||
|
||||
template<class DeviceType>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
static int map_find_hash_kokkos(tagint global, dual_hash_type &k_map_hash)
|
||||
static int map_find_hash_kokkos(tagint global, const dual_hash_type &k_map_hash)
|
||||
{
|
||||
int local = -1;
|
||||
auto d_map_hash = k_map_hash.view<DeviceType>();
|
||||
auto& d_map_hash = k_map_hash.const_view<DeviceType>();
|
||||
auto index = d_map_hash.find(global);
|
||||
if (d_map_hash.valid_at(index))
|
||||
local = d_map_hash.value_at(index);
|
||||
|
||||
@ -513,13 +513,19 @@ struct dual_hash_type {
|
||||
host_hash_type h_view;
|
||||
|
||||
template<class DeviceType>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
std::enable_if_t<(std::is_same<DeviceType,LMPDeviceType>::value || Kokkos::SpaceAccessibility<LMPDeviceType::memory_space,LMPHostType::memory_space>::accessible),hash_type&> view() {return d_view;}
|
||||
|
||||
template<class DeviceType>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
std::enable_if_t<!(std::is_same<DeviceType,LMPDeviceType>::value || Kokkos::SpaceAccessibility<LMPDeviceType::memory_space,LMPHostType::memory_space>::accessible),host_hash_type&> view() {return h_view;}
|
||||
|
||||
template<class DeviceType>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
std::enable_if_t<(std::is_same<DeviceType,LMPDeviceType>::value || Kokkos::SpaceAccessibility<LMPDeviceType::memory_space,LMPHostType::memory_space>::accessible),const hash_type&> const_view() const {return d_view;}
|
||||
|
||||
template<class DeviceType>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
std::enable_if_t<!(std::is_same<DeviceType,LMPDeviceType>::value || Kokkos::SpaceAccessibility<LMPDeviceType::memory_space,LMPHostType::memory_space>::accessible),const host_hash_type&> const_view() const {return h_view;}
|
||||
|
||||
};
|
||||
|
||||
template <class DeviceType>
|
||||
|
||||
Reference in New Issue
Block a user