Skip to content

Commit

Permalink
Merge pull request #4887 from correaa/fix_shmem_memory_algorithm
Browse files Browse the repository at this point in the history
[AFQMC] correct implementation of uninitialized_copy_n for shmem
  • Loading branch information
ye-luo committed Dec 26, 2023
2 parents a131cd3 + f3bb599 commit 86f4220
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -488,13 +488,12 @@ It2 uninitialized_copy_n(shm_ptr_with_raw_ptr_dispatch<T> f, Size n, It2 d)
f.wSP_->fence();
using std::uninitialized_copy_n;
if (f.wSP_->get_group().root())
uninitialized_copy_n(f, n, to_address(d));
uninitialized_copy_n(to_address(f), n, to_address(d));
f.wSP_->fence();
mpi3::communicator(f.wSP_->get_group(), 0).barrier();
return d + n;
}


template<class Alloc, class It1, class Size, typename T>
shm_ptr_with_raw_ptr_dispatch<T> uninitialized_copy_n(Alloc& a, It1 f, Size n, shm_ptr_with_raw_ptr_dispatch<T> d)
{
Expand Down

0 comments on commit 86f4220

Please sign in to comment.