Skip to content

Commit

Permalink
Reduce header levels to try to generate table of contents
Browse files Browse the repository at this point in the history
  • Loading branch information
VoxSciurorum committed Aug 11, 2022
1 parent d245841 commit 41e865f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/doc/reference/reducers.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Reducers
author: John F. Carr
---

## Reducers
# Reducers

_Reducers_ are a new data type to help programmers avoid _{% defn
"data race", "data races" %}_. Data races happen when one thread
Expand All @@ -29,7 +29,7 @@ value (`0.0`), and an associative binary operation (`+`). The
operation does not need to be commutative. A reducer can hold a list
with the binary operation being concatenation.

### Reducers and views
## Reducers and views

OpenCilk ensures that every reference to a reducer uses a private
copy, called a _view_. The address of the current view can change at
Expand Down Expand Up @@ -61,7 +61,7 @@ needs to initialize or construct the variable just like any other.
See `<cilk/ostream_reducer.h>` for an example where the leftmost view
does not get the identity value.

### Declaring a reducer
## Declaring a reducer

A reducer is declared with the `cilk_reducer` keyword, with the
identity and reduce functions as arguments.
Expand Down Expand Up @@ -183,7 +183,7 @@ reducer-aware code.
}
```
### Limitations
## Limitations
In OpenCilk 2.0 a reducer must be a variable. Reducers may not be
dynamically allocated and may not be members of structures or arrays.
Expand Down Expand Up @@ -215,7 +215,7 @@ void g(int _Hyperobject *p)
}
```

### Porting from Cilk Plus
## Porting from Cilk Plus

The macros used by Intel Cilk Plus are no longer required.
The example from former `<cilk/reducer.h>`
Expand Down

0 comments on commit 41e865f

Please sign in to comment.