Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit 5c00a16

Browse files
nicolasvasilacheftynse
authored andcommitted
cuda libraries: fix operator precedence issue in macro
1 parent a1b6cc6 commit 5c00a16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tc/core/cuda/cuda_libraries.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ inline __device__ void CubReduceAlongXPowerOf2(T* dest, T val) {
240240
}
241241
242242
#define POWEROF2(X) \
243-
((X) & ((X) - 1) == 0)
243+
(((X) & ((X) - 1)) == 0)
244244
245245
template <int REDUCTION_SIZE, int BLOCKDIMY, int BLOCKDIMZ, ReductionOp R, typename T>
246246
inline __device__ void CubReduceAlongX(T* dest, T val) {

0 commit comments

Comments
 (0)