summaryrefslogtreecommitdiffstats
path: root/thirdparty/embree/common/simd/vfloat16_avx512.h
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/embree/common/simd/vfloat16_avx512.h')
-rw-r--r--thirdparty/embree/common/simd/vfloat16_avx512.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/thirdparty/embree/common/simd/vfloat16_avx512.h b/thirdparty/embree/common/simd/vfloat16_avx512.h
index 75c471cc0c..b6160a438c 100644
--- a/thirdparty/embree/common/simd/vfloat16_avx512.h
+++ b/thirdparty/embree/common/simd/vfloat16_avx512.h
@@ -316,6 +316,17 @@ namespace embree
return madd(t,b-a,a);
}
+ __forceinline bool isvalid (const vfloat16& v) {
+ return all((v > vfloat16(-FLT_LARGE)) & (v < vfloat16(+FLT_LARGE)));
+ }
+
+ __forceinline void xchg(vboolf16 m, vfloat16& a, vfloat16& b)
+ {
+ vfloat16 c = a;
+ a = select(m,b,a);
+ b = select(m,c,b);
+ }
+
////////////////////////////////////////////////////////////////////////////////
/// Rounding Functions
////////////////////////////////////////////////////////////////////////////////