Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a41aad0

Browse files
release-3.4
1 parent 364abfd commit a41aad0

File tree

505 files changed

+18107
-11412
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

505 files changed

+18107
-11412
lines changed

docs/Algorithms.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<title>Taskflow Algorithms | Taskflow QuickStart</title>
66
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
77
<link rel="stylesheet" href="m-dark+documentation.compiled.css" />
8-
<link rel="icon" href="favicon.ico" type="image/vnd.microsoft.icon" />
8+
<link rel="icon" href="favicon.ico" type="image/x-icon" />
99
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
1010
<meta name="theme-color" content="#22272e" />
1111
</head>
@@ -87,13 +87,13 @@ <h1>
8787
</div>
8888
</div>
8989
</div>
90-
<script src="search-v2.js"></script>
91-
<script src="searchdata-v2.js" async="async"></script>
90+
<script src="search-v1.js"></script>
91+
<script src="searchdata-v1.js" async="async"></script>
9292
<footer><nav>
9393
<div class="m-container">
9494
<div class="m-row">
9595
<div class="m-col-l-10 m-push-l-1">
96-
<p>Taskflow handbook is part of the <a href="https://taskflow.github.io">Taskflow project</a>, copyright © <a href="https://tsung-wei-huang.github.io/">Dr. Tsung-Wei Huang</a>, 2018&ndash;2022.<br />Generated by <a href="https://doxygen.org/">Doxygen</a> 1.8.14 and <a href="https://mcss.mosra.cz/">m.css</a>.</p>
96+
<p>Taskflow handbook is part of the <a href="https://taskflow.github.io">Taskflow project</a>, copyright © <a href="https://tsung-wei-huang.github.io/">Dr. Tsung-Wei Huang</a>, 2018&ndash;2022.<br />Generated by <a href="https://doxygen.org/">Doxygen</a> 1.8.20 and <a href="https://mcss.mosra.cz/">m.css</a>.</p>
9797
</div>
9898
</div>
9999
</div>

docs/AsyncTasking.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<title>Cookbook &raquo; Asynchronous Tasking | Taskflow QuickStart</title>
66
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
77
<link rel="stylesheet" href="m-dark+documentation.compiled.css" />
8-
<link rel="icon" href="favicon.ico" type="image/vnd.microsoft.icon" />
8+
<link rel="icon" href="favicon.ico" type="image/x-icon" />
99
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
1010
<meta name="theme-color" content="#22272e" />
1111
</head>
@@ -49,13 +49,13 @@ <h1>
4949
<span class="m-breadcrumb"><a href="Cookbook.html">Cookbook</a> &raquo;</span>
5050
Asynchronous Tasking
5151
</h1>
52-
<nav class="m-block m-default">
52+
<div class="m-block m-default">
5353
<h3>Contents</h3>
5454
<ul>
5555
<li><a href="#LaunchAsynchronousTasksFromAnExecutor">Launch Asynchronous Tasks from an Executor</a></li>
5656
<li><a href="#LaunchAsynchronousTasksFromAnSubflow">Launch Asynchronous Tasks from a Subflow</a></li>
5757
</ul>
58-
</nav>
58+
</div>
5959
<p>This chapters discusses how to launch tasks asynchronously so that you can incorporate independent, dynamic parallelism in your taskflows.</p><section id="LaunchAsynchronousTasksFromAnExecutor"><h2><a href="#LaunchAsynchronousTasksFromAnExecutor">Launch Asynchronous Tasks from an Executor</a></h2><p>Taskflow executor provides a STL-styled method, <a href="classtf_1_1Executor.html#a1e6866c8f1b6a2e932f06d0b4eb032c0" class="m-doc">tf::<wbr />Executor::<wbr />async</a>, for you to run a callable object asynchronously. The method returns a <a href="classtf_1_1Future.html" class="m-doc">tf::<wbr />Future</a> object derived from <a href="https://en.cppreference.com/w/cpp/thread/future">std::<wbr />future</a> that will eventually hold the result of that function call. The result may be optional due to <a href="classtf_1_1Future.html#a3bf5f104864ab2590b6409712d3a469b" class="m-doc">tf::<wbr />Future::<wbr />cancel</a> (see <a href="RequestCancellation.html" class="m-doc">Request Cancellation</a> for details).</p><pre class="m-code"><span class="n">tf</span><span class="o">::</span><span class="n">Future</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">optional</span><span class="o">&lt;</span><span class="kt">int</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="n">future</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">executor</span><span class="p">.</span><span class="n">async</span><span class="p">([](){</span><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span><span class="w"> </span><span class="p">});</span><span class="w"></span>
6060
<span class="n">executor</span><span class="p">.</span><span class="n">wait_for_all</span><span class="p">();</span><span class="w"></span>
6161
<span class="n">assert</span><span class="p">(</span><span class="n">future</span><span class="p">.</span><span class="n">get</span><span class="p">()</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span><span class="w"></span>
@@ -146,13 +146,13 @@ <h3>Contents</h3>
146146
</div>
147147
</div>
148148
</div>
149-
<script src="search-v2.js"></script>
150-
<script src="searchdata-v2.js" async="async"></script>
149+
<script src="search-v1.js"></script>
150+
<script src="searchdata-v1.js" async="async"></script>
151151
<footer><nav>
152152
<div class="m-container">
153153
<div class="m-row">
154154
<div class="m-col-l-10 m-push-l-1">
155-
<p>Taskflow handbook is part of the <a href="https://taskflow.github.io">Taskflow project</a>, copyright © <a href="https://tsung-wei-huang.github.io/">Dr. Tsung-Wei Huang</a>, 2018&ndash;2022.<br />Generated by <a href="https://doxygen.org/">Doxygen</a> 1.8.14 and <a href="https://mcss.mosra.cz/">m.css</a>.</p>
155+
<p>Taskflow handbook is part of the <a href="https://taskflow.github.io">Taskflow project</a>, copyright © <a href="https://tsung-wei-huang.github.io/">Dr. Tsung-Wei Huang</a>, 2018&ndash;2022.<br />Generated by <a href="https://doxygen.org/">Doxygen</a> 1.8.20 and <a href="https://mcss.mosra.cz/">m.css</a>.</p>
156156
</div>
157157
</div>
158158
</div>

docs/BenchmarkTaskflow.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<title>Building and Installing &raquo; Benchmark Taskflow | Taskflow QuickStart</title>
66
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
77
<link rel="stylesheet" href="m-dark+documentation.compiled.css" />
8-
<link rel="icon" href="favicon.ico" type="image/vnd.microsoft.icon" />
8+
<link rel="icon" href="favicon.ico" type="image/x-icon" />
99
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
1010
<meta name="theme-color" content="#22272e" />
1111
</head>
@@ -49,7 +49,7 @@ <h1>
4949
<span class="m-breadcrumb"><a href="install.html">Building and Installing</a> &raquo;</span>
5050
Benchmark Taskflow
5151
</h1>
52-
<nav class="m-block m-default">
52+
<div class="m-block m-default">
5353
<h3>Contents</h3>
5454
<ul>
5555
<li><a href="#CompileAndRunBenchmarks">Compile and Run Benchmarks</a></li>
@@ -62,7 +62,7 @@ <h3>Contents</h3>
6262
</ul>
6363
</li>
6464
</ul>
65-
</nav>
65+
</div>
6666
<section id="CompileAndRunBenchmarks"><h2><a href="#CompileAndRunBenchmarks">Compile and Run Benchmarks</a></h2><p>To build the benchmark code, enable the CMake option <code>TF_BUILD_BENCHMARKS</code> to <code>ON</code> as follows:</p><pre class="m-console"><span class="gp"># </span>under /taskflow/build
6767
<span class="go">~$ cmake ../ -DTF_BUILD_BENCHMARKS=ON</span>
6868
<span class="go">~$ make</span></pre><p>After you successfully build the benchmark code, you can find all benchmark instances in the <code>benchmarks/</code> folder. You can run the executable of each instance in the corresponding folder.</p><pre class="m-console"><span class="go">~$ cd benchmarks &amp; ls</span>
@@ -135,13 +135,13 @@ <h3>Contents</h3>
135135
</div>
136136
</div>
137137
</div>
138-
<script src="search-v2.js"></script>
139-
<script src="searchdata-v2.js" async="async"></script>
138+
<script src="search-v1.js"></script>
139+
<script src="searchdata-v1.js" async="async"></script>
140140
<footer><nav>
141141
<div class="m-container">
142142
<div class="m-row">
143143
<div class="m-col-l-10 m-push-l-1">
144-
<p>Taskflow handbook is part of the <a href="https://taskflow.github.io">Taskflow project</a>, copyright © <a href="https://tsung-wei-huang.github.io/">Dr. Tsung-Wei Huang</a>, 2018&ndash;2022.<br />Generated by <a href="https://doxygen.org/">Doxygen</a> 1.8.14 and <a href="https://mcss.mosra.cz/">m.css</a>.</p>
144+
<p>Taskflow handbook is part of the <a href="https://taskflow.github.io">Taskflow project</a>, copyright © <a href="https://tsung-wei-huang.github.io/">Dr. Tsung-Wei Huang</a>, 2018&ndash;2022.<br />Generated by <a href="https://doxygen.org/">Doxygen</a> 1.8.20 and <a href="https://mcss.mosra.cz/">m.css</a>.</p>
145145
</div>
146146
</div>
147147
</div>

docs/CUDASTDExecutionPolicy.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<title>CUDA Standard Algorithms &raquo; Execution Policy | Taskflow QuickStart</title>
66
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
77
<link rel="stylesheet" href="m-dark+documentation.compiled.css" />
8-
<link rel="icon" href="favicon.ico" type="image/vnd.microsoft.icon" />
8+
<link rel="icon" href="favicon.ico" type="image/x-icon" />
99
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
1010
<meta name="theme-color" content="#22272e" />
1111
</head>
@@ -49,15 +49,15 @@ <h1>
4949
<span class="m-breadcrumb"><a href="cudaStandardAlgorithms.html">CUDA Standard Algorithms</a> &raquo;</span>
5050
Execution Policy
5151
</h1>
52-
<nav class="m-block m-default">
52+
<div class="m-block m-default">
5353
<h3>Contents</h3>
5454
<ul>
5555
<li><a href="#CUDASTDExecutionPolicyIncludeTheHeader">Include the Header</a></li>
5656
<li><a href="#CUDASTDParameterizePerformance">Parameterize Performance</a></li>
5757
<li><a href="#CUDASTDDefineAnExecutionPolicy">Define an Execution Policy</a></li>
5858
<li><a href="#CUDASTDAllocateMemoryBufferForAlgorithms">Allocate Memory Buffer for Algorithms</a></li>
5959
</ul>
60-
</nav>
60+
</div>
6161
<p>Taskflow provides standalone template methods for expressing common parallel algorithms on a GPU. Each of these methods is governed by an <em>execution policy object</em> to configure the kernel execution parameters.</p><section id="CUDASTDExecutionPolicyIncludeTheHeader"><h2><a href="#CUDASTDExecutionPolicyIncludeTheHeader">Include the Header</a></h2><p>You need to include the header file, <code>taskflow/cuda/cudaflow.hpp</code>, for creating a CUDA execution policy object.</p></section><section id="CUDASTDParameterizePerformance"><h2><a href="#CUDASTDParameterizePerformance">Parameterize Performance</a></h2><p>Taskflow parameterizes most CUDA algorithms in terms of <em>the number of threads per block</em> and <em>units of work per thread</em>, which can be specified in the execution policy template type, <a href="classtf_1_1cudaExecutionPolicy.html" class="m-doc">tf::<wbr />cudaExecutionPolicy</a>. The design is inspired by <a href="https://moderngpu.github.io/">Modern GPU Programming</a> authored by Sean Baxter to achieve high-performance GPU computing.</p></section><section id="CUDASTDDefineAnExecutionPolicy"><h2><a href="#CUDASTDDefineAnExecutionPolicy">Define an Execution Policy</a></h2><p>The following example defines an execution policy object, <code>policy</code>, which configures (1) each block to invoke 512 threads and (2) each of these <code>512</code> threads to perform <code>11</code> units of work. Block size must be a power of two. It is always a good idea to specify an odd number in the second parameter to avoid bank conflicts.</p><pre class="m-code"><span class="n">tf</span><span class="o">::</span><span class="n">cudaExecutionPolicy</span><span class="o">&lt;</span><span class="mi">512</span><span class="p">,</span><span class="w"> </span><span class="mi">11</span><span class="o">&gt;</span><span class="w"> </span><span class="n">policy</span><span class="p">;</span><span class="w"></span></pre><p>By default, the execution policy object is associated with the CUDA <em>default stream</em> (i.e., 0). Default stream can incur significant overhead due to the global synchronization. You can associate an execution policy with another stream as shown below:</p><pre class="m-code"><span class="n">cudaStream_t</span><span class="w"> </span><span class="n">my_stream</span><span class="p">;</span><span class="w"></span>
6262
<span class="n">cudaStreamCreate</span><span class="p">(</span><span class="o">&amp;</span><span class="n">my_stream</span><span class="p">);</span><span class="w"></span>
6363

@@ -104,13 +104,13 @@ <h3>Contents</h3>
104104
</div>
105105
</div>
106106
</div>
107-
<script src="search-v2.js"></script>
108-
<script src="searchdata-v2.js" async="async"></script>
107+
<script src="search-v1.js"></script>
108+
<script src="searchdata-v1.js" async="async"></script>
109109
<footer><nav>
110110
<div class="m-container">
111111
<div class="m-row">
112112
<div class="m-col-l-10 m-push-l-1">
113-
<p>Taskflow handbook is part of the <a href="https://taskflow.github.io">Taskflow project</a>, copyright © <a href="https://tsung-wei-huang.github.io/">Dr. Tsung-Wei Huang</a>, 2018&ndash;2022.<br />Generated by <a href="https://doxygen.org/">Doxygen</a> 1.8.14 and <a href="https://mcss.mosra.cz/">m.css</a>.</p>
113+
<p>Taskflow handbook is part of the <a href="https://taskflow.github.io">Taskflow project</a>, copyright © <a href="https://tsung-wei-huang.github.io/">Dr. Tsung-Wei Huang</a>, 2018&ndash;2022.<br />Generated by <a href="https://doxygen.org/">Doxygen</a> 1.8.20 and <a href="https://mcss.mosra.cz/">m.css</a>.</p>
114114
</div>
115115
</div>
116116
</div>

docs/CUDASTDFind.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<title>CUDA Standard Algorithms &raquo; Parallel Find | Taskflow QuickStart</title>
66
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
77
<link rel="stylesheet" href="m-dark+documentation.compiled.css" />
8-
<link rel="icon" href="favicon.ico" type="image/vnd.microsoft.icon" />
8+
<link rel="icon" href="favicon.ico" type="image/x-icon" />
99
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
1010
<meta name="theme-color" content="#22272e" />
1111
</head>
@@ -49,15 +49,15 @@ <h1>
4949
<span class="m-breadcrumb"><a href="cudaStandardAlgorithms.html">CUDA Standard Algorithms</a> &raquo;</span>
5050
Parallel Find
5151
</h1>
52-
<nav class="m-block m-default">
52+
<div class="m-block m-default">
5353
<h3>Contents</h3>
5454
<ul>
5555
<li><a href="#CUDASTDFindIncludeTheHeader">Include the Header</a></li>
5656
<li><a href="#CUDASTDFindItems">Find an Element in a Range</a></li>
5757
<li><a href="#CUDASTDFindMinItems">Find the Minimum Element in a Range</a></li>
5858
<li><a href="#CUDASTDFindMaxItems">Find the Maximum Element in a Range</a></li>
5959
</ul>
60-
</nav>
60+
</div>
6161
<p>Taskflow provides standalone template methods for finding elements in the given ranges using CUDA.</p><section id="CUDASTDFindIncludeTheHeader"><h2><a href="#CUDASTDFindIncludeTheHeader">Include the Header</a></h2><p>You need to include the header file, <code>taskflow/cuda/algorithm/find.hpp</code>, for using the parallel-find algorithm.</p></section><section id="CUDASTDFindItems"><h2><a href="#CUDASTDFindItems">Find an Element in a Range</a></h2><p><a href="namespacetf.html#a5f9dabd7c5d0fa5166cf76d9fa5a038e" class="m-doc">tf::<wbr />cuda_find_if</a> finds the index of the first element in the range <code>[first, last)</code> that satisfies the given criteria. This is equivalent to the parallel execution of the following loop:</p><pre class="m-code"><span class="kt">unsigned</span><span class="w"> </span><span class="n">idx</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"></span>
6262
<span class="k">for</span><span class="p">(;</span><span class="w"> </span><span class="n">first</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">last</span><span class="p">;</span><span class="w"> </span><span class="o">++</span><span class="n">first</span><span class="p">,</span><span class="w"> </span><span class="o">++</span><span class="n">idx</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
6363
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">(</span><span class="o">*</span><span class="n">first</span><span class="p">))</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
@@ -190,13 +190,13 @@ <h3>Contents</h3>
190190
</div>
191191
</div>
192192
</div>
193-
<script src="search-v2.js"></script>
194-
<script src="searchdata-v2.js" async="async"></script>
193+
<script src="search-v1.js"></script>
194+
<script src="searchdata-v1.js" async="async"></script>
195195
<footer><nav>
196196
<div class="m-container">
197197
<div class="m-row">
198198
<div class="m-col-l-10 m-push-l-1">
199-
<p>Taskflow handbook is part of the <a href="https://taskflow.github.io">Taskflow project</a>, copyright © <a href="https://tsung-wei-huang.github.io/">Dr. Tsung-Wei Huang</a>, 2018&ndash;2022.<br />Generated by <a href="https://doxygen.org/">Doxygen</a> 1.8.14 and <a href="https://mcss.mosra.cz/">m.css</a>.</p>
199+
<p>Taskflow handbook is part of the <a href="https://taskflow.github.io">Taskflow project</a>, copyright © <a href="https://tsung-wei-huang.github.io/">Dr. Tsung-Wei Huang</a>, 2018&ndash;2022.<br />Generated by <a href="https://doxygen.org/">Doxygen</a> 1.8.20 and <a href="https://mcss.mosra.cz/">m.css</a>.</p>
200200
</div>
201201
</div>
202202
</div>

0 commit comments

Comments
 (0)