From ff54dbd8fad04b1a65199bb028d931fdd4adc371 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 1 Feb 2018 15:13:54 +0100 Subject: [PATCH] Cycles: Attempt to fix 32 bit linux compilation --- intern/cycles/util/util_simd.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/intern/cycles/util/util_simd.h b/intern/cycles/util/util_simd.h index 8f6eb3995b7..04341451afb 100644 --- a/intern/cycles/util/util_simd.h +++ b/intern/cycles/util/util_simd.h @@ -460,6 +460,16 @@ ccl_device_inline int bitscan(int value) return bit; } +ccl_device_inline int __bsr(int value) +{ + assert(value != 0); + int bit = 0; + while(value >>= 1) { + ++bit; + } + return bit; +} + #endif /* __KERNEL_SSE2__ */ /* quiet unused define warnings */