about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2014-05-23 11:02:04 -0700
committerBrian Anderson <banderson@mozilla.com>2014-05-23 15:28:30 -0700
commiteea66e1697ea3cea5f8b56f0d1ea5ff968096fd7 (patch)
treeab61f2612b3fe16cd559d67197d138f05438b50d /src/libcore
parent8e58ec5b9d5c473b28124692ee8aa77e2e835b33 (diff)
downloadrust-eea66e1697ea3cea5f8b56f0d1ea5ff968096fd7.tar.gz
rust-eea66e1697ea3cea5f8b56f0d1ea5ff968096fd7.zip
core: Document simd mod
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/simd.rs26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/libcore/simd.rs b/src/libcore/simd.rs
index c0825c3fc29..6f860dfdbcd 100644
--- a/src/libcore/simd.rs
+++ b/src/libcore/simd.rs
@@ -8,7 +8,31 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-//! SIMD vectors
+//! SIMD vectors.
+//!
+//! These types can be used for accessing basic SIMD operations. Each of them
+//! implements the standard arithmetic operator traits (Add, Sub, Mul, Div,
+//! Rem, Shl, Shr) through compiler magic, rather than explicitly. Currently
+//! comparison operators are not implemented. To use SSE3+, you must enable
+//! the features, like `-C target-feature=sse3,sse4.1,sse4.2`, or a more
+//! specific `target-cpu`. No other SIMD intrinsics or high-level wrappers are
+//! provided beyond this module.
+//!
+//! ```rust
+//! #[allow(experimental)];
+//!
+//! fn main() {
+//!     use std::simd::f32x4;
+//!     let a = f32x4(40.0, 41.0, 42.0, 43.0);
+//!     let b = f32x4(1.0, 1.1, 3.4, 9.8);
+//!     println!("{}", a + b);
+//! }
+//! ```
+//!
+//! ## Stability Note
+//!
+//! These are all experimental. The inferface may change entirely, without
+//! warning.
 
 #![allow(non_camel_case_types)]
 #![allow(missing_doc)]