Skip to content

Commit 8b69e2a

Browse files
committed
ocd
1 parent 64a3ce6 commit 8b69e2a

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

text/0000-ppv.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,11 @@ Operations on vector types can be either:
174174
`false` for each of the vector lanes. Most vertical operations are binary operations (they take two input vectors). These operations are typically very fast on most architectures and they are the most widely used in practice.
175175

176176
* **horizontal**: that is, along a single vector - they are unary operations.
177-
For example, `a.sum()` adds the elements of a vector together while `a.hmax()`
178-
returns the largest element in a vector. These operations (typically)
179-
translate to a sequence of multiple SIMD instructions on most architectures
180-
and are therefore slower. In many cases, they are, however, necessary.
177+
For example, `a.sum()` adds the elements of a vector together while
178+
`a.hmax()` returns the largest element in a vector. These operations
179+
(typically) translate to a sequence of multiple SIMD instructions on most
180+
architectures and are therefore slower. In many cases, they are, however,
181+
necessary.
181182

182183
## Example: Average
183184

@@ -403,7 +404,6 @@ implement the following methods:
403404

404405
```rust
405406
impl {element_type}{lane_width}x{number_of_lanes} {
406-
407407
/// Creates a new instance of the vector from `number_of_lanes`
408408
/// values.
409409
pub const fn new(args...: element_type) -> Self;
@@ -448,7 +448,6 @@ All portable vector types implement the following methods:
448448

449449
```rust
450450
impl {element_type}{lane_width}x{number_of_lanes} {
451-
452451
/// Writes the values of the vector to the `slice`.
453452
///
454453
/// # Panics
@@ -595,7 +594,6 @@ methods:
595594

596595
```rust
597596
impl {element_type}{lane_width}x{number_of_lanes} {
598-
599597
/// Horizontal wrapping sum of the vector elements.
600598
///
601599
/// The intrinsic performs a tree-reduction of the vector elements.
@@ -626,7 +624,6 @@ All portable floating-point vector types implement the following methods:
626624

627625
```rust
628626
impl {element_type}{lane_width}x{number_of_lanes} {
629-
630627
/// Horizontal sum of the vector elements.
631628
///
632629
/// The intrinsic performs a tree-reduction of the vector elements.
@@ -996,7 +993,7 @@ implemented on top of the architecture specific types.
996993
## Zero-overhead requirement for backends
997994

998995
A future architecture might have an instruction that performs multiple
999-
operations exposed by this API in one go, like `(a + b).sum()` on an
996+
operations exposed by this API in one go, like `(a + b).wrapping_sum()` on an
1000997
`f32x4` vector. The zero-overhead requirement makes it a bug if Rust does not
1001998
generate optimal code for this situation.
1002999

0 commit comments

Comments
 (0)