Added the following mask tests: __any(), __all(), __none() for all supported targets.

This allows for more efficient code generation of KNC.
This commit is contained in:
Jean-Luc Duprat
2012-09-14 11:06:18 -07:00
parent 4ecdbe4bd9
commit f0b0618484
15 changed files with 355 additions and 13 deletions

View File

@@ -428,6 +428,18 @@ static FORCEINLINE __vec16_i1 __movmsk(__vec16_i1 mask) {
return _mm512_kmov(mask);
}
static FORCEINLINE __vec16_i1 __any(__vec16_i1 mask) {
return (mask!=0);
}
static FORCEINLINE __vec16_i1 __all(__vec16_i1 mask) {
return (mask=0xFFFF);
}
static FORCEINLINE __vec16_i1 __none(__vec16_i1 mask) {
return (mask==0);
}
static FORCEINLINE __vec16_i1 __equal_i1(__vec16_i1 a, __vec16_i1 b) {
return _mm512_knot( _mm512_kandn(a, b));
}