--- a/include/simd.h Thu May 15 19:15:57 2008 +0200
+++ b/include/simd.h Mon May 19 22:59:04 2008 +0200
@@ -72,11 +72,13 @@
#define mShuffle3 _MM_SHUFFLE(3,3,3,3)
#define mshuffle _mm_shuffle_ps
+/** select values from a and b according to mask (a if mask is 1, b if mask is 0) */
inline const mfloat4 mselect(const mfloat4& mask, const mfloat4& a, const mfloat4& b)
{
return _mm_or_ps(_mm_and_ps(mask, a), _mm_andnot_ps(mask, b));
}
+/** fast power function */
inline const mfloat4 mfastpow(const mfloat4& base, const mfloat4& exponent)
{
__m128 denom = _mm_mul_ps(exponent, base);