Open to suggestions on the naming and design, this is more of a convenience function but I think it's still generally useful.
fn to_mask(&self) -> Self::Mask {
self.simd_ne(Simd::splat(0))
}
I'm not sure where these should live, I was thinking maybe SimdInt and SimdUint?
I'm also not sure if it should be included on SimdFloat.
Some Github usages, there may be more but these were the more obvious ones to query
https://github.com/search?q=language%3ARust+%22simd_ne%28zero%22+NOT+is%3Afork&type=code
https://github.com/search?q=language%3ARust+%22simd_ne%28Simd%3A%3Asplat%280%22+NOT+is%3Afork&type=code
Another pattern is for unsigned types checking simd_gt(zeros) but that's harder to separate as its own search.
Open to suggestions on the naming and design, this is more of a convenience function but I think it's still generally useful.
I'm not sure where these should live, I was thinking maybe
SimdIntandSimdUint?I'm also not sure if it should be included on
SimdFloat.Some Github usages, there may be more but these were the more obvious ones to query
https://github.com/search?q=language%3ARust+%22simd_ne%28zero%22+NOT+is%3Afork&type=code
https://github.com/search?q=language%3ARust+%22simd_ne%28Simd%3A%3Asplat%280%22+NOT+is%3Afork&type=code
Another pattern is for unsigned types checking
simd_gt(zeros)but that's harder to separate as its own search.