aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarat Dukhan <maratek@gmail.com>2017-02-22 09:23:23 -0500
committerMarat Dukhan <maratek@gmail.com>2017-02-22 09:23:23 -0500
commit4a91629a62e1f7265d39442abd67f149b93a598d (patch)
tree0574bbdeb5b2392040d4fb67bad8de6bba4d0867
parent95c5be7222cb9f3d4cb55eaf3579d00e64181dff (diff)
downloadpsimd-4a91629a62e1f7265d39442abd67f149b93a598d.tar.gz
And-with-mask intrinsic
-rw-r--r--include/psimd.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/psimd.h b/include/psimd.h
index 2981812..9211959 100644
--- a/include/psimd.h
+++ b/include/psimd.h
@@ -375,6 +375,11 @@
return a * b;
}
+ /* Vector and */
+ PSIMD_INTRINSIC psimd_f32 psimd_andmask_f32(psimd_s32 mask, psimd_f32 v) {
+ return (psimd_f32) (mask & (psimd_s32) v);
+ }
+
/* Vector blend */
PSIMD_INTRINSIC psimd_s8 psimd_blend_s8(psimd_s8 mask, psimd_s8 a, psimd_s8 b) {
return (mask & a) | (~mask & b);