| 163 | } |
| 164 | |
| 165 | CPPSPMD_FORCE_INLINE __m128 blendv_ps(__m128 a, __m128 b, __m128 mask) |
| 166 | { |
| 167 | #if CPPSPMD_SSE2 |
| 168 | // Input is not a mask, but MSB bits - so emulate _mm_blendv_ps() by replicating bit 31. |
| 169 | mask = _mm_castsi128_ps(_mm_srai_epi32(_mm_castps_si128(mask), 31)); |
| 170 | return _mm_or_ps(_mm_and_ps(mask, b), _mm_andnot_ps(mask, a)); |
| 171 | #else |
| 172 | return _mm_blendv_ps(a, b, mask); |
| 173 | #endif |
| 174 | } |
| 175 | |
| 176 | CPPSPMD_FORCE_INLINE __m128i blendv_mask_epi32(__m128i a, __m128i b, __m128i mask) |
| 177 | { |
no outgoing calls
no test coverage detected