File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,12 @@ use crate::simd::{
8
8
/// `Simd<T, N>` supports the operators (+, *, etc.) that `T` does in "elementwise" fashion.
9
9
/// These take the element at each index from the left-hand side and right-hand side,
10
10
/// 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.
12
17
///
13
18
/// ```rust
14
19
/// # #![feature(portable_simd)]
You can’t perform that action at this time.
0 commit comments