-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrppi-execution.tex
52 lines (44 loc) · 1.51 KB
/
grppi-execution.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
\subsection{Controlling execution}
\begin{frame}[t]{Execution types}
\begin{itemize}
\item Execution model is encapsulated in execution types.
\begin{itemize}
\item Always provided as first argument to patterns.
\end{itemize}
\vfill
\item Current concrete execution types:
\begin{itemize}
\item \textmark{Sequential}: \cppid{sequential\_execution}.
\item \textmark{ISO C++ Threads}: \cppid{parallel\_execution\_native}.
\item \textmark{OpenMP}: \cppid{parallel\_execution\_omp}.
\item \textmark{Intel TBB}: \cppid{parallel\_execution\_tbb}.
\item \textmark{FastFlow}: \cppid{parallel\_execution\_ff}.
\end{itemize}
\vfill
\item Run-time polymorphic wrapper through type erasure:
\begin{itemize}
\item \cppid{dynamic\_execution}.
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}[t,fragile]{Execution model properties}
\begin{itemize}
\item Some execution types allow finer configurtion.
\begin{itemize}
\item Example: Concurrency degree.
\end{itemize}
\vfill\pause
\item Interface:
\begin{lstlisting}[basicstyle=\small]
ex.set_concurrency_degree(4);
int n = ex.concurrency_degree();
\end{lstlisting}
\vfill\pause
\item \textenum{Default values}:
\begin{itemize}
\item \textmark{Sequential} $\Rightarrow$ \cppid{1}.
\item \textmark{Native} $\Rightarrow$ \cppid{std::thread::hardware\_concurrency()}.
\item \textmark{OpenMP} $\Rightarrow$ \cppid{omp\_get\_num\_threads()}.
\end{itemize}
\end{itemize}
\end{frame}