Skip to content

Commit b9755a1

Browse files
committed
[kokkos] Work around performance issue by using only 'unsigned long' in AtomicPairCounter
See kokkos/kokkos#4780
1 parent c7b6bde commit b9755a1

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/kokkos/KokkosCore/AtomicPairCounter.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ namespace cms {
99
namespace kokkos {
1010
class AtomicPairCounter {
1111
public:
12-
using c_type = unsigned long long int;
12+
// unsigned long long caused performance issue with Desul atomics in Kokkos 3.5
13+
//using c_type = unsigned long long int;
14+
using c_type = unsigned long int;
15+
static_assert(sizeof(unsigned long int) == sizeof(unsigned long long int));
1316

1417
KOKKOS_INLINE_FUNCTION AtomicPairCounter() { counter.ac = 0; }
1518
KOKKOS_INLINE_FUNCTION AtomicPairCounter(c_type i) { counter.ac = i; }

0 commit comments

Comments
 (0)