Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2021-02-14 16:20:51 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-02-17 18:26:24 +0300
commit859118d8f6ff022a16acbc6435488883424bad25 (patch)
treee0f708929a884070f7c3758f7fb58527cbdfd555 /source/blender/blenlib/intern/math_base_inline.c
parentac680c569e1b979f20c2e81dbd4f232085141aad (diff)
BLI: add BLI_simd.h header to wrap SSE includes
In preparation of adding Neon support. Ref D8237, T78710
Diffstat (limited to 'source/blender/blenlib/intern/math_base_inline.c')
-rw-r--r--source/blender/blenlib/intern/math_base_inline.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/source/blender/blenlib/intern/math_base_inline.c b/source/blender/blenlib/intern/math_base_inline.c
index 28aa81e5858..39945960e68 100644
--- a/source/blender/blenlib/intern/math_base_inline.c
+++ b/source/blender/blenlib/intern/math_base_inline.c
@@ -31,11 +31,8 @@
#include <stdio.h>
#include <stdlib.h>
-#ifdef __SSE2__
-# include <emmintrin.h>
-#endif
-
#include "BLI_math_base.h"
+#include "BLI_simd.h"
#ifdef __cplusplus
extern "C" {
@@ -685,10 +682,10 @@ MINLINE int integer_digits_i(const int i)
/* Internal helpers for SSE2 implementation.
*
- * NOTE: Are to be called ONLY from inside `#ifdef __SSE2__` !!!
+ * NOTE: Are to be called ONLY from inside `#ifdef BLI_HAVE_SSE2` !!!
*/
-#ifdef __SSE2__
+#ifdef BLI_HAVE_SSE2
/* Calculate initial guess for arg^exp based on float representation
* This method gives a constant bias, which can be easily compensated by
@@ -769,7 +766,7 @@ MALWAYS_INLINE __m128 _bli_math_blend_sse(const __m128 mask, const __m128 a, con
return _mm_or_ps(_mm_and_ps(mask, a), _mm_andnot_ps(mask, b));
}
-#endif /* __SSE2__ */
+#endif /* BLI_HAVE_SSE2 */
/* Low level conversion functions */
MINLINE unsigned char unit_float_to_uchar_clamp(float val)