diff --git a/src/KOKKOS/atom_vec_kokkos.h b/src/KOKKOS/atom_vec_kokkos.h index 9d267176f1..ff8985096e 100644 --- a/src/KOKKOS/atom_vec_kokkos.h +++ b/src/KOKKOS/atom_vec_kokkos.h @@ -142,28 +142,6 @@ class AtomVecKokkos : virtual public AtomVec { public: #ifdef LMP_KOKKOS_GPU - template - Kokkos::View > - create_async_copy(const ViewType& src) { - typedef Kokkos::View::value, - LMPPinnedHostType,typename ViewType::memory_space>::type, - Kokkos::MemoryTraits > mirror_type; - if (buffer_size == 0) { - buffer = Kokkos::kokkos_malloc(src.span()); - buffer_size = src.span(); - } else if (buffer_size < src.span()) { - buffer = Kokkos::kokkos_realloc(buffer,src.span()); - buffer_size = src.span(); - } - return mirror_type(buffer, src.d_view.layout()); - } - template void perform_async_copy(ViewType& src, unsigned int space) { typedef Kokkos::View::type, Kokkos::MemoryTraits > mirror_type; if (buffer_size == 0) { - buffer = Kokkos::kokkos_malloc(src.span()*sizeof(typename ViewType::value_type)); - buffer_size = src.span(); - } else if (buffer_size < src.span()) { - buffer = Kokkos::kokkos_realloc(buffer,src.span()*sizeof(typename ViewType::value_type)); - buffer_size = src.span(); + buffer_size = src.span() * sizeof(typename ViewType::value_type); + buffer = Kokkos::kokkos_malloc(buffer_size); + } else if (buffer_size < (src.span() * sizeof(typename ViewType::value_type))) { + buffer_size = src.span() * sizeof(typename ViewType::value_type); + buffer = Kokkos::kokkos_realloc(buffer, buffer_size); } mirror_type tmp_view((typename ViewType::value_type*)buffer, src.d_view.layout());