1 | use crate::core_arch::x86::*; |
2 | |
3 | /// Convert 64-bit mask a into an integer value, and store the result in dst. |
4 | /// |
5 | /// [Intel's Documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_cvtmask64_u64) |
6 | #[inline ] |
7 | #[target_feature (enable = "avx512bw" )] |
8 | #[unstable (feature = "stdarch_x86_avx512" , issue = "111137" )] |
9 | pub fn _cvtmask64_u64(a: __mmask64) -> u64 { |
10 | a |
11 | } |
12 | |
13 | /// Convert integer value a into an 64-bit mask, and store the result in k. |
14 | /// |
15 | /// [Intel's Documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_cvtu64_mask64) |
16 | #[inline ] |
17 | #[target_feature (enable = "avx512bw" )] |
18 | #[unstable (feature = "stdarch_x86_avx512" , issue = "111137" )] |
19 | pub fn _cvtu64_mask64(a: u64) -> __mmask64 { |
20 | a |
21 | } |
22 | |
23 | #[cfg (test)] |
24 | mod tests { |
25 | |
26 | use stdarch_test::simd_test; |
27 | |
28 | use crate::core_arch::{x86::*, x86_64::*}; |
29 | |
30 | #[simd_test(enable = "avx512bw" )] |
31 | unsafe fn test_cvtmask64_u64() { |
32 | let a: __mmask64 = 0b11001100_00110011_01100110_10011001; |
33 | let r = _cvtmask64_u64(a); |
34 | let e: u64 = 0b11001100_00110011_01100110_10011001; |
35 | assert_eq!(r, e); |
36 | } |
37 | |
38 | #[simd_test(enable = "avx512bw" )] |
39 | unsafe fn test_cvtu64_mask64() { |
40 | let a: u64 = 0b11001100_00110011_01100110_10011001; |
41 | let r = _cvtu64_mask64(a); |
42 | let e: __mmask64 = 0b11001100_00110011_01100110_10011001; |
43 | assert_eq!(r, e); |
44 | } |
45 | } |
46 | |