diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2019-08-05 16:28:27 +0200 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2019-08-05 16:28:27 +0200 |
| commit | 7602a46bb9421afc4e158326f438b1853503b804 (patch) | |
| tree | ea5853295e3aefb5d2ba41d7d7f6abe2b3db3f77 /example | |
| parent | a1dd460714f05610a5bb9ccbfd5d69cc1478e3f5 (diff) | |
| download | rust-7602a46bb9421afc4e158326f438b1853503b804.tar.gz rust-7602a46bb9421afc4e158326f438b1853503b804.zip | |
Implement simd_extract
Diffstat (limited to 'example')
| -rw-r--r-- | example/std_example.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/example/std_example.rs b/example/std_example.rs index 63227acc4bd..1337c314766 100644 --- a/example/std_example.rs +++ b/example/std_example.rs @@ -72,6 +72,7 @@ unsafe fn test_simd() { test_mm_add_epi8(); test_mm_add_pd(); test_mm_cvtepi8_epi16(); + test_mm_cvtsi128_si64(); let mask1 = _mm_movemask_epi8(dbg!(_mm_setr_epi8(255u8 as i8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0))); assert_eq!(mask1, 1); @@ -174,6 +175,12 @@ pub unsafe fn assert_eq_m128d(a: __m128d, b: __m128d) { } } +#[target_feature(enable = "sse2")] +unsafe fn test_mm_cvtsi128_si64() { + let r = _mm_cvtsi128_si64(std::mem::transmute::<[i64; 2], _>([5, 0])); + assert_eq!(r, 5); +} + #[target_feature(enable = "sse4.1")] unsafe fn test_mm_cvtepi8_epi16() { let a = _mm_set1_epi8(10); |
