Cycles: Attempt to fix 32 bit linux compilation
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 1 Feb 2018 14:13:54 +0000 (15:13 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 1 Feb 2018 14:13:54 +0000 (15:13 +0100)
intern/cycles/util/util_simd.h

index 8f6eb3995b703bc837d8434f026db93bff865715..04341451afbccd36552fac51c03ac2c871493050 100644 (file)
@@ -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 */