File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,12 @@ use crate::simd::{
88/// `Simd<T, N>` supports the operators (+, *, etc.) that `T` does in "elementwise" fashion.
99/// These take the element at each index from the left-hand side and right-hand side,
1010/// perform the operation, then return the result in the same index in a vector of equal size.
11- /// In other words, an elementwise operation is equivalent to a zip, then map.
11+ /// However, `Simd` differs from normal iteration and normal arrays:
12+ /// - `Simd<T, N>` executes `N` operations in a single step with no `break`s
13+ /// - `Simd<T, N>` can have an alignment greater than `T`, for better mechanical sympathy
14+ ///
15+ /// By always imposing these constraints on `Simd`, it is easier to compile elementwise operations
16+ /// into machine instructions that can themselves be executed in parallel.
1217///
1318/// ```rust
1419/// # #![feature(portable_simd)]
You can’t perform that action at this time.
0 commit comments