Skip to content

Commit 32e61b7

Browse files
updated doxygen
1 parent f9b1328 commit 32e61b7

5 files changed

Lines changed: 53 additions & 56 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,8 +580,8 @@ The table below summarizes a list of commonly used methods.
580580
| -------- | --------- | ------- | ----------- |
581581
| emplace | callables | tasks | create a task with a given callable(s) |
582582
| placeholder | none | task | insert a node without any work; work can be assigned later |
583-
| 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 |
584-
| parallel_for | beg, end, step, callable, group | task pair | apply the callable in parallel and group-by-group to a index-based range |
583+
| parallel_for | beg, end, callable, partitions | task pair | apply the callable in parallel and partition-by-partition to the result of dereferencing every iterator in the range |
584+
| parallel_for | beg, end, step, callable, partitions | task pair | apply the callable in parallel and partition-by-partition to a index-based range |
585585
| reduce | beg, end, res, bop | task pair | reduce a range of elements to a single result through a binary operator |
586586
| transform_reduce | beg, end, res, bop, uop | task pair | apply a unary operator to each element in the range and reduce them to a single result through a binary operator |
587587
| num_workers | none | size | query the number of working threads in the pool |

docs/classtf_1_1FlowBuilder.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#a644d7ff0f19ca155a2e7d56b
586586
</div><div class="memdoc">
587587

588588
<p>constructs a task dependency graph of range-based parallel_for </p>
589-
<p>The task dependency graph applies a callable object to the dereferencing of every iterator in the range [beg, end) chunk-by-chunk.</p>
589+
<p>The task dependency graph applies a callable object to the dereferencing of every iterator in the range [beg, end) partition-by-partition.</p>
590590
<dl class="tparams"><dt>Template Parameters</dt><dd>
591591
<table class="tparams">
592592
<tr><td class="paramname">I</td><td>input iterator type </td></tr>
@@ -654,7 +654,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#acfce9d2800a097202bdd4047
654654
</div><div class="memdoc">
655655

656656
<p>constructs a task dependency graph of index-based parallel_for </p>
657-
<p>The task dependency graph applies a callable object to every index in the range [beg, end) with a step size chunk-by-chunk.</p>
657+
<p>The task dependency graph applies a callable object to every index in the range [beg, end) with a step size partition-by-partition.</p>
658658
<dl class="tparams"><dt>Template Parameters</dt><dd>
659659
<table class="tparams">
660660
<tr><td class="paramname">I</td><td>arithmetic index type </td></tr>

docs/executor_8hpp_source.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
<div class="ttc" id="namespacetf_html"><div class="ttname"><a href="namespacetf.html">tf</a></div><div class="ttdef"><b>Definition:</b> taskflow.hpp:5</div></div>
110110
<div class="ttc" id="hardware_concurrency_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/thread/thread/hardware_concurrency.html">std::thread::hardware_concurrency</a></div><div class="ttdeci">T hardware_concurrency(T... args)</div></div>
111111
<div class="ttc" id="mutex_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/thread/mutex.html">std::mutex</a></div></div>
112-
<div class="ttc" id="classtf_1_1Subflow_html_a185a0cba35c5f208029ea207e9be0b5f"><div class="ttname"><a href="classtf_1_1Subflow.html#a185a0cba35c5f208029ea207e9be0b5f">tf::Subflow::detached</a></div><div class="ttdeci">bool detached() const</div><div class="ttdoc">queries if the subflow will be detached from its parent task </div><div class="ttdef"><b>Definition:</b> flow_builder.hpp:872</div></div>
112+
<div class="ttc" id="classtf_1_1Subflow_html_a185a0cba35c5f208029ea207e9be0b5f"><div class="ttname"><a href="classtf_1_1Subflow.html#a185a0cba35c5f208029ea207e9be0b5f">tf::Subflow::detached</a></div><div class="ttdeci">bool detached() const</div><div class="ttdoc">queries if the subflow will be detached from its parent task </div><div class="ttdef"><b>Definition:</b> flow_builder.hpp:869</div></div>
113113
<div class="ttc" id="classtf_1_1Executor_html_a7f43cde72d3e0a17e2d006cbe7a41ff3"><div class="ttname"><a href="classtf_1_1Executor.html#a7f43cde72d3e0a17e2d006cbe7a41ff3">tf::Executor::make_observer</a></div><div class="ttdeci">Observer * make_observer(Args &amp;&amp;... args)</div><div class="ttdoc">constructs an observer to inspect the activities of worker threads </div><div class="ttdef"><b>Definition:</b> executor.hpp:476</div></div>
114114
<div class="ttc" id="classtf_1_1WorkStealingQueue_html_a22aac5bd13c0f1120ddfe8289846fd1d"><div class="ttname"><a href="classtf_1_1WorkStealingQueue.html#a22aac5bd13c0f1120ddfe8289846fd1d">tf::WorkStealingQueue::unsync_pop</a></div><div class="ttdeci">std::optional&lt; T &gt; unsync_pop()</div><div class="ttdoc">pops out an item from the queue without synchronization with thieves </div><div class="ttdef"><b>Definition:</b> spmc_queue.hpp:249</div></div>
115115
<div class="ttc" id="classtf_1_1Taskflow_html"><div class="ttname"><a href="classtf_1_1Taskflow.html">tf::Taskflow</a></div><div class="ttdoc">the class to create a task dependency graph </div><div class="ttdef"><b>Definition:</b> core/taskflow.hpp:15</div></div>
@@ -125,7 +125,7 @@
125125
<div class="ttc" id="classtf_1_1WorkStealingQueue_html_a6b63dca550a2f576b92f05bdc2e03a74"><div class="ttname"><a href="classtf_1_1WorkStealingQueue.html#a6b63dca550a2f576b92f05bdc2e03a74">tf::WorkStealingQueue::steal</a></div><div class="ttdeci">std::optional&lt; T &gt; steal()</div><div class="ttdoc">steals an item from the queue </div><div class="ttdef"><b>Definition:</b> spmc_queue.hpp:269</div></div>
126126
<div class="ttc" id="classtf_1_1Executor_html_a10e0189c6403293c276b72bb1158557e"><div class="ttname"><a href="classtf_1_1Executor.html#a10e0189c6403293c276b72bb1158557e">tf::Executor::Executor</a></div><div class="ttdeci">Executor(unsigned n=std::thread::hardware_concurrency())</div><div class="ttdoc">constructs the executor with N worker threads </div><div class="ttdef"><b>Definition:</b> executor.hpp:240</div></div>
127127
<div class="ttc" id="mersenne_twister_engine_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/random/mersenne_twister_engine.html">std::mt19937</a></div></div>
128-
<div class="ttc" id="classtf_1_1Subflow_html"><div class="ttname"><a href="classtf_1_1Subflow.html">tf::Subflow</a></div><div class="ttdoc">The building blocks of dynamic tasking. </div><div class="ttdef"><b>Definition:</b> flow_builder.hpp:820</div></div>
128+
<div class="ttc" id="classtf_1_1Subflow_html"><div class="ttname"><a href="classtf_1_1Subflow.html">tf::Subflow</a></div><div class="ttdoc">The building blocks of dynamic tasking. </div><div class="ttdef"><b>Definition:</b> flow_builder.hpp:817</div></div>
129129
<div class="ttc" id="classtf_1_1Executor_html_adca6cd0ce1bd7e6fa2ed2a55c9ae15e6"><div class="ttname"><a href="classtf_1_1Executor.html#adca6cd0ce1bd7e6fa2ed2a55c9ae15e6">tf::Executor::run_n</a></div><div class="ttdeci">std::future&lt; void &gt; run_n(Taskflow &amp;taskflow, size_t N)</div><div class="ttdoc">runs the taskflow for N times </div><div class="ttdef"><b>Definition:</b> executor.hpp:758</div></div>
130130
<div class="ttc" id="classtf_1_1Executor_html_ab9aa252f70e9a40020a1e5a89d485b85"><div class="ttname"><a href="classtf_1_1Executor.html#ab9aa252f70e9a40020a1e5a89d485b85">tf::Executor::wait_for_all</a></div><div class="ttdeci">void wait_for_all()</div><div class="ttdoc">wait for all pending graphs to complete </div><div class="ttdef"><b>Definition:</b> executor.hpp:908</div></div>
131131
</div><!-- fragment --></div><!-- contents -->

docs/flow__builder_8hpp_source.html

Lines changed: 19 additions & 19 deletions
Large diffs are not rendered by default.

taskflow/core/flow_builder.hpp

Lines changed: 28 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class FlowBuilder {
6262
6363
The task dependency graph applies a callable object
6464
to the dereferencing of every iterator
65-
in the range [beg, end) chunk-by-chunk.
65+
in the range [beg, end) partition-by-partition.
6666
6767
@tparam I input iterator type
6868
@tparam C callable type
@@ -81,7 +81,7 @@ class FlowBuilder {
8181
@brief constructs a task dependency graph of index-based parallel_for
8282
8383
The task dependency graph applies a callable object to every index
84-
in the range [beg, end) with a step size chunk-by-chunk.
84+
in the range [beg, end) with a step size partition-by-partition.
8585
8686
@tparam I arithmetic index type
8787
@tparam C callable type
@@ -271,9 +271,6 @@ class FlowBuilder {
271271

272272
template <typename L>
273273
void _linearize(L&);
274-
275-
template <typename I>
276-
size_t _estimate_chunk_size(I, I, I);
277274
};
278275

279276
// Constructor
@@ -685,32 +682,32 @@ std::pair<Task, Task> FlowBuilder::transform_reduce(
685682
return std::make_pair(source, target);
686683
}
687684

688-
// Function: _estimate_chunk_size
689-
template <typename I>
690-
size_t FlowBuilder::_estimate_chunk_size(I beg, I end, I step) {
691-
692-
using T = std::decay_t<I>;
693-
694-
size_t w = std::max(unsigned{1}, std::thread::hardware_concurrency());
695-
size_t N = 0;
696-
697-
if constexpr(std::is_integral_v<T>) {
698-
if(beg <= end) {
699-
N = (end - beg + step - 1) / step;
700-
}
701-
else {
702-
N = (end - beg + step + 1) / step;
703-
}
704-
}
705-
else if constexpr(std::is_floating_point_v<T>) {
706-
N = static_cast<size_t>(std::ceil((end - beg) / step));
707-
}
708-
else {
709-
static_assert(dependent_false_v<T>, "can't deduce chunk size");
710-
}
711-
712-
return (N + w - 1) / w;
713-
}
685+
//// Function: _estimate_chunk_size
686+
//template <typename I>
687+
//size_t FlowBuilder::_estimate_chunk_size(I beg, I end, I step) {
688+
//
689+
// using T = std::decay_t<I>;
690+
//
691+
// size_t w = std::max(unsigned{1}, std::thread::hardware_concurrency());
692+
// size_t N = 0;
693+
//
694+
// if constexpr(std::is_integral_v<T>) {
695+
// if(beg <= end) {
696+
// N = (end - beg + step - 1) / step;
697+
// }
698+
// else {
699+
// N = (end - beg + step + 1) / step;
700+
// }
701+
// }
702+
// else if constexpr(std::is_floating_point_v<T>) {
703+
// N = static_cast<size_t>(std::ceil((end - beg) / step));
704+
// }
705+
// else {
706+
// static_assert(dependent_false_v<T>, "can't deduce chunk size");
707+
// }
708+
//
709+
// return (N + w - 1) / w;
710+
//}
714711

715712

716713
// Procedure: _linearize

0 commit comments

Comments
 (0)