diff options
| author | Andrew Gallant <jamslam@gmail.com> | 2017-06-19 17:03:29 -0400 |
|---|---|---|
| committer | Andrew Gallant <jamslam@gmail.com> | 2017-06-19 17:06:53 -0400 |
| commit | e975e22c20e583cddf4d4d042f30bc7c96e15ab1 (patch) | |
| tree | 223b2f3445992c017d7c87e9a53fc1ba58cc4ade /library/stdarch/examples | |
| parent | 1450e641a5ff66f0cef42314c79fbbd587db6e87 (diff) | |
| download | rust-e975e22c20e583cddf4d4d042f30bc7c96e15ab1.tar.gz rust-e975e22c20e583cddf4d4d042f30bc7c96e15ab1.zip | |
refactor
Diffstat (limited to 'library/stdarch/examples')
| -rw-r--r-- | library/stdarch/examples/play.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/library/stdarch/examples/play.rs b/library/stdarch/examples/play.rs index bc4297c2d79..9bcdde0de9d 100644 --- a/library/stdarch/examples/play.rs +++ b/library/stdarch/examples/play.rs @@ -3,7 +3,8 @@ extern crate stdsimd; use std::env; -use stdsimd as s; +use stdsimd::simd as s; +use stdsimd::vendor; #[inline(never)] #[target_feature = "+sse4.2"] @@ -14,15 +15,15 @@ fn index(needle: &str, haystack: &str) -> usize { let mut needle = needle.to_string().into_bytes(); needle.resize(16, 0); - let vneedle = s::__m128i::from(s::u8x16::load(&needle, 0)); + let vneedle = vendor::__m128i::from(s::u8x16::load(&needle, 0)); let mut haystack = haystack.to_string().into_bytes(); haystack.resize(16, 0); - let vhaystack = s::__m128i::from(s::u8x16::load(&haystack, 0)); + let vhaystack = vendor::__m128i::from(s::u8x16::load(&haystack, 0)); - s::_mm_cmpestri( + vendor::_mm_cmpestri( vneedle, needle_len as i32, vhaystack, hay_len as i32, - s::_SIDD_CMP_EQUAL_ORDERED) as usize + vendor::_SIDD_CMP_EQUAL_ORDERED) as usize } fn main() { |
