|
5 | 5 | <title>CUDA Standard Algorithms » Parallel Find | Taskflow QuickStart</title>
|
6 | 6 | <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
|
7 | 7 | <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" /> |
9 | 9 | <meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
10 | 10 | <meta name="theme-color" content="#22272e" />
|
11 | 11 | </head>
|
|
49 | 49 | <span class="m-breadcrumb"><a href="cudaStandardAlgorithms.html">CUDA Standard Algorithms</a> »</span>
|
50 | 50 | Parallel Find
|
51 | 51 | </h1>
|
52 |
| - <nav class="m-block m-default"> |
| 52 | + <div class="m-block m-default"> |
53 | 53 | <h3>Contents</h3>
|
54 | 54 | <ul>
|
55 | 55 | <li><a href="#CUDASTDFindIncludeTheHeader">Include the Header</a></li>
|
56 | 56 | <li><a href="#CUDASTDFindItems">Find an Element in a Range</a></li>
|
57 | 57 | <li><a href="#CUDASTDFindMinItems">Find the Minimum Element in a Range</a></li>
|
58 | 58 | <li><a href="#CUDASTDFindMaxItems">Find the Maximum Element in a Range</a></li>
|
59 | 59 | </ul>
|
60 |
| - </nav> |
| 60 | + </div> |
61 | 61 | <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>
|
62 | 62 | <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>
|
63 | 63 | <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>
|
190 | 190 | </div>
|
191 | 191 | </div>
|
192 | 192 | </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> |
195 | 195 | <footer><nav>
|
196 | 196 | <div class="m-container">
|
197 | 197 | <div class="m-row">
|
198 | 198 | <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–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–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> |
200 | 200 | </div>
|
201 | 201 | </div>
|
202 | 202 | </div>
|
|
0 commit comments