Skip to content

Commit

Permalink
Fix Kokkos view runtime issue
Browse files Browse the repository at this point in the history
  • Loading branch information
stanmoore1 committed Apr 29, 2020
1 parent 7508660 commit 04388c2
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions src/KOKKOS/atom_vec_kokkos.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,7 @@ class AtomVecKokkos : public AtomVec {
buffer = Kokkos::kokkos_realloc<Kokkos::CudaHostPinnedSpace>(buffer,src.span());
buffer_size = src.span();
}
return mirror_type( buffer ,
src.extent(0) ,
src.extent(1) ,
src.extent(2) ,
src.extent(3) ,
src.extent(4) ,
src.extent(5) ,
src.extent(6) ,
src.extent(7) );
return mirror_type(buffer, src.d_view.layout());
}

template<class ViewType>
Expand All @@ -179,15 +171,8 @@ class AtomVecKokkos : public AtomVec {
buffer = Kokkos::kokkos_realloc<Kokkos::CudaHostPinnedSpace>(buffer,src.span()*sizeof(typename ViewType::value_type));
buffer_size = src.span();
}
mirror_type tmp_view( (typename ViewType::value_type*)buffer ,
src.extent(0) ,
src.extent(1) ,
src.extent(2) ,
src.extent(3) ,
src.extent(4) ,
src.extent(5) ,
src.extent(6) ,
src.extent(7) );
mirror_type tmp_view((typename ViewType::value_type*)buffer, src.d_view.layout());

if(space == Device) {
Kokkos::deep_copy(LMPHostType(),tmp_view,src.h_view),
Kokkos::deep_copy(LMPHostType(),src.d_view,tmp_view);
Expand Down

0 comments on commit 04388c2

Please sign in to comment.