Commits

Dimitris Leventeas committed a3dcb9c

Cleaning up a bit the top-down schema for the all-prefixes-sums

  • Participants
  • Parent commits 0de1acb

Comments (0)

Files changed (2)

File parallel prefix sum.pdf

Binary file modified.

File parallel prefix sum.tex

         \xymatrix{
             x_0 & \sum(x_0..x_1)& x_2 & \sum(x_0..x_3) & x_4 &\sum(x_4..x_5) & x_6 & \sum(x_0..x_7)\\
             %
-            & & & \sum(x_0..x_3) & & & & \sum(x_4..x_7) \\
+            & & &  & & & &  \\
             %
-            & \sum(x_0..x_1) & & \sum(x_2..x_3) &  & \sum(x_4..x_5) & & \sum(x_6..x_7) \\
+            &  & &  &  &  & &  \\
             %
-            x_0 & x_1 & x_2 & x_3 & x_4 & x_5 & x_6 & x_7 \\            
+            & & & & & & &\\            
        }
         %\end{displaymath}
     }
 
 \end{frame}
 
+
 \begin{frame}
     \frametitle{Example}
-
     \resizebox{\textwidth}{!}{
 
         %\begin{displaymath}
         \xymatrix{
-            & & & & & & & 0\\
+            x_0 & \sum(x_0..x_1)                                    & x_2 & \sum(x_0..x_3) \only<2->{\ar[drrrr]}        & x_4 & \sum(x_4..x_5)                                          & x_6 & 0 \only<2->{\ar[dllll] \ar[d]} \\
             %
-            & & & \sum(x_0..x_3) & & & & \sum(x_4..x_7) \\
+                & \uncover<3->{\sum(x_0..x_1)} \only<3->{\ar[drr]}  &     & \uncover<2->{0} \only<3->{\ar[dll] \ar[d]}  &     &               \uncover<3->{\sum(x_4..x_5)} \only<3->{\ar[drr]}    &     & \uncover<2->{\sum(x_0..x_3)} \only<3->{\ar[dll] \ar[d]} \\
             %
-            & \sum(x_0..x_1) & & \sum(x_2..x_3) &  & \sum(x_4..x_5) & & \sum(x_6..x_7) \\
-            %
-            x_0 & x_1 & x_2 & x_3 & x_4 & x_5 & x_6 & x_7 \\            
+           \uncover<5->{x_0} \only<5->{\ar[dr]} & \uncover<4->{0} \only<5->{\ar[dl] \ar[d]} & \uncover<5->{x_2} \only<5->{\ar[dr]} & \uncover<4->{\sum(x_0..x_1)} \only<5->{\ar[dl] \ar[d]} & \uncover<5->{x_4} \only<5->{\ar[dr]} & \uncover<4->{\sum(x_0..x_3)} \only<5->{\ar[dl] \ar[d]} & \uncover<5->{x_6} \only<5->{\ar[dr]} & \uncover<4->{\sum(x_0..x_5)} \only<5->{\ar[dl] \ar[d]}\\
+            % maybe, we could draw a red box around this line
+            \uncover<6->{0} & \uncover<6->{x_0}  & \uncover<6->{\sum(x_0..x_1)} & \uncover<6->{\sum(x_0..x_2)} & \uncover<6->{\sum(x_0..x_3)} & \uncover<6->{\sum(x_0..x_4)} & \uncover<6->{\sum(x_0..x_5)} & \uncover<6->{\sum(x_0..x_6)} \\            
        }
         %\end{displaymath}
     }
 
 \end{frame}
 
-\begin{frame}
-    \frametitle{Example}
-
-    \resizebox{\textwidth}{!}{
-
-        %\begin{displaymath}
-        \xymatrix{
-            & & & \sum(x_0..x_3) \ar[drrrr] & & & & 0 \ar[dllll] \ar[d] \\
-            %
-            & & & \sum(x_0..x_3)& & & & \sum(x_4..x_7) \\
-            %
-            & \sum(x_0..x_1) & & \sum(x_2..x_3) &  & \sum(x_4..x_5) & & \sum(x_6..x_7) \\
-            %
-            x_0 & x_1 & x_2 & x_3 & x_4 & x_5 & x_6 & x_7 \\            
-       }
-        %\end{displaymath}
-    }
-
-\end{frame}
-
-
-\begin{frame}
-    \frametitle{Example}
-
-    \resizebox{\textwidth}{!}{
-
-        %\begin{displaymath}
-        \xymatrix{
-            & & & & & & & 0 \\
-            %
-            & & & 0 & & & & \sum(x_0..x_3) \\
-            %
-            & \sum(x_0..x_1) & & \sum(x_2..x_3) &  & \sum(x_4..x_5) & & \sum(x_6..x_7) \\
-            %
-            x_0 & x_1 & x_2 & x_3 & x_4 & x_5 & x_6 & x_7 \\            
-       }
-        %\end{displaymath}
-    }
-
-\end{frame}
-
-
-\begin{frame}
-    \frametitle{Example}
-
-    \resizebox{\textwidth}{!}{
-
-        %\begin{displaymath}
-        \xymatrix{
-            & & & & & & & 0 \\
-            %
-            & \sum(x_0..x_1) \ar[drr] & & 0 \ar[dll] \ar[d] & & \sum(x_4..x_5) \ar[drr] & & \sum(x_0..x_3) \ar[dll] \ar[d]\\
-            %
-            & \sum(x_0..x_1)          & & \sum(x_2..x_3)    & & \sum(x_4..x_5)          & & \sum(x_6..x_7) \\
-            %
-            x_0 & x_1 & x_2 & x_3 & x_4 & x_5 & x_6 & x_7 \\            
-       }
-        %\end{displaymath}
-    }
-
-\end{frame}
-
-\begin{frame}
-    \frametitle{Example}
-
-    \resizebox{\textwidth}{!}{
-
-        %\begin{displaymath}
-        \xymatrix{
-            & & & & & & & 0 \\
-            %
-            &   &   & 0              &  &                        & & \sum(x_0..x_3) \\
-            %
-            & 0 &   & \sum(x_0..x_1) &  & \sum(x_0..x_3)         & & \sum(x_0..x_5) \\
-            %
-            x_0 & x_1 & x_2 & x_3 & x_4 & x_5 & x_6 & x_7 \\            
-       }
-        %\end{displaymath}
-    }
-
-\end{frame}
-
-
-\begin{frame}
-    \frametitle{Example}
-
-    \resizebox{\textwidth}{!}{
-
-        %\begin{displaymath}
-        \xymatrix{
-            & & & & & & & 0 \\
-            %
-            &   &   & 0              &  &                        & & \sum(x_0..x_3) \\
-            %
-            x_0 \ar[dr] & 0 \ar[dl] \ar[d]   & x_2 \ar[dr] & \sum(x_0..x_1) \ar[dl] \ar[d] & x_4 \ar[dr] & \sum(x_0..x_3) \ar[dl] \ar[d] & x_6 \ar[dr] & \sum(x_0..x_5) \ar[dl] \ar[d] \\
-            %
-            x_0         & x_1                & x_2         & x_3                           & x_4         & x_5                           & x_6         & x_7 \\            
-       }
-        %\end{displaymath}
-    }
-
-\end{frame}
-
-\begin{frame}
-    \frametitle{Example}
-
-    \resizebox{\textwidth}{!}{
-
-        %\begin{displaymath}
-        \xymatrix{
-            & & & & & & & 0 \\
-            %
-            &   &   & 0              &  &                        & & \sum(x_0..x_3) \\
-            %
-            & 0  &            & \sum(x_0..x_1) &            & \sum(x_0..x_3)  &         & \sum(x_0..x_5) \\
-            % maybe, we could draw a red box around this line
-            0 & x_0  & \sum(x_0..x_1) & \sum(x_0..x_2) & \sum(x_0..x_3) & \sum(x_0..x_4) & \sum(x_0..x_5) & \sum(x_0..x_6) \\            
-       }
-        %\end{displaymath}
-    }
-
-\end{frame}
-
-
-
-
-
 
 \end{document}