Skip to content

Commit 677408c

Browse files
committed
removed ifdefs
1 parent ffc30c4 commit 677408c

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

algorithms/cudahip/Reduction.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,22 +51,6 @@ __forceinline__ __device__ T shuffledown(T value, int offset) {
5151
template <typename T, typename OperationT>
5252
__device__ __forceinline__ T warpReduce(T value, OperationT operation) {
5353

54-
#if (defined(__CUDA_ARCH__) && __CUDA_ARCH__ >= 800)
55-
// C++17 compile-time check to ensure we only use this for ints
56-
if constexpr (std::is_same_v<T, int> || std::is_same_v<T, unsigned int>) {
57-
58-
unsigned int mask = 0xFFFFFFFF; // 32-bit active thread mask
59-
60-
if constexpr (std::is_same_v<OperationT, device::Sum<T>>) {
61-
return __reduce_add_sync(mask, value);
62-
} else if constexpr (std::is_same_v<OperationT, device::Min<T>>) {
63-
return __reduce_min_sync(mask, value);
64-
} else if constexpr (std::is_same_v<OperationT, device::Max<T>>) {
65-
return __reduce_max_sync(mask, value);
66-
}
67-
}
68-
#endif
69-
7054
for (int offset = warpSize / 2; offset > 0; offset /= 2) {
7155
value = operation(value, shuffledown(value, offset));
7256
}

0 commit comments

Comments
 (0)