diff --git a/slides/85_supplementary/misc.tex b/slides/85_supplementary/misc.tex index f5c34ab..e05344a 100644 --- a/slides/85_supplementary/misc.tex +++ b/slides/85_supplementary/misc.tex @@ -26,16 +26,48 @@ for(i) { \end{minipage} \end{frame} -\begin{frame}{\staticdeps: lack of context} + +\begin{frame}[fragile]{\staticdeps: lack of context} \begin{minipage}[t]{0.48\textwidth} - \begin{block}{Context-dependent stride} - \todo{λ\lstc{F, k: F[i] += F[i+k]}} + \begin{block}{\alert{Context-dependent stride}} +\begin{lstlisting}[language=C] +for(int i=0; i < n-k; ++i) + A[i] += A[i+k]; +\end{lstlisting} +\begin{center} + $\downarrow$ +\end{center} +\begin{lstlisting}[language={[x86masm]Assembler}] +loop: + mov (%rax,%rdx,4),%ecx + add %ecx,(%rax) + add $0x4,%rax + cmp %rsi,%rax + jne loop +\end{lstlisting} + +\begin{center} + \textbf{No dep found!} +\end{center} + \end{block} \end{minipage} - \hfill + \hfill\vrule\hfill \begin{minipage}[t]{0.48\textwidth} - \begin{block}{Graphs algorithms} - \todo{Adjacency list as pointers to vertices} + \begin{block}{\alert{Graphs algorithms}} + \vspace{0.7em} + \begin{itemize} + \item{} Graphs: commonly represented as \eg +\begin{lstlisting}[language=C] +struct Node { + // ... + vector siblings; +}; +\end{lstlisting} + \item{} Values of \lstc{siblings} will alias \alert{on + purpose}! + \item{} \ldots{}thus breaking \staticdeps{}. + \end{itemize} \end{block} \end{minipage} \end{frame}