Replace usages of __ockl_clz with builtins (#2234)

Cette révision appartient à :
Fábio Mestre
2026-01-13 10:15:46 +00:00
révisé par GitHub
Parent 61325db1c8
révision 09a01ee11c
2 fichiers modifiés avec 4 ajouts et 7 suppressions
+4 -2
Voir le fichier
@@ -52,10 +52,12 @@ __device__ static inline unsigned int __popcll(unsigned long long int input) {
return __builtin_popcountll(input);
}
__device__ static inline int __clz(int input) { return __ockl_clz_u32((uint)input); }
__device__ static inline int __clz(int input) {
return input == 0u ? 32 : __builtin_clz((uint)input);
}
__device__ static inline int __clzll(long long int input) {
return __ockl_clz_u64((__hip_uint64_t)input);
return input == 0u ? 64 : __builtin_clzl((__hip_uint64_t)input);
}
__device__ static inline int __ffs(unsigned int input) {
-5
Voir le fichier
@@ -56,11 +56,6 @@ extern "C" __device__ __attribute__((const)) uint __ockl_mul_hi_u32(uint, uint);
extern "C" __device__ __attribute__((const)) int __ockl_mul_hi_i32(int, int);
extern "C" __device__ __attribute__((const)) uint __ockl_sadd_u32(uint, uint, uint);
extern "C" __device__ __attribute__((const)) uchar __ockl_clz_u8(uchar);
extern "C" __device__ __attribute__((const)) ushort __ockl_clz_u16(ushort);
extern "C" __device__ __attribute__((const)) uint __ockl_clz_u32(uint);
extern "C" __device__ __attribute__((const)) __hip_uint64_t __ockl_clz_u64(__hip_uint64_t);
extern "C" __device__ __attribute__((const)) float __ocml_fmin_f32(float, float);
extern "C" __device__ __attribute__((const)) float __ocml_fmax_f32(float, float);