diff --git a/hipamd/include/hip/amd_detail/amd_device_functions.h b/hipamd/include/hip/amd_detail/amd_device_functions.h index 207d638aec..44d4dc4dea 100644 --- a/hipamd/include/hip/amd_detail/amd_device_functions.h +++ b/hipamd/include/hip/amd_detail/amd_device_functions.h @@ -63,19 +63,19 @@ __device__ static inline int __clzll(long long int input) { return __ockl_clz_u64((uint64_t)input); } -__device__ static inline unsigned int __ffs(unsigned int input) { +__device__ static inline int __ffs(unsigned int input) { return ( input == 0 ? -1 : __builtin_ctz(input) ) + 1; } -__device__ static inline unsigned int __ffsll(unsigned long long int input) { +__device__ static inline int __ffsll(unsigned long long int input) { return ( input == 0 ? -1 : __builtin_ctzll(input) ) + 1; } -__device__ static inline unsigned int __ffs(int input) { +__device__ static inline int __ffs(int input) { return ( input == 0 ? -1 : __builtin_ctz(input) ) + 1; } -__device__ static inline unsigned int __ffsll(long long int input) { +__device__ static inline int __ffsll(long long int input) { return ( input == 0 ? -1 : __builtin_ctzll(input) ) + 1; }