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"
|
version = "1.0.0"
|
||||||
|
|
||||||
[target.'cfg(unix)'.dev-dependencies]
|
[target.'cfg(unix)'.dev-dependencies]
|
||||||
simd = "0.1"
|
packed_simd = "0.3.3"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["alloc", "valgrind"]
|
default = ["alloc", "valgrind"]
|
||||||
|
|
|
@ -18,7 +18,7 @@ mod imp;
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
extern crate test;
|
extern crate test;
|
||||||
extern crate simd;
|
extern crate packed_simd;
|
||||||
|
|
||||||
use arch::{self, StackPointer};
|
use arch::{self, StackPointer};
|
||||||
use ::OsStack;
|
use ::OsStack;
|
||||||
|
@ -48,12 +48,12 @@ mod tests {
|
||||||
fn context_simd() {
|
fn context_simd() {
|
||||||
unsafe extern "C" fn permuter(arg: usize, stack_ptr: StackPointer) -> ! {
|
unsafe extern "C" fn permuter(arg: usize, stack_ptr: StackPointer) -> ! {
|
||||||
// This will crash if the stack is not aligned properly.
|
// 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;
|
let y = x * x;
|
||||||
println!("simd result: {:?}", y);
|
println!("simd result: {:?}", y);
|
||||||
let (_, stack_ptr) = arch::swap(0, stack_ptr, None);
|
let (_, stack_ptr) = arch::swap(0, stack_ptr, None);
|
||||||
// And try again after a context switch.
|
// 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;
|
let y = x * x;
|
||||||
println!("simd result: {:?}", y);
|
println!("simd result: {:?}", y);
|
||||||
arch::swap(0, stack_ptr, None);
|
arch::swap(0, stack_ptr, None);
|
||||||
|
|
Loading…
Reference in New Issue