diff --git a/particle_structs/src/CMakeLists.txt b/particle_structs/src/CMakeLists.txt index 652641f1..66659ec0 100644 --- a/particle_structs/src/CMakeLists.txt +++ b/particle_structs/src/CMakeLists.txt @@ -22,7 +22,6 @@ set(HEADERS scs/SCS_Macros.h scs/SCS_Types.h - scs/SCSPair.h scs/SCS_sort.h scs/SCS_rebuild.h scs/SCS_migrate.h diff --git a/particle_structs/src/scs/SCSPair.h b/particle_structs/src/scs/SCSPair.h deleted file mode 100644 index bcd11c4d..00000000 --- a/particle_structs/src/scs/SCSPair.h +++ /dev/null @@ -1,41 +0,0 @@ -#pragma once - -#include -namespace pumipic { -struct MyPair { - KOKKOS_FORCEINLINE_FUNCTION constexpr MyPair() : first(0), second(0) {} - KOKKOS_FORCEINLINE_FUNCTION constexpr MyPair(int i) : first(i), second(0) {} - KOKKOS_INLINE_FUNCTION MyPair& operator=(const MyPair& p) { - if (this != &p) { - first = p.first; - second = p.second; - } - return *this; - } - KOKKOS_FORCEINLINE_FUNCTION void operator=(const volatile MyPair& p) volatile { - first = p.first; - second = p.second; - } - KOKKOS_FORCEINLINE_FUNCTION int operator-(const volatile MyPair& p) const volatile { return first - p.first;} - KOKKOS_FORCEINLINE_FUNCTION bool operator==(const volatile MyPair& p) const volatile {return first==p.first;} - KOKKOS_FORCEINLINE_FUNCTION bool operator!=(const volatile MyPair& p) const volatile {return !(*this == p);} - //Reverse operators in order to get largest first - KOKKOS_FORCEINLINE_FUNCTION bool operator<(const volatile MyPair& p) const volatile {return first > p.first || (first ==p.first && second < p.second);} - KOKKOS_FORCEINLINE_FUNCTION bool operator>(const volatile MyPair& p) const volatile {return first < p.first || (first==p.first && second > p.second);} - int first, second; -}; - -} - -#ifdef PP_USE_GPU -namespace Kokkos { - using pumipic::MyPair; - PP_DEVICE_VAR MyPair ma = MyPair(10000000); - PP_DEVICE_VAR MyPair mi = MyPair(0); - template <> - struct reduction_identity { - KOKKOS_FORCEINLINE_FUNCTION constexpr static const MyPair& max() {return ma;} - KOKKOS_FORCEINLINE_FUNCTION constexpr static const MyPair& min() {return mi;} - }; -} -#endif diff --git a/particle_structs/src/scs/SellCSigma.h b/particle_structs/src/scs/SellCSigma.h index 9f4f6350..c8beeaa4 100644 --- a/particle_structs/src/scs/SellCSigma.h +++ b/particle_structs/src/scs/SellCSigma.h @@ -11,7 +11,6 @@ #include #include #include -#include "SCSPair.h" #include "scs_input.hpp" #include #include @@ -45,7 +44,6 @@ class SellCSigma : public ParticleStructure { template using Slice = Segment, device_type>; #endif typedef Kokkos::TeamPolicy PolicyType; - typedef Kokkos::View PairView; typedef Kokkos::UnorderedMap GID_Mapping; typedef SCS_Input Input_T;