Skip to content

Commit ec00394

Browse files
Tsung-Wei HuangTsung-Wei Huang
authored andcommitted
updated README
1 parent 0e82045 commit ec00394

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ The table below summarizes its commonly used methods.
214214
| linearize | task list | none | create a linear dependency in the given task list |
215215
| parallel_for | beg, end, callable, group | task pair | apply the callable in parallel and group-by-group to the result of dereferencing every iterator in the range |
216216
| reduce | beg, end, res, bop, group | task pair | apply a binary operator group-by-group to reduce a range of elements to a single result |
217-
| transform_reduce | beg, end, res, bop, uop, group | task pair | apply a unary operator to each element in the range and reduce the returns to a single result group-by-group through a binary operator |
217+
| transform_reduce | beg, end, res, bop, uop, group | task pair | apply a unary operator to each element in the range and reduce them to a single result group-by-group through a binary operator |
218218
| dispatch | none | future | dispatch the current graph and return a shared future to block on completeness |
219219
| silent_dispatch | none | none | dispatch the current graph |
220220
| wait_for_all | none | none | dispatch the current graph and block until all graphs including previously dispatched ones finish |

example/reduce.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ void reduce() {
2121
for(int i=0; i<40000000; ++i) {
2222
data.push_back(::rand());
2323
}
24+
25+
std::cout << "Benchmark: reduce" << std::endl;
2426

2527
// sequential method
26-
std::cout << "running sequential method ..." << std::endl;
2728
auto sbeg = std::chrono::steady_clock::now();
2829
auto smin = std::numeric_limits<int>::max();
2930
for(auto& d : data) {
@@ -35,7 +36,6 @@ void reduce() {
3536
<< std::endl;
3637

3738
// taskflow
38-
std::cout << "running taskflow method ..." << std::endl;
3939
auto tbeg = std::chrono::steady_clock::now();
4040
tf::Taskflow tf;
4141
auto tmin = std::numeric_limits<int>::max();
@@ -57,7 +57,7 @@ void transform_reduce() {
5757

5858
std::cout << "Benchmark: transform_reduce" << std::endl;
5959

60-
std::vector<Data> data(40000000);
60+
std::list<Data> data(40000000);
6161

6262
// sequential method
6363
auto sbeg = std::chrono::steady_clock::now();

0 commit comments

Comments
 (0)