New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A bunch of tweaks! #10

Merged
merged 10 commits into from Apr 12, 2018

MathSimd: why the AND with 15 in mask(float4)? Result is always in [0…

…,15] anyway.
  • Loading branch information...
rygorous committed Apr 12, 2018
commit d03f5d2a4957e585cce8b27a9a5da264266e6352
Copy path View file
@@ -55,7 +55,7 @@ VM_INLINE float hmin(float4 v)
}
// Returns a 4-bit code where bit0..bit3 is X..W
VM_INLINE unsigned mask(float4 v) { return _mm_movemask_ps(v.m) & 15; }
VM_INLINE unsigned mask(float4 v) { return _mm_movemask_ps(v.m); }
// Once we have a comparison, we can branch based on its results:
VM_INLINE bool any(bool4 v) { return mask(v) != 0; }
VM_INLINE bool all(bool4 v) { return mask(v) == 15; }
ProTip! Use n and p to navigate between commits in a pull request.