Move deep_copy call

This commit is contained in:
Stan Gerald Moore 2021-05-14 12:24:21 -06:00
parent 6f6adc285a
commit a93ec125a4
10 changed files with 24 additions and 15 deletions

View File

@ -290,7 +290,6 @@ void PairBuckCoulLongKokkos<DeviceType>::allocate()
d_cut_ljsq = k_cut_ljsq.template view<DeviceType>();
d_cut_coulsq = typename AT::t_ffloat_2d("pair:cut_coulsq",n+1,n+1);
Kokkos::deep_copy(d_cut_coulsq,cut_coulsq);
k_params = Kokkos::DualView<params_buck_coul**,Kokkos::LayoutRight,DeviceType>("PairBuckCoulLong::params",n+1,n+1);
params = k_params.template view<DeviceType>();
@ -421,6 +420,8 @@ void PairBuckCoulLongKokkos<DeviceType>::init_style()
{
PairBuckCoulLong::init_style();
Kokkos::deep_copy(d_cut_coulsq,cut_coulsq);
// error if rRESPA with inner levels
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {

View File

@ -254,7 +254,6 @@ void PairCoulLongKokkos<DeviceType>::allocate()
d_cutsq = k_cutsq.template view<DeviceType>();
d_cut_coulsq = typename AT::t_ffloat_2d("pair:cut_coulsq",n+1,n+1);
Kokkos::deep_copy(d_cut_coulsq,cut_coulsq);
k_params = Kokkos::DualView<params_coul**,Kokkos::LayoutRight,DeviceType>("PairCoulLong::params",n+1,n+1);
params = k_params.template view<DeviceType>();
@ -385,6 +384,8 @@ void PairCoulLongKokkos<DeviceType>::init_style()
{
PairCoulLong::init_style();
Kokkos::deep_copy(d_cut_coulsq,cut_coulsq);
// error if rRESPA with inner levels
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {

View File

@ -286,10 +286,8 @@ void PairLJCharmmCoulCharmmImplicitKokkos<DeviceType>::allocate()
d_cutsq = k_cutsq.template view<DeviceType>();
d_cut_ljsq = typename AT::t_ffloat_2d("pair:cut_ljsq",n+1,n+1);
Kokkos::deep_copy(d_cut_ljsq,cut_ljsq);
d_cut_coulsq = typename AT::t_ffloat_2d("pair:cut_coulsq",n+1,n+1);
Kokkos::deep_copy(d_cut_coulsq,cut_coulsq);
k_params = Kokkos::DualView<params_lj_coul**,Kokkos::LayoutRight,DeviceType>("PairLJCharmmCoulCharmmImplicit::params",n+1,n+1);
params = k_params.template view<DeviceType>();
@ -420,6 +418,9 @@ void PairLJCharmmCoulCharmmImplicitKokkos<DeviceType>::init_style()
{
PairLJCharmmCoulCharmmImplicit::init_style();
Kokkos::deep_copy(d_cut_ljsq,cut_ljsq);
Kokkos::deep_copy(d_cut_coulsq,cut_coulsq);
// error if rRESPA with inner levels
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {

View File

@ -287,10 +287,8 @@ void PairLJCharmmCoulCharmmKokkos<DeviceType>::allocate()
d_cutsq = k_cutsq.template view<DeviceType>();
d_cut_ljsq = typename AT::t_ffloat_2d("pair:cut_ljsq",n+1,n+1);
Kokkos::deep_copy(d_cut_ljsq,cut_ljsq);
d_cut_coulsq = typename AT::t_ffloat_2d("pair:cut_coulsq",n+1,n+1);
Kokkos::deep_copy(d_cut_coulsq,cut_coulsq);
k_params = Kokkos::DualView<params_lj_coul**,Kokkos::LayoutRight,DeviceType>("PairLJCharmmCoulCharmm::params",n+1,n+1);
params = k_params.template view<DeviceType>();
@ -421,6 +419,9 @@ void PairLJCharmmCoulCharmmKokkos<DeviceType>::init_style()
{
PairLJCharmmCoulCharmm::init_style();
Kokkos::deep_copy(d_cut_ljsq,cut_ljsq);
Kokkos::deep_copy(d_cut_coulsq,cut_coulsq);
// error if rRESPA with inner levels
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {

View File

@ -308,10 +308,8 @@ void PairLJCharmmCoulLongKokkos<DeviceType>::allocate()
d_cutsq = k_cutsq.template view<DeviceType>();
d_cut_ljsq = typename AT::t_ffloat_2d("pair:cut_ljsq",n+1,n+1);
Kokkos::deep_copy(d_cut_ljsq,cut_ljsq);
d_cut_coulsq = typename AT::t_ffloat_2d("pair:cut_coulsq",n+1,n+1);
Kokkos::deep_copy(d_cut_coulsq,cut_coulsq);
k_params = Kokkos::DualView<params_lj_coul**,Kokkos::LayoutRight,DeviceType>("PairLJCharmmCoulLong::params",n+1,n+1);
params = k_params.template view<DeviceType>();
@ -429,6 +427,9 @@ void PairLJCharmmCoulLongKokkos<DeviceType>::init_style()
{
PairLJCharmmCoulLong::init_style();
Kokkos::deep_copy(d_cut_ljsq,cut_ljsq);
Kokkos::deep_copy(d_cut_coulsq,cut_coulsq);
// error if rRESPA with inner levels
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {

View File

@ -298,7 +298,6 @@ void PairLJClass2CoulLongKokkos<DeviceType>::allocate()
d_cut_ljsq = k_cut_ljsq.template view<DeviceType>();
d_cut_coulsq = typename AT::t_ffloat_2d("pair:cut_coulsq",n+1,n+1);
Kokkos::deep_copy(d_cut_coulsq,cut_coulsq);
k_params = Kokkos::DualView<params_lj_coul**,Kokkos::LayoutRight,DeviceType>("PairLJClass2CoulLong::params",n+1,n+1);
params = k_params.template view<DeviceType>();
@ -429,6 +428,8 @@ void PairLJClass2CoulLongKokkos<DeviceType>::init_style()
{
PairLJClass2CoulLong::init_style();
Kokkos::deep_copy(d_cut_coulsq,cut_coulsq);
// error if rRESPA with inner levels
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {

View File

@ -271,7 +271,6 @@ void PairLJCutCoulDSFKokkos<DeviceType>::allocate()
d_cut_ljsq = k_cut_ljsq.template view<DeviceType>();
d_cut_coulsq = typename AT::t_ffloat_2d("pair:cut_coulsq",n+1,n+1);
Kokkos::deep_copy(d_cut_coulsq,cut_coulsq);
k_params = Kokkos::DualView<params_lj_coul**,Kokkos::LayoutRight,DeviceType>("PairLJCutCoulDSF::params",n+1,n+1);
params = k_params.template view<DeviceType>();
@ -286,6 +285,8 @@ void PairLJCutCoulDSFKokkos<DeviceType>::init_style()
{
PairLJCutCoulDSF::init_style();
Kokkos::deep_copy(d_cut_coulsq,cut_coulsq);
// error if rRESPA with inner levels
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {

View File

@ -291,7 +291,6 @@ void PairLJCutCoulLongKokkos<DeviceType>::allocate()
d_cut_ljsq = k_cut_ljsq.template view<DeviceType>();
d_cut_coulsq = typename AT::t_ffloat_2d("pair:cut_coulsq",n+1,n+1);
Kokkos::deep_copy(d_cut_coulsq,cut_coulsq);
k_params = Kokkos::DualView<params_lj_coul**,Kokkos::LayoutRight,DeviceType>("PairLJCutCoulLong::params",n+1,n+1);
params = k_params.template view<DeviceType>();
@ -422,6 +421,8 @@ void PairLJCutCoulLongKokkos<DeviceType>::init_style()
{
PairLJCutCoulLong::init_style();
Kokkos::deep_copy(d_cut_coulsq,cut_coulsq);
// error if rRESPA with inner levels
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {

View File

@ -272,10 +272,8 @@ void PairLJGromacsCoulGromacsKokkos<DeviceType>::allocate()
d_cutsq = k_cutsq.template view<DeviceType>();
d_cut_ljsq = typename AT::t_ffloat_2d("pair:cut_ljsq",n+1,n+1);
Kokkos::deep_copy(d_cut_ljsq,cut_ljsq);
d_cut_coulsq = typename AT::t_ffloat_2d("pair:cut_coulsq",n+1,n+1);
Kokkos::deep_copy(d_cut_coulsq,cut_coulsq);
k_params = Kokkos::DualView<params_lj_coul_gromacs**,Kokkos::LayoutRight,DeviceType>("PairLJGromacsCoulGromacs::params",n+1,n+1);
params = k_params.template view<DeviceType>();
@ -406,6 +404,9 @@ void PairLJGromacsCoulGromacsKokkos<DeviceType>::init_style()
{
PairLJGromacsCoulGromacs::init_style();
Kokkos::deep_copy(d_cut_ljsq,cut_ljsq);
Kokkos::deep_copy(d_cut_coulsq,cut_coulsq);
// error if rRESPA with inner levels
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {

View File

@ -75,6 +75,8 @@ void PairZBLKokkos<DeviceType>::init_style()
{
PairZBL::init_style();
Kokkos::deep_copy(d_cutsq,cut_globalsq);
// error if rRESPA with inner levels
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
@ -105,8 +107,6 @@ void PairZBLKokkos<DeviceType>::init_style()
} else {
error->all(FLERR,"Cannot use chosen neighbor list style with lj/cut/kk");
}
Kokkos::deep_copy(d_cutsq,cut_globalsq);
}
/* ---------------------------------------------------------------------- */