Unverified Commit 2077df54 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

Merge pull request #1363 from stanmoore1/kk_deprecated

Remove deprecated code in KOKKOS package
parents c0ce8591 9cb2a561
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -447,7 +447,7 @@ void AngleCharmmKokkos<DeviceType>::ev_tally(EV_FLOAT &ev, const int i, const in

namespace LAMMPS_NS {
template class AngleCharmmKokkos<LMPDeviceType>;
#ifdef KOKKOS_HAVE_CUDA
#ifdef KOKKOS_ENABLE_CUDA
template class AngleCharmmKokkos<LMPHostType>;
#endif
}
+1 −1
Original line number Diff line number Diff line
@@ -598,7 +598,7 @@ void AngleClass2Kokkos<DeviceType>::ev_tally(EV_FLOAT &ev, const int i, const in

namespace LAMMPS_NS {
template class AngleClass2Kokkos<LMPDeviceType>;
#ifdef KOKKOS_HAVE_CUDA
#ifdef KOKKOS_ENABLE_CUDA
template class AngleClass2Kokkos<LMPHostType>;
#endif
}
+1 −1
Original line number Diff line number Diff line
@@ -387,7 +387,7 @@ void AngleCosineKokkos<DeviceType>::ev_tally(EV_FLOAT &ev, const int i, const in

namespace LAMMPS_NS {
template class AngleCosineKokkos<LMPDeviceType>;
#ifdef KOKKOS_HAVE_CUDA
#ifdef KOKKOS_ENABLE_CUDA
template class AngleCosineKokkos<LMPHostType>;
#endif
}
+1 −1
Original line number Diff line number Diff line
@@ -405,7 +405,7 @@ void AngleHarmonicKokkos<DeviceType>::ev_tally(EV_FLOAT &ev, const int i, const

namespace LAMMPS_NS {
template class AngleHarmonicKokkos<LMPDeviceType>;
#ifdef KOKKOS_HAVE_CUDA
#ifdef KOKKOS_ENABLE_CUDA
template class AngleHarmonicKokkos<LMPHostType>;
#endif
}
+14 −14
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ class AtomVecKokkos : public AtomVec {
  size_t buffer_size;
  void* buffer;

  #ifdef KOKKOS_HAVE_CUDA
  #ifdef KOKKOS_ENABLE_CUDA
  template<class ViewType>
  Kokkos::View<typename ViewType::data_type,
               typename ViewType::array_layout,
@@ -139,11 +139,11 @@ class AtomVecKokkos : public AtomVec {
                   Kokkos::CudaHostPinnedSpace,typename ViewType::memory_space>::type,
                 Kokkos::MemoryTraits<Kokkos::Unmanaged> > mirror_type;
    if (buffer_size == 0) {
       buffer = Kokkos::kokkos_malloc<Kokkos::CudaHostPinnedSpace>(src.capacity());
       buffer_size = src.capacity();
    } else if (buffer_size < src.capacity()) {
       buffer = Kokkos::kokkos_realloc<Kokkos::CudaHostPinnedSpace>(buffer,src.capacity());
       buffer_size = src.capacity();
       buffer = Kokkos::kokkos_malloc<Kokkos::CudaHostPinnedSpace>(src.span());
       buffer_size = src.span();
    } else if (buffer_size < src.span()) {
       buffer = Kokkos::kokkos_realloc<Kokkos::CudaHostPinnedSpace>(buffer,src.span());
       buffer_size = src.span();
    }
    return mirror_type( buffer ,
                             src.extent(0) ,
@@ -157,7 +157,7 @@ class AtomVecKokkos : public AtomVec {
  }

  template<class ViewType>
  void perform_async_copy(const ViewType& src, unsigned int space) {
  void perform_async_copy(ViewType& src, unsigned int space) {
    typedef Kokkos::View<typename ViewType::data_type,
                 typename ViewType::array_layout,
                 typename std::conditional<
@@ -165,11 +165,11 @@ class AtomVecKokkos : public AtomVec {
                   Kokkos::CudaHostPinnedSpace,typename ViewType::memory_space>::type,
                 Kokkos::MemoryTraits<Kokkos::Unmanaged> > mirror_type;
    if (buffer_size == 0) {
       buffer = Kokkos::kokkos_malloc<Kokkos::CudaHostPinnedSpace>(src.capacity()*sizeof(typename ViewType::value_type));
       buffer_size = src.capacity();
    } else if (buffer_size < src.capacity()) {
       buffer = Kokkos::kokkos_realloc<Kokkos::CudaHostPinnedSpace>(buffer,src.capacity()*sizeof(typename ViewType::value_type));
       buffer_size = src.capacity();
       buffer = Kokkos::kokkos_malloc<Kokkos::CudaHostPinnedSpace>(src.span()*sizeof(typename ViewType::value_type));
       buffer_size = src.span();
    } else if (buffer_size < src.span()) {
       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) ,
@@ -183,11 +183,11 @@ class AtomVecKokkos : public AtomVec {
    if(space == Device) {
      Kokkos::deep_copy(LMPHostType(),tmp_view,src.h_view),
      Kokkos::deep_copy(LMPHostType(),src.d_view,tmp_view);
      src.modified_device() = src.modified_host();
      src.clear_sync_state();
    } else {
      Kokkos::deep_copy(LMPHostType(),tmp_view,src.d_view),
      Kokkos::deep_copy(LMPHostType(),src.h_view,tmp_view);
      src.modified_device() = src.modified_host();
      src.clear_sync_state();
    }
  }
  #else
Loading