@@ -281,8 +281,8 @@ \section{Parallel algorithms}
281
281
#include<hpx/include/parallel_reduce.hpp>
282
282
#include<vector>
283
283
284
- hpx::parallel::v1 ::reduce(
285
- hpx::parallel:: execution::par,
284
+ hpx::ranges ::reduce(
285
+ hpx::execution::par,
286
286
values.begin(),values.end(),0);
287
287
288
288
\end {lstlisting }
@@ -297,19 +297,19 @@ \section{Parallel algorithms}
297
297
\ begin{lstlisting}
298
298
auto f =
299
299
300
- hpx::parallel::v1 ::reduce(
301
- hpx::parallel:: execution::par(
302
- hpx::parallel:: execution::task),
300
+ hpx::ranges ::reduce(
301
+ hpx::execution::par(
302
+ hpx::execution::task),
303
303
values.begin(),
304
304
values.end(),0);
305
305
306
306
std::cout<< f.get();
307
307
\end {lstlisting }
308
308
309
309
\begin {itemize }
310
- \item \lstinline |hpx::parallel:: execution::par | Parallel execution
311
- \item \lstinline |hpx::parallel:: execution::seq | Sequential execution
312
- \item \lstinline |hpx::parallel:: execution::task | Task-based execution
310
+ \item \lstinline |hpx::execution::par | Parallel execution
311
+ \item \lstinline |hpx::execution::seq | Sequential execution
312
+ \item \lstinline |hpx::execution::task | Task-based execution
313
313
\end {itemize }
314
314
315
315
\end {frame }
@@ -321,19 +321,19 @@ \section{Parallel algorithms}
321
321
\ begin{lstlisting}
322
322
#include<hpx/include/parallel_executor_parameters.hpp>
323
323
324
- hpx::parallel:: execution::static_chunk_size scs(10);
325
- hpx::parallel::v1 ::reduce(
326
- hpx::parallel:: execution::par.with(scs),
324
+ hpx::execution::static_chunk_size scs(10);
325
+ hpx::ranges ::reduce(
326
+ hpx::execution::par.with(scs),
327
327
values.begin(),
328
328
values.end(),0);
329
329
\end {lstlisting }
330
330
331
331
\begin {itemize }
332
- \item \lstinline |hpx::parallel:: execution::static_chunk_size | \\
332
+ \item \lstinline |hpx::execution::static_chunk_size | \\
333
333
Loop iterations are divided into pieces of a given size and then assigned to threads.
334
- \item \lstinline |hpx::parallel:: execution::auto_chunk_size | \\
334
+ \item \lstinline |hpx::execution::auto_chunk_size | \\
335
335
Pieces are determined based on the first 1\% of the total loop iterations.
336
- \item \lstinline |hpx::parallel:: execution::dynamic_chunk_size | \\
336
+ \item \lstinline |hpx::execution::dynamic_chunk_size | \\
337
337
Dynamically scheduled among the cores and if one core finished it gets dynamically assigned a new chunk.
338
338
\end {itemize }
339
339
@@ -351,7 +351,7 @@ \section{Parallel algorithms}
351
351
std::vector<double> values = {1,2,3,4,5,6,7,8,9};
352
352
353
353
hpx::parallel::for_loop(
354
- hpx::parallel:: execution::par,
354
+ hpx::execution::par,
355
355
0,
356
356
values.size();
357
357
[](boost::uint64_t i)
0 commit comments