From 8ced97c52ca83333f812bc96b09834ca55584839 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Bastian?= Date: Fri, 6 Dec 2024 18:50:53 +0100 Subject: [PATCH] Suppl.: staticdeps breaking --- slides/85_supplementary/misc.tex | 44 +++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 6 deletions(-) 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}