Replace simd with packed_simd
The simd crate no longer builds, as of Rust 1.33 nightly, due to the removal of compiler features that it depends on. packed_simd is the recommended replacement.
This commit is contained in:
parent
cf299f8413
commit
5849a2d330
@ -16,7 +16,7 @@ optional = true
|
||||
version = "1.0.0"
|
||||
|
||||
[target.'cfg(unix)'.dev-dependencies]
|
||||
simd = "0.1"
|
||||
packed_simd = "0.3.3"
|
||||
|
||||
[features]
|
||||
default = ["alloc", "valgrind"]
|
||||
|
@ -18,7 +18,7 @@ mod imp;
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
extern crate test;
|
||||
extern crate simd;
|
||||
extern crate packed_simd;
|
||||
|
||||
use arch::{self, StackPointer};
|
||||
use ::OsStack;
|
||||
@ -48,12 +48,12 @@ mod tests {
|
||||
fn context_simd() {
|
||||
unsafe extern "C" fn permuter(arg: usize, stack_ptr: StackPointer) -> ! {
|
||||
// This will crash if the stack is not aligned properly.
|
||||
let x = simd::i32x4::splat(arg as i32);
|
||||
let x = packed_simd::i32x4::splat(arg as i32);
|
||||
let y = x * x;
|
||||
println!("simd result: {:?}", y);
|
||||
let (_, stack_ptr) = arch::swap(0, stack_ptr, None);
|
||||
// And try again after a context switch.
|
||||
let x = simd::i32x4::splat(arg as i32);
|
||||
let x = packed_simd::i32x4::splat(arg as i32);
|
||||
let y = x * x;
|
||||
println!("simd result: {:?}", y);
|
||||
arch::swap(0, stack_ptr, None);
|
||||
|
Loading…
Reference in New Issue
Block a user