|
@@ -158,6 +158,20 @@ inline Vector<float, 4> andnot(const Vector<float, 4> &a, const Vector<float, 4> |
|
|
return Vector<float, 4>(_mm_andnot_ps(a.v, b.v)); |
|
|
return Vector<float, 4>(_mm_andnot_ps(a.v, b.v)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** Returns an integer with each bit corresponding to the most significant bit of each element. |
|
|
|
|
|
For example, `movemask(float_4::mask())` returns 0xf. |
|
|
|
|
|
*/ |
|
|
|
|
|
inline int movemask(const Vector<float, 4> &a) { |
|
|
|
|
|
return _mm_movemask_ps(a.v); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** Returns an integer with each bit corresponding to the most significant bit of each byte. |
|
|
|
|
|
For example, `movemask(int32_4::mask())` returns 0xffff. |
|
|
|
|
|
*/ |
|
|
|
|
|
inline int movemask(const Vector<int32_t, 4> &a) { |
|
|
|
|
|
return _mm_movemask_epi8(a.v); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Operator overloads |
|
|
// Operator overloads |
|
|
|
|
|
|
|
|