Merge pull request #3701 from stanmoore1/kk_4.0_deprecated

Remove deprecated Kokkos code
This commit is contained in:
Axel Kohlmeyer
2023-03-23 18:07:56 -04:00
committed by GitHub
13 changed files with 4 additions and 211 deletions

View File

@ -58,16 +58,6 @@ class ComputeTempDeformKokkos: public ComputeTempDeform {
t5 += rhs.t5;
return *this;
}
KOKKOS_INLINE_FUNCTION
void operator+=(const volatile s_CTEMP &rhs) volatile {
t0 += rhs.t0;
t1 += rhs.t1;
t2 += rhs.t2;
t3 += rhs.t3;
t4 += rhs.t4;
t5 += rhs.t5;
}
};
typedef s_CTEMP CTEMP;

View File

@ -54,16 +54,6 @@ class ComputeTempKokkos : public ComputeTemp {
t5 += rhs.t5;
return *this;
}
KOKKOS_INLINE_FUNCTION
void operator+=(const volatile s_CTEMP &rhs) volatile {
t0 += rhs.t0;
t1 += rhs.t1;
t2 += rhs.t2;
t3 += rhs.t3;
t4 += rhs.t4;
t5 += rhs.t5;
}
};
typedef s_CTEMP CTEMP;

View File

@ -63,25 +63,6 @@ struct s_EVM_FLOAT {
vp[4] += rhs.vp[4];
vp[5] += rhs.vp[5];
}
KOKKOS_INLINE_FUNCTION
void operator+=(const volatile s_EVM_FLOAT &rhs) volatile {
evdwl += rhs.evdwl;
ecoul += rhs.ecoul;
emol += rhs.emol;
v[0] += rhs.v[0];
v[1] += rhs.v[1];
v[2] += rhs.v[2];
v[3] += rhs.v[3];
v[4] += rhs.v[4];
v[5] += rhs.v[5];
vp[0] += rhs.vp[0];
vp[1] += rhs.vp[1];
vp[2] += rhs.vp[2];
vp[3] += rhs.vp[3];
vp[4] += rhs.vp[4];
vp[5] += rhs.vp[5];
}
};
typedef struct s_EVM_FLOAT EVM_FLOAT;

View File

@ -67,17 +67,6 @@ public:
dst.value[2][1] = MAX(dst.value[2][1],src.value[2][1]);
}
KOKKOS_INLINE_FUNCTION
void join(volatile value_type &dst,
const volatile value_type &src) const {
dst.value[0][0] = MIN(dst.value[0][0],src.value[0][0]);
dst.value[0][1] = MAX(dst.value[0][1],src.value[0][1]);
dst.value[1][0] = MIN(dst.value[1][0],src.value[1][0]);
dst.value[1][1] = MAX(dst.value[1][1],src.value[1][1]);
dst.value[2][0] = MIN(dst.value[2][0],src.value[2][0]);
dst.value[2][1] = MAX(dst.value[2][1],src.value[2][1]);
}
KOKKOS_INLINE_FUNCTION
void operator() (const int &i, value_type &dst) const {
dst.value[0][0] = MIN(dst.value[0][0],x(i,0));

View File

@ -49,13 +49,6 @@ class FixFreezeKokkos : public FixFreeze {
values[2] += rhs.values[2];
return *this;
}
KOKKOS_INLINE_FUNCTION
void operator+=(const volatile OriginalForce &rhs) volatile {
values[0] += rhs.values[0];
values[1] += rhs.values[1];
values[2] += rhs.values[2];
}
};
FixFreezeKokkos(class LAMMPS *, int, char **);

View File

@ -43,13 +43,6 @@ namespace LAMMPS_NS {
fz += rhs.fz;
return *this;
}
KOKKOS_INLINE_FUNCTION
void operator+=(const volatile s_FSUM &rhs) volatile {
fx += rhs.fx;
fy += rhs.fy;
fz += rhs.fz;
}
};
typedef s_FSUM FSUM;
@ -203,21 +196,6 @@ namespace LAMMPS_NS {
update.fy += source.fy;
update.fz += source.fz;
}
KOKKOS_INLINE_FUNCTION
static void init(volatile value_type &update) {
update.fx = 0.0;
update.fy = 0.0;
update.fz = 0.0;
}
KOKKOS_INLINE_FUNCTION
static void join(volatile value_type &update,
const volatile value_type &source) {
update.fx += source.fx;
update.fy += source.fy;
update.fz += source.fz;
}
};
template <class DeviceType>
@ -255,15 +233,6 @@ namespace LAMMPS_NS {
const value_type &source) {
update += source;
}
KOKKOS_INLINE_FUNCTION
static void init(volatile value_type &update) {
update = 0.0;
}
KOKKOS_INLINE_FUNCTION
static void join(volatile value_type &update,
const volatile value_type &source) {
update += source;
}
};
template <class DeviceType, int RMass>

View File

@ -59,15 +59,6 @@ struct s_CounterType
nFails += rhs.nFails;
return *this;
}
KOKKOS_INLINE_FUNCTION
void operator+=(const volatile s_CounterType &rhs) volatile
{
nSteps += rhs.nSteps;
nIters += rhs.nIters;
nFuncs += rhs.nFuncs;
nFails += rhs.nFails;
}
};
typedef struct s_CounterType CounterType;

View File

@ -41,13 +41,6 @@ struct s_double_3 {
d2 += rhs.d2;
return *this;
}
KOKKOS_INLINE_FUNCTION
void operator+=(const volatile s_double_3 &rhs) volatile {
d0 += rhs.d0;
d1 += rhs.d1;
d2 += rhs.d2;
}
};
typedef s_double_3 double_3;

View File

@ -28,42 +28,21 @@ class Few {
KOKKOS_INLINE_FUNCTION Few(Few<T, n> const& rhs) {
for (std::size_t i = 0; i < n; ++i) new (data() + i) T(rhs[i]);
}
KOKKOS_INLINE_FUNCTION Few(Few<T, n> const volatile& rhs) {
for (std::size_t i = 0; i < n; ++i) new (data() + i) T(rhs[i]);
}
KOKKOS_INLINE_FUNCTION void operator=(Few<T, n> const& rhs) volatile {
for (std::size_t i = 0; i < n; ++i) data()[i] = rhs[i];
}
KOKKOS_INLINE_FUNCTION void operator=(Few<T, n> const& rhs) {
for (std::size_t i = 0; i < n; ++i) data()[i] = rhs[i];
}
KOKKOS_INLINE_FUNCTION void operator=(Few<T, n> const volatile& rhs) {
for (std::size_t i = 0; i < n; ++i) data()[i] = rhs[i];
}
KOKKOS_INLINE_FUNCTION T* data() {
return reinterpret_cast<T*>(array_);
}
KOKKOS_INLINE_FUNCTION T const* data() const {
return reinterpret_cast<T const*>(array_);
}
KOKKOS_INLINE_FUNCTION T volatile* data() volatile {
return reinterpret_cast<T volatile*>(array_);
}
KOKKOS_INLINE_FUNCTION T const volatile* data() const volatile {
return reinterpret_cast<T const volatile*>(array_);
}
KOKKOS_INLINE_FUNCTION T& operator[](std::size_t i) {
return data()[i];
}
KOKKOS_INLINE_FUNCTION T const& operator[](std::size_t i) const {
return data()[i];
}
KOKKOS_INLINE_FUNCTION T volatile& operator[](std::size_t i) volatile {
return data()[i];
}
KOKKOS_INLINE_FUNCTION T const volatile& operator[](std::size_t i) const volatile {
return data()[i];
}
};
#endif

View File

@ -64,23 +64,11 @@ namespace Kokkos {
z+=tmp.z;
}
KOKKOS_INLINE_FUNCTION
void operator += (const lmp_float3& tmp) volatile {
x+=tmp.x;
y+=tmp.y;
z+=tmp.z;
}
KOKKOS_INLINE_FUNCTION
void operator = (const lmp_float3& tmp) {
x=tmp.x;
y=tmp.y;
z=tmp.z;
}
KOKKOS_INLINE_FUNCTION
void operator = (const lmp_float3& tmp) volatile {
x=tmp.x;
y=tmp.y;
z=tmp.z;
}
};
struct lmp_double3 {
@ -95,23 +83,11 @@ namespace Kokkos {
z+=tmp.z;
}
KOKKOS_INLINE_FUNCTION
void operator += (const lmp_double3& tmp) volatile {
x+=tmp.x;
y+=tmp.y;
z+=tmp.z;
}
KOKKOS_INLINE_FUNCTION
void operator = (const lmp_double3& tmp) {
x=tmp.x;
y=tmp.y;
z=tmp.z;
}
KOKKOS_INLINE_FUNCTION
void operator = (const lmp_double3& tmp) volatile {
x=tmp.x;
y=tmp.y;
z=tmp.z;
}
};
template<class Scalar>
@ -139,23 +115,11 @@ struct t_scalar3 {
return *this;
}
KOKKOS_FORCEINLINE_FUNCTION
t_scalar3 operator= (const volatile t_scalar3& rhs) {
x = rhs.x; y = rhs.y; z = rhs.z;
return *this;
}
KOKKOS_FORCEINLINE_FUNCTION
t_scalar3 operator+= (const t_scalar3& rhs) {
x += rhs.x; y += rhs.y; z += rhs.z;
return *this;
}
KOKKOS_FORCEINLINE_FUNCTION
t_scalar3 operator+= (const volatile t_scalar3& rhs) volatile {
x += rhs.x; y += rhs.y; z += rhs.z;
return *this;
}
};
template<class Scalar>
@ -429,14 +393,6 @@ struct s_EV_FLOAT {
for (int i = 0; i < 6; ++i)
v[i] += rhs.v[i];
}
KOKKOS_INLINE_FUNCTION
void operator+=(const volatile s_EV_FLOAT &rhs) volatile {
evdwl += rhs.evdwl;
ecoul += rhs.ecoul;
for (int i = 0; i < 6; ++i)
v[i] += rhs.v[i];
}
};
typedef struct s_EV_FLOAT EV_FLOAT;
@ -464,16 +420,6 @@ struct s_EV_FLOAT_REAX {
for (int i = 0; i < 9; ++i)
ereax[i] += rhs.ereax[i];
}
KOKKOS_INLINE_FUNCTION
void operator+=(const volatile s_EV_FLOAT_REAX &rhs) volatile {
evdwl += rhs.evdwl;
ecoul += rhs.ecoul;
for (int i = 0; i < 6; ++i)
v[i] += rhs.v[i];
for (int i = 0; i < 9; ++i)
ereax[i] += rhs.ereax[i];
}
};
typedef struct s_EV_FLOAT_REAX EV_FLOAT_REAX;
@ -501,16 +447,6 @@ struct s_FEV_FLOAT {
for (int i = 0; i < 3; ++i)
f[i] += rhs.f[i];
}
KOKKOS_INLINE_FUNCTION
void operator+=(const volatile s_FEV_FLOAT &rhs) volatile {
evdwl += rhs.evdwl;
ecoul += rhs.ecoul;
for (int i = 0; i < 6; ++i)
v[i] += rhs.v[i];
for (int i = 0; i < 3; ++i)
f[i] += rhs.f[i];
}
};
typedef struct s_FEV_FLOAT FEV_FLOAT;
@ -534,12 +470,6 @@ struct alignas(2*sizeof(F_FLOAT)) s_FLOAT2 {
v[0] += rhs.v[0];
v[1] += rhs.v[1];
}
KOKKOS_INLINE_FUNCTION
void operator+=(const volatile s_FLOAT2 &rhs) volatile {
v[0] += rhs.v[0];
v[1] += rhs.v[1];
}
};
typedef struct s_FLOAT2 F_FLOAT2;

View File

@ -31,12 +31,6 @@ namespace LAMMPS_NS {
d1 += rhs.d1;
return *this;
}
KOKKOS_INLINE_FUNCTION
void operator+=(const volatile s_double2 &rhs) volatile {
d0 += rhs.d0;
d1 += rhs.d1;
}
};
//typedef s_double2 double2;

View File

@ -199,8 +199,8 @@ struct NPairSSAKokkosBinIDAtomsFunctor {
}
KOKKOS_INLINE_FUNCTION
void join (volatile value_type& dst,
const volatile value_type& src) const {
void join (value_type& dst,
const value_type& src) const {
if (dst < src) dst = src;
}
@ -226,8 +226,8 @@ struct NPairSSAKokkosBinIDGhostsFunctor {
}
KOKKOS_INLINE_FUNCTION
void join (volatile value_type& dst,
const volatile value_type& src) const {
void join (value_type& dst,
const value_type& src) const {
if (dst < src) dst = src;
}

View File

@ -530,12 +530,6 @@ struct PairReaxKokkosFindBondFunctor {
dst = MAX(dst,src);
}
KOKKOS_INLINE_FUNCTION
void join(volatile int &dst,
const volatile int &src) const {
dst = MAX(dst,src);
}
KOKKOS_INLINE_FUNCTION
void operator()(const int ii, int &numbonds) const {
c.calculate_find_bond_item(ii,numbonds);