Fix issues with host_flag
This commit is contained in:
@ -167,7 +167,6 @@ class ComputeSNAGridKokkos : public ComputeSNAGrid {
|
||||
ComputeSNAGridKokkos(class LAMMPS *, int, char **);
|
||||
~ComputeSNAGridKokkos() override;
|
||||
|
||||
void init() override;
|
||||
void setup() override;
|
||||
void compute_array() override;
|
||||
|
||||
@ -321,7 +320,6 @@ class ComputeSNAGridKokkosDevice : public ComputeSNAGridKokkos<DeviceType, SNAP_
|
||||
|
||||
ComputeSNAGridKokkosDevice(class LAMMPS *, int, char **);
|
||||
|
||||
void init() override;
|
||||
void compute_array() override;
|
||||
|
||||
};
|
||||
@ -337,7 +335,6 @@ class ComputeSNAGridKokkosHost : public ComputeSNAGridKokkos<DeviceType, SNAP_KO
|
||||
|
||||
ComputeSNAGridKokkosHost(class LAMMPS *, int, char **);
|
||||
|
||||
void init() override;
|
||||
void compute_array() override;
|
||||
|
||||
};
|
||||
|
||||
@ -141,24 +141,11 @@ ComputeSNAGridKokkos<DeviceType, real_type, vector_length>::~ComputeSNAGridKokko
|
||||
//memoryKK->destroy_kokkos(k_gridlocal, gridlocal);
|
||||
}
|
||||
|
||||
// Init
|
||||
|
||||
template<class DeviceType, typename real_type, int vector_length>
|
||||
void ComputeSNAGridKokkos<DeviceType, real_type, vector_length>::init()
|
||||
{
|
||||
if (host_flag) {
|
||||
return;
|
||||
}
|
||||
ComputeSNAGrid::init();
|
||||
|
||||
}
|
||||
|
||||
// Setup
|
||||
|
||||
template<class DeviceType, typename real_type, int vector_length>
|
||||
void ComputeSNAGridKokkos<DeviceType, real_type, vector_length>::setup()
|
||||
{
|
||||
|
||||
// Do not call ComputeGrid::setup(), we don't wanna allocate the grid array there.
|
||||
// Instead, call ComputeGrid::set_grid_global and set_grid_local to set the n indices.
|
||||
|
||||
@ -184,6 +171,7 @@ template<class DeviceType, typename real_type, int vector_length>
|
||||
void ComputeSNAGridKokkos<DeviceType, real_type, vector_length>::compute_array()
|
||||
{
|
||||
if (host_flag) {
|
||||
ComputeSNAGrid::compute_array();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -907,12 +895,6 @@ template<class DeviceType>
|
||||
ComputeSNAGridKokkosDevice<DeviceType>::ComputeSNAGridKokkosDevice(class LAMMPS *lmp, int narg, char **arg)
|
||||
: ComputeSNAGridKokkos<DeviceType, SNAP_KOKKOS_REAL, SNAP_KOKKOS_DEVICE_VECLEN>(lmp, narg, arg) { ; }
|
||||
|
||||
template<class DeviceType>
|
||||
void ComputeSNAGridKokkosDevice<DeviceType>::init()
|
||||
{
|
||||
Base::init();
|
||||
}
|
||||
|
||||
template<class DeviceType>
|
||||
void ComputeSNAGridKokkosDevice<DeviceType>::compute_array()
|
||||
{
|
||||
@ -924,12 +906,6 @@ template<class DeviceType>
|
||||
ComputeSNAGridKokkosHost<DeviceType>::ComputeSNAGridKokkosHost(class LAMMPS *lmp, int narg, char **arg)
|
||||
: ComputeSNAGridKokkos<DeviceType, SNAP_KOKKOS_REAL, SNAP_KOKKOS_HOST_VECLEN>(lmp, narg, arg) { ; }
|
||||
|
||||
template<class DeviceType>
|
||||
void ComputeSNAGridKokkosHost<DeviceType>::init()
|
||||
{
|
||||
Base::init();
|
||||
}
|
||||
|
||||
template<class DeviceType>
|
||||
void ComputeSNAGridKokkosHost<DeviceType>::compute_array()
|
||||
{
|
||||
|
||||
@ -164,7 +164,6 @@ class ComputeSNAGridLocalKokkos : public ComputeSNAGridLocal {
|
||||
ComputeSNAGridLocalKokkos(class LAMMPS *, int, char **);
|
||||
~ComputeSNAGridLocalKokkos() override;
|
||||
|
||||
void init() override;
|
||||
void setup() override;
|
||||
void compute_local() override;
|
||||
|
||||
@ -320,7 +319,6 @@ class ComputeSNAGridLocalKokkosDevice : public ComputeSNAGridLocalKokkos<DeviceT
|
||||
|
||||
ComputeSNAGridLocalKokkosDevice(class LAMMPS *, int, char **);
|
||||
|
||||
void init() override;
|
||||
void compute_local() override;
|
||||
//void setup() override;
|
||||
|
||||
@ -337,7 +335,6 @@ class ComputeSNAGridLocalKokkosHost : public ComputeSNAGridLocalKokkos<DeviceTyp
|
||||
|
||||
ComputeSNAGridLocalKokkosHost(class LAMMPS *, int, char **);
|
||||
|
||||
void init() override;
|
||||
void compute_local() override;
|
||||
|
||||
};
|
||||
|
||||
@ -142,18 +142,6 @@ ComputeSNAGridLocalKokkos<DeviceType, real_type, vector_length>::~ComputeSNAGrid
|
||||
//memoryKK->destroy_kokkos(k_gridlocal, gridlocal);
|
||||
}
|
||||
|
||||
// Init
|
||||
|
||||
template<class DeviceType, typename real_type, int vector_length>
|
||||
void ComputeSNAGridLocalKokkos<DeviceType, real_type, vector_length>::init()
|
||||
{
|
||||
if (host_flag) {
|
||||
return;
|
||||
}
|
||||
ComputeSNAGridLocal::init();
|
||||
|
||||
}
|
||||
|
||||
// Setup
|
||||
|
||||
template<class DeviceType, typename real_type, int vector_length>
|
||||
@ -191,6 +179,7 @@ template<class DeviceType, typename real_type, int vector_length>
|
||||
void ComputeSNAGridLocalKokkos<DeviceType, real_type, vector_length>::compute_local()
|
||||
{
|
||||
if (host_flag) {
|
||||
ComputeSNAGridLocal::compute_array();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -924,12 +913,6 @@ template<class DeviceType>
|
||||
ComputeSNAGridLocalKokkosDevice<DeviceType>::ComputeSNAGridLocalKokkosDevice(class LAMMPS *lmp, int narg, char **arg)
|
||||
: ComputeSNAGridLocalKokkos<DeviceType, SNAP_KOKKOS_REAL, SNAP_KOKKOS_DEVICE_VECLEN>(lmp, narg, arg) { ; }
|
||||
|
||||
template<class DeviceType>
|
||||
void ComputeSNAGridLocalKokkosDevice<DeviceType>::init()
|
||||
{
|
||||
Base::init();
|
||||
}
|
||||
|
||||
template<class DeviceType>
|
||||
void ComputeSNAGridLocalKokkosDevice<DeviceType>::compute_local()
|
||||
{
|
||||
@ -941,12 +924,6 @@ template<class DeviceType>
|
||||
ComputeSNAGridLocalKokkosHost<DeviceType>::ComputeSNAGridLocalKokkosHost(class LAMMPS *lmp, int narg, char **arg)
|
||||
: ComputeSNAGridLocalKokkos<DeviceType, SNAP_KOKKOS_REAL, SNAP_KOKKOS_HOST_VECLEN>(lmp, narg, arg) { ; }
|
||||
|
||||
template<class DeviceType>
|
||||
void ComputeSNAGridLocalKokkosHost<DeviceType>::init()
|
||||
{
|
||||
Base::init();
|
||||
}
|
||||
|
||||
template<class DeviceType>
|
||||
void ComputeSNAGridLocalKokkosHost<DeviceType>::compute_local()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user