Update Kokkos library in LAMMPS to v3.6.0
This commit is contained in:
@ -257,7 +257,8 @@ class SharedAllocationRecord<Kokkos::Experimental::LogicalMemorySpace<
|
||||
#endif
|
||||
Impl::checked_allocation_with_header(arg_space, arg_label,
|
||||
arg_alloc_size),
|
||||
sizeof(SharedAllocationHeader) + arg_alloc_size, arg_dealloc),
|
||||
sizeof(SharedAllocationHeader) + arg_alloc_size, arg_dealloc,
|
||||
arg_label),
|
||||
m_space(arg_space) {
|
||||
// Fill in the Header information
|
||||
RecordBase::m_alloc_ptr->m_record =
|
||||
@ -277,14 +278,10 @@ class SharedAllocationRecord<Kokkos::Experimental::LogicalMemorySpace<
|
||||
KOKKOS_INLINE_FUNCTION static SharedAllocationRecord* allocate(
|
||||
const SpaceType& arg_space, const std::string& arg_label,
|
||||
const size_t arg_alloc_size) {
|
||||
#if defined(KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST)
|
||||
return new SharedAllocationRecord(arg_space, arg_label, arg_alloc_size);
|
||||
#else
|
||||
(void)arg_space;
|
||||
(void)arg_label;
|
||||
(void)arg_alloc_size;
|
||||
return (SharedAllocationRecord*)nullptr;
|
||||
#endif
|
||||
KOKKOS_IF_ON_HOST((return new SharedAllocationRecord(arg_space, arg_label,
|
||||
arg_alloc_size);))
|
||||
KOKKOS_IF_ON_DEVICE(((void)arg_space; (void)arg_label; (void)arg_alloc_size;
|
||||
return nullptr;))
|
||||
}
|
||||
|
||||
/**\brief Allocate tracked memory in the space */
|
||||
@ -310,6 +307,9 @@ class SharedAllocationRecord<Kokkos::Experimental::LogicalMemorySpace<
|
||||
|
||||
Kokkos::Impl::DeepCopy<SpaceType, SpaceType>(
|
||||
r_new->data(), r_old->data(), std::min(r_old->size(), r_new->size()));
|
||||
Kokkos::fence(
|
||||
"SharedAllocationRecord<Kokkos::Experimental::LogicalMemorySpace, "
|
||||
"void>::reallocate_tracked: fence after copying data");
|
||||
|
||||
RecordBase::increment(r_new);
|
||||
RecordBase::decrement(r_old);
|
||||
|
||||
Reference in New Issue
Block a user