Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document that the sum in the examples is a parallel reduction #459

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ fn sum_of_squares(input: &[i32]) -> i32 {
}
```

Note that the `sum()` call is not a sequential one. It is, precisely,
a logarithmic, tree-like reduction known from, for example, OpenMP.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate what you're trying to say, but it's worded a bit awkwardly, especially with two parentheticals. Can you try simplifying the second sentence?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I completely forgot about it. Is the change still relevant or should I go ahead simplifying it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a new paragraph following the example you're describing, but I'm not sure if that leads the reader in the same direction that you're addressing. I'll let you look at the context to see if you think your addition is still needed. (My own familiarity makes it harder to judge what could be confusing for newcomers...)


Or, to increment all the integers in a slice, you could write:

```rust
Expand Down