From fd93300ce832d777ce6acb7a40b0f3dcb68b1e50 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Tue, 16 Apr 2024 17:36:29 -0700 Subject: [PATCH] Tweaks and add more planned sections --- ConflictSet.cpp | 2 +- paper/paper.tex | 26 ++++++++++++++++---------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/ConflictSet.cpp b/ConflictSet.cpp index fd43fdf..ebe88c6 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -770,7 +770,7 @@ template int getChildGeqSimd(NodeT *self, int child) { // cachegrind says the plain loop is fewer instructions and more mis-predicted // branches. Microbenchmark says plain loop is faster. It's written in this - // weird "generic" way though in case someday we can use the simd + // weird "generic" way though so that someday we can use the simd // implementation easily if we want. if constexpr (std::is_same_v) { Node3 *n = (Node3 *)self; diff --git a/paper/paper.tex b/paper/paper.tex index e40b36e..9e81ac2 100644 --- a/paper/paper.tex +++ b/paper/paper.tex @@ -71,6 +71,13 @@ See figure \ref{fig:tree} for an example tree after inserting $\{ART\} \rightarrow 4$. Each node shows its partial prefix annotated with $max$ or $max,point,range$. +\begin{figure} + \caption{} + \label{fig:tree} + \centering + \includegraphics{tree.tikz} +\end{figure} + \subsection{Checking point reads} \label{Checking point reads} The algorithm for checking point reads follows directly from the definitions of the \emph{point} and \emph{range} fields. @@ -90,7 +97,7 @@ Checking range reads is more involved. Logically the idea is to partition the ra The max version of a single point is $v$ as described in \ref{Checking point reads}. The max version of a prefix range is the $max$ of the node associated with the prefix if such a node exists, and $range$ of the next node with a $range$ field otherwise. If there is no next node with a range field, then we ignore that subrange in our max version calculation. -The max version among all versions and max versions of subranges in this partition is the max version of the whole range, which we compare to $r$. +The max version among all max versions of subranges in this partition is the max version of the whole range, which we compare to $r$. Let's start with partitioning the range in the case where the beginning of the range is a prefix of the end of the range. We'll be able to use this as a subroutine in the general case. @@ -109,7 +116,7 @@ Recall that the range $[a_{0}\dots a_{k} 0, a_{0}\dots a_{k} 1)$ is equivalent t \begin{align*} \dots \quad \cup \quad & [a_{0}\dots a_{k} 0, a_{0}\dots a_{k} 1) \quad \cup \\ & [a_{0}\dots a_{k} 1, a_{0}\dots a_{k} 2) \quad \cup \\ -& \dots \\ +& \dots \quad \cup \\ & [a_{0}\dots a_{k} (a_{k+1}-1), a_{0}\dots a_{k+1}) \end{align*} @@ -126,7 +133,7 @@ Let's now consider a range where begin is not a prefix of end. \] Let $i$ be the lowest index such that $a_{i} \neq b_{i}$. -For brevity we will elide the common prefix up until $i$ in the following discussion. +For brevity we will elide the common prefix up until $i$ in the following discussion so that our range is denoted as $[a_{i}\dots a_{m}, b_{i}\dots b_{n})$. We'll start with partitioning this range coarsely: \begin{align*} @@ -152,7 +159,7 @@ Otherwise we'll partition this into & [a_{i}\dots 255, a_{i}\dots (a_{m-1} + 1) ) \end{align*} -and repeat starting at \footnote{This doesn't explicitly describe how to handle the case where $a_{m-1} = 255$. In this case we would skip to the largest $j < m$ such that $a_{j} \neq 255$. We know $j \geq i$ since if $a_{i} = 255$ then the range is inverted.} +and repeat \footnote{This doesn't explicitly describe how to handle the case where $a_{m-1} = 255$. In this case we would skip to the largest $j < m$ such that $a_{j} \neq 255$. We know $j \geq i$ since if $a_{i} = 255$ then the range is inverted.} starting at \[ \dots \quad \cup \quad [a_{i}\dots (a_{m-1} + 1), a_{i}\dots (a_{m-1} + 2)) \] @@ -180,12 +187,11 @@ A point write of $k$ at version $v$ simply sets $max \gets v$ \footnote{Recall t A range write of $[b, e)$ at version $v$ performs a point write of $b$ at $v$, and then inserts a node at $e$ with $range$ set to $v$, and $point$ set such that the result of checking a read of $e$ is unaffected. Nodes along the search path to $e$ that are a strict prefix of $e$ get $max$ set to $v$, and all nodes between $b$ and $e$ are removed. -\begin{figure} - \caption{} - \label{fig:tree} - \centering - \includegraphics{tree.tikz} -\end{figure} +\section{Evaluation} + +\section{Testing} + +\section{Conclusion} \printbibliography