diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-02-14 17:34:23 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-02-17 18:26:24 +0300 |
commit | 8119f0aad21c3ce88e82d68ed20cd5a8edc99703 (patch) | |
tree | 38c117be872788f9858c09b96b63af6c666fe770 /intern/cycles/util/util_ssef.h | |
parent | db28411fd90b77035dddc1682bb2786da34f73e9 (diff) |
Cycles: refactor intrinsic functions implementation
* Add processor independent fallbacks
* Use uint32_t and uint64_t types
* Remove unused functions
* Better comments and less indentation
Ref D8237, T78710
Diffstat (limited to 'intern/cycles/util/util_ssef.h')
-rw-r--r-- | intern/cycles/util/util_ssef.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/intern/cycles/util/util_ssef.h b/intern/cycles/util/util_ssef.h index e9f0efb4efb..b14640ced40 100644 --- a/intern/cycles/util/util_ssef.h +++ b/intern/cycles/util/util_ssef.h @@ -730,27 +730,27 @@ __forceinline float reduce_add(const ssef &v) return _mm_cvtss_f32(vreduce_add(v)); } -__forceinline size_t select_min(const ssef &v) +__forceinline uint32_t select_min(const ssef &v) { return __bsf(movemask(v == vreduce_min(v))); } -__forceinline size_t select_max(const ssef &v) +__forceinline uint32_t select_max(const ssef &v) { return __bsf(movemask(v == vreduce_max(v))); } -__forceinline size_t select_min(const sseb &valid, const ssef &v) +__forceinline uint32_t select_min(const sseb &valid, const ssef &v) { const ssef a = select(valid, v, ssef(pos_inf)); return __bsf(movemask(valid & (a == vreduce_min(a)))); } -__forceinline size_t select_max(const sseb &valid, const ssef &v) +__forceinline uint32_t select_max(const sseb &valid, const ssef &v) { const ssef a = select(valid, v, ssef(neg_inf)); return __bsf(movemask(valid & (a == vreduce_max(a)))); } -__forceinline size_t movemask(const ssef &a) +__forceinline uint32_t movemask(const ssef &a) { return _mm_movemask_ps(a); } |