From 4fbd7abbb2546b4cf697d8f4daf19d611418bd59 Mon Sep 17 00:00:00 2001 From: Sourabh Betigeri Date: Wed, 24 Jul 2024 12:05:20 -0700 Subject: [PATCH] SWDEV-475394 - Fix for the return type to be in-line with CUDA Change-Id: I7c833571d47b4e86a86e4a0095b61947d16ecab6 --- hipamd/include/hip/amd_detail/amd_device_functions.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; }