From d3b48a9346ca2eb0953ed927885807abc91ca0f9 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Sat, 22 Apr 2023 16:06:40 -0600 Subject: [PATCH] kokkos: use std::enable_if_t and std::is_same_v --- src/KOKKOS/atom_kokkos.h | 16 ++++++++-------- src/KOKKOS/atom_vec_kokkos.h | 4 ++-- src/KOKKOS/compute_ave_sphere_atom_kokkos.cpp | 6 +++--- src/KOKKOS/compute_coord_atom_kokkos.cpp | 6 +++--- src/KOKKOS/compute_orientorder_atom_kokkos.cpp | 6 +++--- src/KOKKOS/dynamical_matrix_kokkos.cpp | 2 +- src/KOKKOS/fix_acks2_reaxff_kokkos.cpp | 6 +++--- src/KOKKOS/fix_qeq_reaxff_kokkos.cpp | 6 +++--- src/KOKKOS/fix_rx_kokkos.cpp | 6 +++--- src/KOKKOS/fix_shake_kokkos.cpp | 2 +- src/KOKKOS/fix_shardlow_kokkos.cpp | 6 +++--- src/KOKKOS/kokkos.h | 2 +- src/KOKKOS/kokkos_type.h | 4 ++-- src/KOKKOS/mliap_model_python_kokkos.cpp | 2 +- src/KOKKOS/pair_adp_kokkos.cpp | 6 +++--- src/KOKKOS/pair_buck_coul_cut_kokkos.cpp | 6 +++--- src/KOKKOS/pair_buck_coul_long_kokkos.cpp | 6 +++--- src/KOKKOS/pair_buck_kokkos.cpp | 6 +++--- src/KOKKOS/pair_coul_cut_kokkos.cpp | 6 +++--- src/KOKKOS/pair_coul_debye_kokkos.cpp | 6 +++--- src/KOKKOS/pair_coul_dsf_kokkos.cpp | 6 +++--- src/KOKKOS/pair_coul_long_kokkos.cpp | 6 +++--- src/KOKKOS/pair_coul_wolf_kokkos.cpp | 6 +++--- src/KOKKOS/pair_dpd_ext_kokkos.cpp | 6 +++--- src/KOKKOS/pair_dpd_ext_tstat_kokkos.cpp | 6 +++--- src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp | 6 +++--- src/KOKKOS/pair_dpd_kokkos.cpp | 6 +++--- src/KOKKOS/pair_dpd_tstat_kokkos.cpp | 6 +++--- src/KOKKOS/pair_eam_alloy_kokkos.cpp | 6 +++--- src/KOKKOS/pair_eam_fs_kokkos.cpp | 6 +++--- src/KOKKOS/pair_eam_kokkos.cpp | 6 +++--- src/KOKKOS/pair_exp6_rx_kokkos.cpp | 6 +++--- src/KOKKOS/pair_gran_hooke_history_kokkos.cpp | 6 +++--- src/KOKKOS/pair_kokkos.h | 4 ++-- ...air_lj_charmm_coul_charmm_implicit_kokkos.cpp | 6 +++--- src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp | 6 +++--- src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp | 6 +++--- src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp | 6 +++--- src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp | 6 +++--- src/KOKKOS/pair_lj_class2_kokkos.cpp | 6 +++--- src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp | 6 +++--- src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp | 6 +++--- src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp | 6 +++--- src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp | 6 +++--- src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp | 6 +++--- src/KOKKOS/pair_lj_cut_kokkos.cpp | 6 +++--- src/KOKKOS/pair_lj_expand_coul_long_kokkos.cpp | 6 +++--- src/KOKKOS/pair_lj_expand_kokkos.cpp | 6 +++--- .../pair_lj_gromacs_coul_gromacs_kokkos.cpp | 6 +++--- src/KOKKOS/pair_lj_gromacs_kokkos.cpp | 6 +++--- src/KOKKOS/pair_lj_spica_kokkos.cpp | 6 +++--- src/KOKKOS/pair_meam_kokkos.cpp | 12 ++++++------ src/KOKKOS/pair_mliap_kokkos.cpp | 6 +++--- src/KOKKOS/pair_morse_kokkos.cpp | 6 +++--- src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp | 6 +++--- src/KOKKOS/pair_pace_extrapolation_kokkos.cpp | 6 +++--- src/KOKKOS/pair_pace_kokkos.cpp | 6 +++--- src/KOKKOS/pair_reaxff_kokkos.cpp | 6 +++--- src/KOKKOS/pair_snap_kokkos_impl.h | 6 +++--- src/KOKKOS/pair_sw_kokkos.cpp | 6 +++--- src/KOKKOS/pair_table_kokkos.cpp | 6 +++--- src/KOKKOS/pair_table_rx_kokkos.cpp | 6 +++--- src/KOKKOS/pair_tersoff_kokkos.cpp | 6 +++--- src/KOKKOS/pair_tersoff_mod_kokkos.cpp | 6 +++--- src/KOKKOS/pair_tersoff_zbl_kokkos.cpp | 6 +++--- src/KOKKOS/pair_vashishta_kokkos.cpp | 6 +++--- src/KOKKOS/pair_yukawa_kokkos.cpp | 6 +++--- src/KOKKOS/pair_zbl_kokkos.cpp | 6 +++--- src/KOKKOS/third_order_kokkos.cpp | 2 +- src/KOKKOS/transpose_helper_kokkos.h | 6 +++--- 70 files changed, 205 insertions(+), 205 deletions(-) diff --git a/src/KOKKOS/atom_kokkos.h b/src/KOKKOS/atom_kokkos.h index 8d2ae47f0e..bd6f6413ca 100644 --- a/src/KOKKOS/atom_kokkos.h +++ b/src/KOKKOS/atom_kokkos.h @@ -128,32 +128,32 @@ struct SortFunctor { ViewType source; Kokkos::View dest; IndexView index; - SortFunctor(ViewType src, typename std::enable_if::type ind):source(src),index(ind) { + SortFunctor(ViewType src, std::enable_if_t ind):source(src),index(ind) { dest = Kokkos::View("",src.extent(0)); } - SortFunctor(ViewType src, typename std::enable_if::type ind):source(src),index(ind) { + SortFunctor(ViewType src, std::enable_if_t ind):source(src),index(ind) { dest = Kokkos::View("",src.extent(0),src.extent(1)); } - SortFunctor(ViewType src, typename std::enable_if::type ind):source(src),index(ind) { + SortFunctor(ViewType src, std::enable_if_t ind):source(src),index(ind) { dest = Kokkos::View("",src.extent(0),src.extent(1),src.extent(2)); } - SortFunctor(ViewType src, typename std::enable_if::type ind):source(src),index(ind) { + SortFunctor(ViewType src, std::enable_if_t ind):source(src),index(ind) { dest = Kokkos::View("",src.extent(0),src.extent(1),src.extent(2),src.extent(3)); } KOKKOS_INLINE_FUNCTION - void operator()(const typename std::enable_if::type& i) { + void operator()(const std::enable_if_t& i) { dest(i) = source(index(i)); } - void operator()(const typename std::enable_if::type& i) { + void operator()(const std::enable_if_t& i) { for (int j=0; j < (int)source.extent(1); j++) dest(i,j) = source(index(i),j); } - void operator()(const typename std::enable_if::type& i) { + void operator()(const std::enable_if_t& i) { for (int j=0; j < (int)source.extent(1); j++) for (int k=0; k < (int)source.extent(2); k++) dest(i,j,k) = source(index(i),j,k); } - void operator()(const typename std::enable_if::type& i) { + void operator()(const std::enable_if_t& i) { for (int j=0; j < (int)source.extent(1); j++) for (int k=0; k < (int)source.extent(2); k++) for (int l=0; l < (int)source.extent(3); l++) diff --git a/src/KOKKOS/atom_vec_kokkos.h b/src/KOKKOS/atom_vec_kokkos.h index b7047ad38b..c706ddb60c 100644 --- a/src/KOKKOS/atom_vec_kokkos.h +++ b/src/KOKKOS/atom_vec_kokkos.h @@ -140,7 +140,7 @@ class AtomVecKokkos : virtual public AtomVec { typedef Kokkos::View::value, + std::is_same_v, LMPPinnedHostType,typename ViewType::memory_space>::type, Kokkos::MemoryTraits > mirror_type; if (buffer_size == 0) { @@ -158,7 +158,7 @@ class AtomVecKokkos : virtual public AtomVec { typedef Kokkos::View::value, + std::is_same_v, LMPPinnedHostType,typename ViewType::memory_space>::type, Kokkos::MemoryTraits > mirror_type; if (buffer_size == 0) { diff --git a/src/KOKKOS/compute_ave_sphere_atom_kokkos.cpp b/src/KOKKOS/compute_ave_sphere_atom_kokkos.cpp index 8049dafee7..87fe3621e4 100644 --- a/src/KOKKOS/compute_ave_sphere_atom_kokkos.cpp +++ b/src/KOKKOS/compute_ave_sphere_atom_kokkos.cpp @@ -69,9 +69,9 @@ void ComputeAveSphereAtomKokkos::init() // adjust neighbor list request for KOKKOS auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); } /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/compute_coord_atom_kokkos.cpp b/src/KOKKOS/compute_coord_atom_kokkos.cpp index 713f4f7361..089a94f498 100644 --- a/src/KOKKOS/compute_coord_atom_kokkos.cpp +++ b/src/KOKKOS/compute_coord_atom_kokkos.cpp @@ -77,9 +77,9 @@ void ComputeCoordAtomKokkos::init() // adjust neighbor list request for KOKKOS auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); } /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/compute_orientorder_atom_kokkos.cpp b/src/KOKKOS/compute_orientorder_atom_kokkos.cpp index 157d41126f..1460069512 100644 --- a/src/KOKKOS/compute_orientorder_atom_kokkos.cpp +++ b/src/KOKKOS/compute_orientorder_atom_kokkos.cpp @@ -103,9 +103,9 @@ void ComputeOrientOrderAtomKokkos::init() // need an occasional full neighbor list auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); } /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/dynamical_matrix_kokkos.cpp b/src/KOKKOS/dynamical_matrix_kokkos.cpp index 48fe02258b..32986025e6 100644 --- a/src/KOKKOS/dynamical_matrix_kokkos.cpp +++ b/src/KOKKOS/dynamical_matrix_kokkos.cpp @@ -290,7 +290,7 @@ void DynamicalMatrixKokkos::update_force() timer->stamp(Timer::KSPACE); } - if (execute_on_host && !std::is_same::value) { + if (execute_on_host && !std::is_same_v) { if (f_merge_copy.extent(0)k_f.extent(0)) { f_merge_copy = DAT::t_f_array("DynamicalMatrixKokkos::f_merge_copy",atomKK->k_f.extent(0)); } diff --git a/src/KOKKOS/fix_acks2_reaxff_kokkos.cpp b/src/KOKKOS/fix_acks2_reaxff_kokkos.cpp index 3a2447461e..52c69624db 100644 --- a/src/KOKKOS/fix_acks2_reaxff_kokkos.cpp +++ b/src/KOKKOS/fix_acks2_reaxff_kokkos.cpp @@ -100,9 +100,9 @@ void FixACKS2ReaxFFKokkos::init() neighflag = lmp->kokkos->neighflag_qeq; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); int ntypes = atom->ntypes; diff --git a/src/KOKKOS/fix_qeq_reaxff_kokkos.cpp b/src/KOKKOS/fix_qeq_reaxff_kokkos.cpp index 386dba6d1d..b7e8bda4ed 100644 --- a/src/KOKKOS/fix_qeq_reaxff_kokkos.cpp +++ b/src/KOKKOS/fix_qeq_reaxff_kokkos.cpp @@ -102,9 +102,9 @@ void FixQEqReaxFFKokkos::init() neighflag = lmp->kokkos->neighflag_qeq; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); int ntypes = atom->ntypes; diff --git a/src/KOKKOS/fix_rx_kokkos.cpp b/src/KOKKOS/fix_rx_kokkos.cpp index ac1821e142..0ba56c611e 100644 --- a/src/KOKKOS/fix_rx_kokkos.cpp +++ b/src/KOKKOS/fix_rx_kokkos.cpp @@ -130,9 +130,9 @@ void FixRxKokkos::init() // built whenever re-neighboring occurs auto request = neighbor->add_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (lmp->kokkos->neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/fix_shake_kokkos.cpp b/src/KOKKOS/fix_shake_kokkos.cpp index 109b1c69b5..47362bee83 100644 --- a/src/KOKKOS/fix_shake_kokkos.cpp +++ b/src/KOKKOS/fix_shake_kokkos.cpp @@ -383,7 +383,7 @@ void FixShakeKokkos::post_force(int vflag) need_dup = 0; if (neighflag != HALF) - need_dup = std::is_same::value,Kokkos::Experimental::ScatterDuplicated>::value; + need_dup = std::is_same_v::value,Kokkos::Experimental::ScatterDuplicated>; // allocate duplicated memory diff --git a/src/KOKKOS/fix_shardlow_kokkos.cpp b/src/KOKKOS/fix_shardlow_kokkos.cpp index 13015d4cbb..37ffd15cdf 100644 --- a/src/KOKKOS/fix_shardlow_kokkos.cpp +++ b/src/KOKKOS/fix_shardlow_kokkos.cpp @@ -128,9 +128,9 @@ void FixShardlowKokkos::init() // adjust neighbor list request for KOKKOS auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); int ntypes = atom->ntypes; k_params = Kokkos::DualView diff --git a/src/KOKKOS/kokkos.h b/src/KOKKOS/kokkos.h index 08b6730e50..4f7e93257e 100644 --- a/src/KOKKOS/kokkos.h +++ b/src/KOKKOS/kokkos.h @@ -70,7 +70,7 @@ class KokkosLMP : protected Pointers { if (qeq_flag) neighflag = this->neighflag_qeq; if (neighflag == HALFTHREAD) - value = std::is_same::value,Kokkos::Experimental::ScatterDuplicated>::value; + value = std::is_same_v::value,Kokkos::Experimental::ScatterDuplicated>; return value; } diff --git a/src/KOKKOS/kokkos_type.h b/src/KOKKOS/kokkos_type.h index 06a6d3fc6e..605c569c00 100644 --- a/src/KOKKOS/kokkos_type.h +++ b/src/KOKKOS/kokkos_type.h @@ -514,11 +514,11 @@ struct dual_hash_type { template KOKKOS_INLINE_FUNCTION - std::enable_if_t<(std::is_same::value || Kokkos::SpaceAccessibility::accessible),hash_type&> view() {return d_view;} + std::enable_if_t<(std::is_same_v || Kokkos::SpaceAccessibility::accessible),hash_type&> view() {return d_view;} template KOKKOS_INLINE_FUNCTION - std::enable_if_t::value || Kokkos::SpaceAccessibility::accessible),host_hash_type&> view() {return h_view;} + std::enable_if_t || Kokkos::SpaceAccessibility::accessible),host_hash_type&> view() {return h_view;} }; diff --git a/src/KOKKOS/mliap_model_python_kokkos.cpp b/src/KOKKOS/mliap_model_python_kokkos.cpp index 6bfc58057c..ba500f5e1f 100644 --- a/src/KOKKOS/mliap_model_python_kokkos.cpp +++ b/src/KOKKOS/mliap_model_python_kokkos.cpp @@ -43,7 +43,7 @@ MLIAPModelPythonKokkos::MLIAPModelPythonKokkos(LAMMPS *lmp, char *co MLIAPModelPython(lmp,coefffilename,true), MLIAPModelKokkos(lmp, this) { - if (!std::is_same::value ) + if (!std::is_same_v ) MLIAPModelKokkos::error->all(FLERR, "MLIAP Kokkos version of the python interface is ONLY available on device"); model_loaded = 0; diff --git a/src/KOKKOS/pair_adp_kokkos.cpp b/src/KOKKOS/pair_adp_kokkos.cpp index 3873f1e31b..c7735642a6 100644 --- a/src/KOKKOS/pair_adp_kokkos.cpp +++ b/src/KOKKOS/pair_adp_kokkos.cpp @@ -321,9 +321,9 @@ void PairADPKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp b/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp index 39bdc255f5..a859b232be 100644 --- a/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp @@ -289,9 +289,9 @@ void PairBuckCoulCutKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_buck_coul_long_kokkos.cpp b/src/KOKKOS/pair_buck_coul_long_kokkos.cpp index 34e42be775..2f1d4a79b2 100644 --- a/src/KOKKOS/pair_buck_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_buck_coul_long_kokkos.cpp @@ -436,9 +436,9 @@ void PairBuckCoulLongKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_buck_kokkos.cpp b/src/KOKKOS/pair_buck_kokkos.cpp index 8e69536b38..b549fcd329 100644 --- a/src/KOKKOS/pair_buck_kokkos.cpp +++ b/src/KOKKOS/pair_buck_kokkos.cpp @@ -212,9 +212,9 @@ void PairBuckKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_coul_cut_kokkos.cpp b/src/KOKKOS/pair_coul_cut_kokkos.cpp index d2739f53ce..283a4b2b69 100644 --- a/src/KOKKOS/pair_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_coul_cut_kokkos.cpp @@ -212,9 +212,9 @@ void PairCoulCutKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_coul_debye_kokkos.cpp b/src/KOKKOS/pair_coul_debye_kokkos.cpp index 9930a4f3f1..4c0e610e89 100644 --- a/src/KOKKOS/pair_coul_debye_kokkos.cpp +++ b/src/KOKKOS/pair_coul_debye_kokkos.cpp @@ -246,9 +246,9 @@ void PairCoulDebyeKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_coul_dsf_kokkos.cpp b/src/KOKKOS/pair_coul_dsf_kokkos.cpp index 6b0818251d..da4c7b1b4c 100644 --- a/src/KOKKOS/pair_coul_dsf_kokkos.cpp +++ b/src/KOKKOS/pair_coul_dsf_kokkos.cpp @@ -204,9 +204,9 @@ void PairCoulDSFKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_coul_long_kokkos.cpp b/src/KOKKOS/pair_coul_long_kokkos.cpp index ac52e95bad..ed9b4c31c1 100644 --- a/src/KOKKOS/pair_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_coul_long_kokkos.cpp @@ -400,9 +400,9 @@ void PairCoulLongKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_coul_wolf_kokkos.cpp b/src/KOKKOS/pair_coul_wolf_kokkos.cpp index 2bac3cfb9a..2ccf7a5a15 100644 --- a/src/KOKKOS/pair_coul_wolf_kokkos.cpp +++ b/src/KOKKOS/pair_coul_wolf_kokkos.cpp @@ -202,9 +202,9 @@ void PairCoulWolfKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_dpd_ext_kokkos.cpp b/src/KOKKOS/pair_dpd_ext_kokkos.cpp index 9b0dd23ad6..7264877d70 100644 --- a/src/KOKKOS/pair_dpd_ext_kokkos.cpp +++ b/src/KOKKOS/pair_dpd_ext_kokkos.cpp @@ -95,9 +95,9 @@ void PairDPDExtKokkos::init_style() error->all(FLERR,"Must use half neighbor list style and newton on with pair dpd/ext/kk"); auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); } /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/pair_dpd_ext_tstat_kokkos.cpp b/src/KOKKOS/pair_dpd_ext_tstat_kokkos.cpp index 3d832e13f1..dcf88d1763 100644 --- a/src/KOKKOS/pair_dpd_ext_tstat_kokkos.cpp +++ b/src/KOKKOS/pair_dpd_ext_tstat_kokkos.cpp @@ -94,9 +94,9 @@ void PairDPDExtTstatKokkos::init_style() error->all(FLERR,"Must use half neighbor list style and newton on with pair dpd/ext/kk"); auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); } /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp b/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp index 2cd7503ba5..a0ee204aeb 100644 --- a/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp +++ b/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp @@ -89,9 +89,9 @@ void PairDPDfdtEnergyKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); #ifdef DPD_USE_RAN_MARS diff --git a/src/KOKKOS/pair_dpd_kokkos.cpp b/src/KOKKOS/pair_dpd_kokkos.cpp index 725982b518..3db8a06f6d 100644 --- a/src/KOKKOS/pair_dpd_kokkos.cpp +++ b/src/KOKKOS/pair_dpd_kokkos.cpp @@ -95,9 +95,9 @@ void PairDPDKokkos::init_style() error->all(FLERR,"Must use half neighbor list style and newton on with pair dpd/kk"); auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); } /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/pair_dpd_tstat_kokkos.cpp b/src/KOKKOS/pair_dpd_tstat_kokkos.cpp index 746e13a4ba..9058c23628 100644 --- a/src/KOKKOS/pair_dpd_tstat_kokkos.cpp +++ b/src/KOKKOS/pair_dpd_tstat_kokkos.cpp @@ -94,9 +94,9 @@ void PairDPDTstatKokkos::init_style() error->all(FLERR,"Must use half neighbor list style and newton on with pair dpd/kk"); auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); } /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/pair_eam_alloy_kokkos.cpp b/src/KOKKOS/pair_eam_alloy_kokkos.cpp index e14b78a36f..d44d4f5d85 100644 --- a/src/KOKKOS/pair_eam_alloy_kokkos.cpp +++ b/src/KOKKOS/pair_eam_alloy_kokkos.cpp @@ -302,9 +302,9 @@ void PairEAMAlloyKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_eam_fs_kokkos.cpp b/src/KOKKOS/pair_eam_fs_kokkos.cpp index 811b80e3a0..e11c7c7d2d 100644 --- a/src/KOKKOS/pair_eam_fs_kokkos.cpp +++ b/src/KOKKOS/pair_eam_fs_kokkos.cpp @@ -302,9 +302,9 @@ void PairEAMFSKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_eam_kokkos.cpp b/src/KOKKOS/pair_eam_kokkos.cpp index 6e1cd1feea..a82e821c7f 100644 --- a/src/KOKKOS/pair_eam_kokkos.cpp +++ b/src/KOKKOS/pair_eam_kokkos.cpp @@ -297,9 +297,9 @@ void PairEAMKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_exp6_rx_kokkos.cpp b/src/KOKKOS/pair_exp6_rx_kokkos.cpp index f8e51bc4cc..b4576db89a 100644 --- a/src/KOKKOS/pair_exp6_rx_kokkos.cpp +++ b/src/KOKKOS/pair_exp6_rx_kokkos.cpp @@ -103,9 +103,9 @@ void PairExp6rxKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_gran_hooke_history_kokkos.cpp b/src/KOKKOS/pair_gran_hooke_history_kokkos.cpp index 2cfbbf0ee7..2e7cf1364a 100644 --- a/src/KOKKOS/pair_gran_hooke_history_kokkos.cpp +++ b/src/KOKKOS/pair_gran_hooke_history_kokkos.cpp @@ -85,9 +85,9 @@ void PairGranHookeHistoryKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) error->all(FLERR,"Must use half neighbor list with gran/hooke/history/kk"); } diff --git a/src/KOKKOS/pair_kokkos.h b/src/KOKKOS/pair_kokkos.h index 0ff244f67d..a0773c0383 100644 --- a/src/KOKKOS/pair_kokkos.h +++ b/src/KOKKOS/pair_kokkos.h @@ -705,7 +705,7 @@ struct PairComputeFunctor { // pair_compute_neighlist will match - either the dummy version // or the real one further below. template -EV_FLOAT pair_compute_neighlist (PairStyle* fpair, typename std::enable_if*>::type list) { +EV_FLOAT pair_compute_neighlist (PairStyle* fpair, std::enable_if_t*> list) { EV_FLOAT ev; (void) fpair; (void) list; @@ -735,7 +735,7 @@ int GetTeamSize(FunctorStyle& KOKKOS_GPU_ARG(functor), int KOKKOS_GPU_ARG(inum), // Submit ParallelFor for NEIGHFLAG=HALF,HALFTHREAD,FULL template -EV_FLOAT pair_compute_neighlist (PairStyle* fpair, typename std::enable_if<(NEIGHFLAG&PairStyle::EnabledNeighFlags) != 0, NeighListKokkos*>::type list) { +EV_FLOAT pair_compute_neighlist (PairStyle* fpair, std::enable_if_t<(NEIGHFLAG&PairStyle::EnabledNeighFlags) != 0, NeighListKokkos*> list) { EV_FLOAT ev; if (!fpair->lmp->kokkos->neigh_thread_set) diff --git a/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp b/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp index d9edbbbf6b..f8fb7cdda4 100644 --- a/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp +++ b/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp @@ -435,9 +435,9 @@ void PairLJCharmmCoulCharmmImplicitKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp b/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp index 41a6214938..526e15c222 100644 --- a/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp +++ b/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp @@ -436,9 +436,9 @@ void PairLJCharmmCoulCharmmKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp index 6d6a94dcda..4caab0ef55 100644 --- a/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp @@ -444,9 +444,9 @@ void PairLJCharmmCoulLongKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp b/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp index 8abcd374a1..7d2db17440 100644 --- a/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp @@ -286,9 +286,9 @@ void PairLJClass2CoulCutKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp index 6fd9804b0b..e861d1cec2 100644 --- a/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp @@ -444,9 +444,9 @@ void PairLJClass2CoulLongKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_lj_class2_kokkos.cpp b/src/KOKKOS/pair_lj_class2_kokkos.cpp index d37a190b6c..9ee1b93bd8 100644 --- a/src/KOKKOS/pair_lj_class2_kokkos.cpp +++ b/src/KOKKOS/pair_lj_class2_kokkos.cpp @@ -224,9 +224,9 @@ void PairLJClass2Kokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp index 0df93fb73f..7c61c684e4 100644 --- a/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp @@ -277,9 +277,9 @@ void PairLJCutCoulCutKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp index a9991c03f3..d553aee864 100644 --- a/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp @@ -306,9 +306,9 @@ void PairLJCutCoulDebyeKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp index 113e97c0c9..bd430db764 100644 --- a/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp @@ -301,9 +301,9 @@ void PairLJCutCoulDSFKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp index ba0904fa95..ce2bf480d8 100644 --- a/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp @@ -437,9 +437,9 @@ void PairLJCutCoulLongKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp b/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp index c7532b27ab..633151522f 100644 --- a/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp @@ -582,9 +582,9 @@ void PairLJCutDipoleCutKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_lj_cut_kokkos.cpp b/src/KOKKOS/pair_lj_cut_kokkos.cpp index 6896967563..9a1ced9da3 100644 --- a/src/KOKKOS/pair_lj_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_kokkos.cpp @@ -216,9 +216,9 @@ void PairLJCutKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_lj_expand_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_expand_coul_long_kokkos.cpp index fe87612cbf..acb1cf253e 100644 --- a/src/KOKKOS/pair_lj_expand_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_expand_coul_long_kokkos.cpp @@ -447,9 +447,9 @@ void PairLJExpandCoulLongKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_lj_expand_kokkos.cpp b/src/KOKKOS/pair_lj_expand_kokkos.cpp index ecdb3a7b22..63b94edbf9 100644 --- a/src/KOKKOS/pair_lj_expand_kokkos.cpp +++ b/src/KOKKOS/pair_lj_expand_kokkos.cpp @@ -228,9 +228,9 @@ void PairLJExpandKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp b/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp index 6b4aae7945..c125a28f07 100644 --- a/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp +++ b/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp @@ -421,9 +421,9 @@ void PairLJGromacsCoulGromacsKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_lj_gromacs_kokkos.cpp b/src/KOKKOS/pair_lj_gromacs_kokkos.cpp index 5f209037b7..132b6793df 100644 --- a/src/KOKKOS/pair_lj_gromacs_kokkos.cpp +++ b/src/KOKKOS/pair_lj_gromacs_kokkos.cpp @@ -264,9 +264,9 @@ void PairLJGromacsKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_lj_spica_kokkos.cpp b/src/KOKKOS/pair_lj_spica_kokkos.cpp index 345c18bd30..a6a31b31a2 100644 --- a/src/KOKKOS/pair_lj_spica_kokkos.cpp +++ b/src/KOKKOS/pair_lj_spica_kokkos.cpp @@ -266,9 +266,9 @@ void PairLJSPICAKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_meam_kokkos.cpp b/src/KOKKOS/pair_meam_kokkos.cpp index c2b03c2054..51c3fc4279 100644 --- a/src/KOKKOS/pair_meam_kokkos.cpp +++ b/src/KOKKOS/pair_meam_kokkos.cpp @@ -322,14 +322,14 @@ void PairMEAMKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this,1); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); request = neighbor->find_request(this,2); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) error->all(FLERR,"Must use half neighbor list style with pair meam/kk"); diff --git a/src/KOKKOS/pair_mliap_kokkos.cpp b/src/KOKKOS/pair_mliap_kokkos.cpp index d19d81e314..e293c3efc5 100644 --- a/src/KOKKOS/pair_mliap_kokkos.cpp +++ b/src/KOKKOS/pair_mliap_kokkos.cpp @@ -315,9 +315,9 @@ void PairMLIAPKokkos::init_style() PairMLIAP::init_style(); auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); } /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/pair_morse_kokkos.cpp b/src/KOKKOS/pair_morse_kokkos.cpp index 50df64e3ca..f0a5415d60 100644 --- a/src/KOKKOS/pair_morse_kokkos.cpp +++ b/src/KOKKOS/pair_morse_kokkos.cpp @@ -231,9 +231,9 @@ void PairMorseKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp b/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp index 9ca86c3e95..f487b0c84e 100644 --- a/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp +++ b/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp @@ -102,9 +102,9 @@ void PairMultiLucyRXKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_pace_extrapolation_kokkos.cpp b/src/KOKKOS/pair_pace_extrapolation_kokkos.cpp index 751ef045f7..7eaf574241 100644 --- a/src/KOKKOS/pair_pace_extrapolation_kokkos.cpp +++ b/src/KOKKOS/pair_pace_extrapolation_kokkos.cpp @@ -440,9 +440,9 @@ void PairPACEExtrapolationKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->add_request(this, NeighConst::REQ_FULL); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) error->all(FLERR,"Must use half neighbor list style with pair pace/kk"); diff --git a/src/KOKKOS/pair_pace_kokkos.cpp b/src/KOKKOS/pair_pace_kokkos.cpp index 6f1e3feaf8..aa9bd4e7d5 100644 --- a/src/KOKKOS/pair_pace_kokkos.cpp +++ b/src/KOKKOS/pair_pace_kokkos.cpp @@ -403,9 +403,9 @@ void PairPACEKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->add_request(this, NeighConst::REQ_FULL); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) error->all(FLERR,"Must use half neighbor list style with pair pace/kk"); diff --git a/src/KOKKOS/pair_reaxff_kokkos.cpp b/src/KOKKOS/pair_reaxff_kokkos.cpp index 273430fd63..1ebc3c8a17 100644 --- a/src/KOKKOS/pair_reaxff_kokkos.cpp +++ b/src/KOKKOS/pair_reaxff_kokkos.cpp @@ -180,9 +180,9 @@ void PairReaxFFKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) error->all(FLERR,"Must use half neighbor list with pair style reaxff/kk"); diff --git a/src/KOKKOS/pair_snap_kokkos_impl.h b/src/KOKKOS/pair_snap_kokkos_impl.h index 45bacb4c97..91f432dbaf 100644 --- a/src/KOKKOS/pair_snap_kokkos_impl.h +++ b/src/KOKKOS/pair_snap_kokkos_impl.h @@ -106,9 +106,9 @@ void PairSNAPKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->add_request(this, NeighConst::REQ_FULL); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) error->all(FLERR,"Must use half neighbor list style with pair snap/kk"); } diff --git a/src/KOKKOS/pair_sw_kokkos.cpp b/src/KOKKOS/pair_sw_kokkos.cpp index db7320623d..93b3919795 100644 --- a/src/KOKKOS/pair_sw_kokkos.cpp +++ b/src/KOKKOS/pair_sw_kokkos.cpp @@ -402,9 +402,9 @@ void PairSWKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) error->all(FLERR,"Must use half neighbor list style with pair sw/kk"); diff --git a/src/KOKKOS/pair_table_kokkos.cpp b/src/KOKKOS/pair_table_kokkos.cpp index b1514c8c6f..83bd74d4af 100644 --- a/src/KOKKOS/pair_table_kokkos.cpp +++ b/src/KOKKOS/pair_table_kokkos.cpp @@ -514,9 +514,9 @@ void PairTableKokkos::init_style() { neighflag = lmp->kokkos->neighflag; auto request = neighbor->add_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_table_rx_kokkos.cpp b/src/KOKKOS/pair_table_rx_kokkos.cpp index fee6aa8d18..517c408945 100644 --- a/src/KOKKOS/pair_table_rx_kokkos.cpp +++ b/src/KOKKOS/pair_table_rx_kokkos.cpp @@ -1267,9 +1267,9 @@ void PairTableRXKokkos::init_style() { neighflag = lmp->kokkos->neighflag; auto request = neighbor->add_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_tersoff_kokkos.cpp b/src/KOKKOS/pair_tersoff_kokkos.cpp index cae17102a8..e860b0232d 100644 --- a/src/KOKKOS/pair_tersoff_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_kokkos.cpp @@ -123,9 +123,9 @@ void PairTersoffKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) error->all(FLERR,"Must use half neighbor list style with pair tersoff/kk"); diff --git a/src/KOKKOS/pair_tersoff_mod_kokkos.cpp b/src/KOKKOS/pair_tersoff_mod_kokkos.cpp index 06ef0dcceb..02a51af3d7 100644 --- a/src/KOKKOS/pair_tersoff_mod_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_mod_kokkos.cpp @@ -113,9 +113,9 @@ void PairTersoffMODKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) error->all(FLERR,"Must use half neighbor list style with pair tersoff/kk"); diff --git a/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp b/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp index accbe9a863..8bad880a4f 100644 --- a/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp @@ -126,9 +126,9 @@ void PairTersoffZBLKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) error->all(FLERR,"Must use half neighbor list style with pair tersoff/kk"); diff --git a/src/KOKKOS/pair_vashishta_kokkos.cpp b/src/KOKKOS/pair_vashishta_kokkos.cpp index 0bb2b49ece..8400807ec6 100644 --- a/src/KOKKOS/pair_vashishta_kokkos.cpp +++ b/src/KOKKOS/pair_vashishta_kokkos.cpp @@ -583,9 +583,9 @@ void PairVashishtaKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); request->enable_full(); if (neighflag == FULL) request->enable_ghost(); } diff --git a/src/KOKKOS/pair_yukawa_kokkos.cpp b/src/KOKKOS/pair_yukawa_kokkos.cpp index 7bdb9a9617..e51170e195 100644 --- a/src/KOKKOS/pair_yukawa_kokkos.cpp +++ b/src/KOKKOS/pair_yukawa_kokkos.cpp @@ -105,9 +105,9 @@ void PairYukawaKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/pair_zbl_kokkos.cpp b/src/KOKKOS/pair_zbl_kokkos.cpp index 4303687939..e2467ebe95 100644 --- a/src/KOKKOS/pair_zbl_kokkos.cpp +++ b/src/KOKKOS/pair_zbl_kokkos.cpp @@ -94,9 +94,9 @@ void PairZBLKokkos::init_style() neighflag = lmp->kokkos->neighflag; auto request = neighbor->find_request(this); - request->set_kokkos_host(std::is_same::value && - !std::is_same::value); - request->set_kokkos_device(std::is_same::value); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); if (neighflag == FULL) request->enable_full(); } diff --git a/src/KOKKOS/third_order_kokkos.cpp b/src/KOKKOS/third_order_kokkos.cpp index 933b3f66b9..6208aa966a 100644 --- a/src/KOKKOS/third_order_kokkos.cpp +++ b/src/KOKKOS/third_order_kokkos.cpp @@ -290,7 +290,7 @@ void ThirdOrderKokkos::update_force() timer->stamp(Timer::KSPACE); } - if (execute_on_host && !std::is_same::value) { + if (execute_on_host && !std::is_same_v) { if (f_merge_copy.extent(0)k_f.extent(0)) { f_merge_copy = DAT::t_f_array("ThirdOrderKokkos::f_merge_copy",atomKK->k_f.extent(0)); } diff --git a/src/KOKKOS/transpose_helper_kokkos.h b/src/KOKKOS/transpose_helper_kokkos.h index 3b84873b6b..b09639c451 100644 --- a/src/KOKKOS/transpose_helper_kokkos.h +++ b/src/KOKKOS/transpose_helper_kokkos.h @@ -32,7 +32,7 @@ struct TransposeHelperKokkos { using t_view_dst = t_view_dst_; using t_view_src = t_view_src_; - static_assert(std::is_same::value, "Value types do not match"); + static_assert(std::is_same_v, "Value types do not match"); static_assert(t_view_dst::Rank == 2, "Destination view rank != 2"); static_assert(t_view_src::Rank == 2, "Source view rank != 2"); @@ -78,11 +78,11 @@ struct TransposeHelperKokkos { assert(d_dst.extent(0) == d_src.extent(0) && d_dst.extent(1) == d_dst.extent(1)); - if (std::is_same::value) { + if (std::is_same_v) { Kokkos::deep_copy(d_dst, d_src); } else { - src_is_layout_right = std::is_same::value; + src_is_layout_right = std::is_same_v; extent_tiles[0] = (d_dst.extent(0) + tile_size - 1) / tile_size; extent_tiles[1] = (d_dst.extent(1) + tile_size - 1) / tile_size;