This commit is contained in:
alphataubio
2024-06-04 22:43:53 -04:00
parent a093ddf3fd
commit e7581af0f5
2 changed files with 8 additions and 0 deletions

View File

@ -313,10 +313,12 @@ void AngleSPICAKokkos<DeviceType>::allocate()
k_k = typename ArrayTypes<DeviceType>::tdual_ffloat_1d("AngleSPICA::k",n+1);
k_theta0 = typename ArrayTypes<DeviceType>::tdual_ffloat_1d("AngleSPICA::theta0",n+1);
k_repscale = typename ArrayTypes<DeviceType>::tdual_ffloat_1d("AngleSPICA::repscale",n+1);
k_setflag = typename ArrayTypes<DeviceType>::tdual_int_1d("AngleSPICA::setflag",n+1);
d_k = k_k.template view<DeviceType>();
d_theta0 = k_theta0.template view<DeviceType>();
d_repscale = k_repscale.template view<DeviceType>();
d_setflag = k_setflag.template view<DeviceType>();
}
/* ----------------------------------------------------------------------
@ -333,11 +335,13 @@ void AngleSPICAKokkos<DeviceType>::coeff(int narg, char **arg)
k_k.h_view[i] = k[i];
k_theta0.h_view[i] = theta0[i];
k_repscale.h_view[i] = repscale[i];
k_setflag.h_view[i] = setflag[i];
}
k_k.template modify<LMPHostType>();
k_theta0.template modify<LMPHostType>();
k_repscale.template modify<LMPHostType>();
k_setflag.template modify<LMPHostType>();
}
/* ----------------------------------------------------------------------
@ -354,11 +358,13 @@ void AngleSPICAKokkos<DeviceType>::read_restart(FILE *fp)
k_k.h_view[i] = k[i];
k_theta0.h_view[i] = theta0[i];
k_repscale.h_view[i] = repscale[i];
k_setflag.h_view[i] = setflag[i];
}
k_k.template modify<LMPHostType>();
k_theta0.template modify<LMPHostType>();
k_repscale.template modify<LMPHostType>();
k_setflag.template modify<LMPHostType>();
}
/* ----------------------------------------------------------------------

View File

@ -78,10 +78,12 @@ class AngleSPICAKokkos : public AngleSPICA {
typename ArrayTypes<DeviceType>::tdual_ffloat_1d k_k;
typename ArrayTypes<DeviceType>::tdual_ffloat_1d k_theta0;
typename ArrayTypes<DeviceType>::tdual_ffloat_1d k_repscale;
typename ArrayTypes<DeviceType>::tdual_int_1d k_setflag;
typename ArrayTypes<DeviceType>::t_ffloat_1d d_k;
typename ArrayTypes<DeviceType>::t_ffloat_1d d_theta0;
typename ArrayTypes<DeviceType>::t_ffloat_1d d_repscale;
typename ArrayTypes<DeviceType>::t_int_1d d_setflag;
void allocate();
};