1 | // Copyright 2009-2021 Intel Corporation |
2 | // SPDX-License-Identifier: Apache-2.0 |
3 | |
4 | #pragma once |
5 | |
6 | #include "../sys/platform.h" |
7 | #include "../sys/intrinsics.h" |
8 | #include "../sys/alloc.h" |
9 | #include "../math/constants.h" |
10 | #include "varying.h" |
11 | |
12 | namespace embree |
13 | { |
14 | #if defined(__SSE4_1__) |
15 | __forceinline __m128 blendv_ps(__m128 f, __m128 t, __m128 mask) { |
16 | return _mm_blendv_ps(f,t,mask); |
17 | } |
18 | #else |
19 | __forceinline __m128 blendv_ps(__m128 f, __m128 t, __m128 mask) { |
20 | return _mm_or_ps(a: _mm_and_ps(a: mask, b: t), b: _mm_andnot_ps(a: mask, b: f)); |
21 | } |
22 | #endif |
23 | |
24 | extern const __m128 mm_lookupmask_ps[16]; |
25 | extern const __m128d mm_lookupmask_pd[4]; |
26 | } |
27 | |
28 | #if defined(__AVX512VL__) |
29 | #include "vboolf4_avx512.h" |
30 | #else |
31 | #include "vboolf4_sse2.h" |
32 | #endif |
33 | #include "vint4_sse2.h" |
34 | #include "vuint4_sse2.h" |
35 | #include "vfloat4_sse2.h" |
36 | |