std: Move simd to core::simd and reexport. #1457

[breaking-change]
This commit is contained in:
Brian Anderson
2014-05-20 20:24:17 -07:00
parent 1240197a5b
commit 1a1e6c8e73
10 changed files with 17 additions and 15 deletions

View File

@@ -53,7 +53,7 @@
html_root_url = "http://doc.rust-lang.org/")] html_root_url = "http://doc.rust-lang.org/")]
#![no_std] #![no_std]
#![feature(globs, macro_rules, managed_boxes, phase)] #![feature(globs, macro_rules, managed_boxes, phase, simd)]
#![deny(missing_doc)] #![deny(missing_doc)]
#[cfg(test)] extern crate realcore = "core"; #[cfg(test)] extern crate realcore = "core";
@@ -124,6 +124,7 @@ pub mod iter;
pub mod option; pub mod option;
pub mod raw; pub mod raw;
pub mod result; pub mod result;
pub mod simd;
pub mod slice; pub mod slice;
pub mod str; pub mod str;
pub mod tuple; pub mod tuple;

View File

@@ -11,6 +11,7 @@
//! SIMD vectors //! SIMD vectors
#![allow(non_camel_case_types)] #![allow(non_camel_case_types)]
#![allow(missing_doc)]
#[experimental] #[experimental]
#[simd] #[simd]

View File

@@ -103,7 +103,7 @@
html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://doc.rust-lang.org/")] html_root_url = "http://doc.rust-lang.org/")]
#![feature(macro_rules, globs, asm, managed_boxes, thread_local, link_args, #![feature(macro_rules, globs, asm, managed_boxes, thread_local, link_args,
simd, linkage, default_type_params, phase, concat_idents, quad_precision_float)] linkage, default_type_params, phase, concat_idents, quad_precision_float)]
// Don't link to std. We are std. // Don't link to std. We are std.
#![no_std] #![no_std]
@@ -151,6 +151,7 @@ pub use core::mem;
#[cfg(not(test))] pub use core::ops; #[cfg(not(test))] pub use core::ops;
pub use core::ptr; pub use core::ptr;
pub use core::raw; pub use core::raw;
pub use core::simd;
pub use core::tuple; pub use core::tuple;
#[cfg(not(test))] pub use core::ty; #[cfg(not(test))] pub use core::ty;
pub use core::result; pub use core::result;

View File

@@ -14,7 +14,6 @@ pub use core::finally;
pub mod dynamic_lib; pub mod dynamic_lib;
pub mod simd;
pub mod sync; pub mod sync;
pub mod mutex; pub mod mutex;

View File

@@ -17,7 +17,7 @@ extern crate sync;
use std::io; use std::io;
use std::os; use std::os;
use std::unstable::simd::f64x2; use std::simd::f64x2;
use sync::Future; use sync::Future;
use sync::Arc; use sync::Arc;

View File

@@ -12,26 +12,26 @@
#![allow(experimental)] #![allow(experimental)]
use std::unstable::simd::f32x4; use std::simd::f32x4;
fn main() { fn main() {
let _ = f32x4(0.0, 0.0, 0.0, 0.0) == f32x4(0.0, 0.0, 0.0, 0.0); let _ = f32x4(0.0, 0.0, 0.0, 0.0) == f32x4(0.0, 0.0, 0.0, 0.0);
//~^ ERROR binary comparison operation `==` not supported for floating point SIMD vector `std::unstable::simd::f32x4` //~^ ERROR binary comparison operation `==` not supported for floating point SIMD vector `core::simd::f32x4`
let _ = f32x4(0.0, 0.0, 0.0, 0.0) != f32x4(0.0, 0.0, 0.0, 0.0); let _ = f32x4(0.0, 0.0, 0.0, 0.0) != f32x4(0.0, 0.0, 0.0, 0.0);
//~^ ERROR binary comparison operation `!=` not supported for floating point SIMD vector `std::unstable::simd::f32x4` //~^ ERROR binary comparison operation `!=` not supported for floating point SIMD vector `core::simd::f32x4`
let _ = f32x4(0.0, 0.0, 0.0, 0.0) < f32x4(0.0, 0.0, 0.0, 0.0); let _ = f32x4(0.0, 0.0, 0.0, 0.0) < f32x4(0.0, 0.0, 0.0, 0.0);
//~^ ERROR binary comparison operation `<` not supported for floating point SIMD vector `std::unstable::simd::f32x4` //~^ ERROR binary comparison operation `<` not supported for floating point SIMD vector `core::simd::f32x4`
let _ = f32x4(0.0, 0.0, 0.0, 0.0) <= f32x4(0.0, 0.0, 0.0, 0.0); let _ = f32x4(0.0, 0.0, 0.0, 0.0) <= f32x4(0.0, 0.0, 0.0, 0.0);
//~^ ERROR binary comparison operation `<=` not supported for floating point SIMD vector `std::unstable::simd::f32x4` //~^ ERROR binary comparison operation `<=` not supported for floating point SIMD vector `core::simd::f32x4`
let _ = f32x4(0.0, 0.0, 0.0, 0.0) >= f32x4(0.0, 0.0, 0.0, 0.0); let _ = f32x4(0.0, 0.0, 0.0, 0.0) >= f32x4(0.0, 0.0, 0.0, 0.0);
//~^ ERROR binary comparison operation `>=` not supported for floating point SIMD vector `std::unstable::simd::f32x4` //~^ ERROR binary comparison operation `>=` not supported for floating point SIMD vector `core::simd::f32x4`
let _ = f32x4(0.0, 0.0, 0.0, 0.0) > f32x4(0.0, 0.0, 0.0, 0.0); let _ = f32x4(0.0, 0.0, 0.0, 0.0) > f32x4(0.0, 0.0, 0.0, 0.0);
//~^ ERROR binary comparison operation `>` not supported for floating point SIMD vector `std::unstable::simd::f32x4` //~^ ERROR binary comparison operation `>` not supported for floating point SIMD vector `core::simd::f32x4`
} }

View File

@@ -10,7 +10,7 @@
#![deny(experimental)] #![deny(experimental)]
use std::unstable::simd; use std::simd;
fn main() { fn main() {
let _ = simd::i64x2(0, 0); //~ ERROR: experimental let _ = simd::i64x2(0, 0); //~ ERROR: experimental

View File

@@ -43,7 +43,7 @@
#![allow(experimental)] #![allow(experimental)]
#![allow(unused_variable)] #![allow(unused_variable)]
use std::unstable::simd::{i8x16, i16x8,i32x4,i64x2,u8x16,u16x8,u32x4,u64x2,f32x4,f64x2}; use std::simd::{i8x16, i16x8,i32x4,i64x2,u8x16,u16x8,u32x4,u64x2,f32x4,f64x2};
fn main() { fn main() {

View File

@@ -10,7 +10,7 @@
#![allow(experimental)] #![allow(experimental)]
use std::unstable::simd::{i32x4, f32x4, u32x4}; use std::simd::{i32x4, f32x4, u32x4};
fn eq_u32x4(u32x4(x0, x1, x2, x3): u32x4, u32x4(y0, y1, y2, y3): u32x4) -> bool { fn eq_u32x4(u32x4(x0, x1, x2, x3): u32x4, u32x4(y0, y1, y2, y3): u32x4) -> bool {
(x0 == y0) && (x1 == y1) && (x2 == y2) && (x3 == y3) (x0 == y0) && (x1 == y1) && (x2 == y2) && (x3 == y3)

View File

@@ -13,5 +13,5 @@
#![feature(simd)] #![feature(simd)]
pub fn main() { pub fn main() {
let _o = None::<std::unstable::simd::i32x4>; let _o = None::<std::simd::i32x4>;
} }