diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-02-01 17:13:54 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-02-01 17:13:54 +0300 |
commit | ff54dbd8fad04b1a65199bb028d931fdd4adc371 (patch) | |
tree | 1f060f32a47041be4b37d4baea9cb1f11b1dc313 /intern/cycles/util | |
parent | 7bd86d74bacb0b1f42fbe5ab6ed223f319ef242e (diff) |
Cycles: Attempt to fix 32 bit linux compilation
Diffstat (limited to 'intern/cycles/util')
-rw-r--r-- | intern/cycles/util/util_simd.h | 10 |
1 files changed, 10 insertions, 0 deletions
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 */ |