\doxysection{workspace/post-\/scarcity/src/memory/lookup3.c File Reference}
\hypertarget{lookup3_8c}{}\label{lookup3_8c}\index{workspace/post-\/scarcity/src/memory/lookup3.c@{workspace/post-\/scarcity/src/memory/lookup3.c}}
{\ttfamily \#include $<$stdio.\+h$>$}\newline
{\ttfamily \#include $<$time.\+h$>$}\newline
{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include $<$sys/param.\+h$>$}\newline
Include dependency graph for lookup3.\+c\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=345pt]{lookup3_8c__incl}
\end{center}
\end{figure}
\doxysubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{lookup3_8c_ab4646d77540701d2eb2c877effbe5739}{final}}(a,  b,  c)
\item 
\#define \mbox{\hyperlink{lookup3_8c_a129f72057b84147c7c3e2a6d107f0e3b}{HASH\+\_\+\+BIG\+\_\+\+ENDIAN}}~0
\item 
\#define \mbox{\hyperlink{lookup3_8c_a8c49a94782a573ded31a7bb1949cbf47}{HASH\+\_\+\+LITTLE\+\_\+\+ENDIAN}}~0
\item 
\#define \mbox{\hyperlink{lookup3_8c_aacd6ed104463685849b2550389d05ff3}{hashmask}}(n)~(\mbox{\hyperlink{lookup3_8c_a86173ca25b300cf3276b088d3fc6bdaf}{hashsize}}(n)-\/1)
\item 
\#define \mbox{\hyperlink{lookup3_8c_a86173ca25b300cf3276b088d3fc6bdaf}{hashsize}}(n)~((uint32\+\_\+t)1$<$$<$(n))
\item 
\#define \mbox{\hyperlink{lookup3_8c_afd9fa1747724ec6142812721997394c3}{mix}}(a,  b,  c)
\item 
\#define \mbox{\hyperlink{lookup3_8c_aae44e21ada356d9d84450d5440fbb0c4}{rot}}(x,  k)~(((x)$<$$<$(k)) \texorpdfstring{$\vert$}{|} ((x)$>$$>$(32-\/(k))))
\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
uint32\+\_\+t \mbox{\hyperlink{lookup3_8c_a04a1acea05ca32ed5d3d90c595012be3}{hashbig}} (const void \texorpdfstring{$\ast$}{*}key, size\+\_\+t length, uint32\+\_\+t initval)
\item 
uint32\+\_\+t \mbox{\hyperlink{lookup3_8c_a8fcafa39241f09d13a63a0f9756772cc}{hashlittle}} (const void \texorpdfstring{$\ast$}{*}key, size\+\_\+t length, uint32\+\_\+t initval)
\item 
void \mbox{\hyperlink{lookup3_8c_a28bbffa78951ac929184f31d92a05388}{hashlittle2}} (const void \texorpdfstring{$\ast$}{*}key, size\+\_\+t length, uint32\+\_\+t \texorpdfstring{$\ast$}{*}pc, uint32\+\_\+t \texorpdfstring{$\ast$}{*}pb)
\item 
uint32\+\_\+t \mbox{\hyperlink{lookup3_8c_a6b57e35d1649b351ed629d3e022bf85f}{hashword}} (const uint32\+\_\+t \texorpdfstring{$\ast$}{*}k, size\+\_\+t length, uint32\+\_\+t initval)
\begin{DoxyCompactList}\small\item\em \doxylink{lookup3_8h}{lookup3.\+h} \end{DoxyCompactList}\item 
void \mbox{\hyperlink{lookup3_8c_af4b16260e69ab4fc6a2584d04332404b}{hashword2}} (const uint32\+\_\+t \texorpdfstring{$\ast$}{*}k, size\+\_\+t length, uint32\+\_\+t \texorpdfstring{$\ast$}{*}pc, uint32\+\_\+t \texorpdfstring{$\ast$}{*}pb)
\end{DoxyCompactItemize}


\doxysubsection{Macro Definition Documentation}
\Hypertarget{lookup3_8c_ab4646d77540701d2eb2c877effbe5739}\label{lookup3_8c_ab4646d77540701d2eb2c877effbe5739} 
\index{lookup3.c@{lookup3.c}!final@{final}}
\index{final@{final}!lookup3.c@{lookup3.c}}
\doxysubsubsection{\texorpdfstring{final}{final}}
{\footnotesize\ttfamily \#define final(\begin{DoxyParamCaption}\item[{}]{a,  }\item[{}]{b,  }\item[{}]{c }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{\{\ \(\backslash\)}
\DoxyCodeLine{\ \ c\ \string^=\ b;\ c\ -\/=\ \mbox{\hyperlink{lookup3_8c_aae44e21ada356d9d84450d5440fbb0c4}{rot}}(b,14);\ \(\backslash\)}
\DoxyCodeLine{\ \ a\ \string^=\ c;\ a\ -\/=\ \mbox{\hyperlink{lookup3_8c_aae44e21ada356d9d84450d5440fbb0c4}{rot}}(c,11);\ \(\backslash\)}
\DoxyCodeLine{\ \ b\ \string^=\ a;\ b\ -\/=\ \mbox{\hyperlink{lookup3_8c_aae44e21ada356d9d84450d5440fbb0c4}{rot}}(a,25);\ \(\backslash\)}
\DoxyCodeLine{\ \ c\ \string^=\ b;\ c\ -\/=\ \mbox{\hyperlink{lookup3_8c_aae44e21ada356d9d84450d5440fbb0c4}{rot}}(b,16);\ \(\backslash\)}
\DoxyCodeLine{\ \ a\ \string^=\ c;\ a\ -\/=\ \mbox{\hyperlink{lookup3_8c_aae44e21ada356d9d84450d5440fbb0c4}{rot}}(c,4);\ \ \(\backslash\)}
\DoxyCodeLine{\ \ b\ \string^=\ a;\ b\ -\/=\ \mbox{\hyperlink{lookup3_8c_aae44e21ada356d9d84450d5440fbb0c4}{rot}}(a,14);\ \(\backslash\)}
\DoxyCodeLine{\ \ c\ \string^=\ b;\ c\ -\/=\ \mbox{\hyperlink{lookup3_8c_aae44e21ada356d9d84450d5440fbb0c4}{rot}}(b,24);\ \(\backslash\)}
\DoxyCodeLine{\}}

\end{DoxyCode}


Definition at line \mbox{\hyperlink{lookup3_8c_source_l00149}{149}} of file \mbox{\hyperlink{lookup3_8c_source}{lookup3.\+c}}.

\Hypertarget{lookup3_8c_a129f72057b84147c7c3e2a6d107f0e3b}\label{lookup3_8c_a129f72057b84147c7c3e2a6d107f0e3b} 
\index{lookup3.c@{lookup3.c}!HASH\_BIG\_ENDIAN@{HASH\_BIG\_ENDIAN}}
\index{HASH\_BIG\_ENDIAN@{HASH\_BIG\_ENDIAN}!lookup3.c@{lookup3.c}}
\doxysubsubsection{\texorpdfstring{HASH\_BIG\_ENDIAN}{HASH\_BIG\_ENDIAN}}
{\footnotesize\ttfamily \#define HASH\+\_\+\+BIG\+\_\+\+ENDIAN~0}



Definition at line \mbox{\hyperlink{lookup3_8c_source_l00063}{63}} of file \mbox{\hyperlink{lookup3_8c_source}{lookup3.\+c}}.

\Hypertarget{lookup3_8c_a8c49a94782a573ded31a7bb1949cbf47}\label{lookup3_8c_a8c49a94782a573ded31a7bb1949cbf47} 
\index{lookup3.c@{lookup3.c}!HASH\_LITTLE\_ENDIAN@{HASH\_LITTLE\_ENDIAN}}
\index{HASH\_LITTLE\_ENDIAN@{HASH\_LITTLE\_ENDIAN}!lookup3.c@{lookup3.c}}
\doxysubsubsection{\texorpdfstring{HASH\_LITTLE\_ENDIAN}{HASH\_LITTLE\_ENDIAN}}
{\footnotesize\ttfamily \#define HASH\+\_\+\+LITTLE\+\_\+\+ENDIAN~0}



Definition at line \mbox{\hyperlink{lookup3_8c_source_l00062}{62}} of file \mbox{\hyperlink{lookup3_8c_source}{lookup3.\+c}}.

\Hypertarget{lookup3_8c_aacd6ed104463685849b2550389d05ff3}\label{lookup3_8c_aacd6ed104463685849b2550389d05ff3} 
\index{lookup3.c@{lookup3.c}!hashmask@{hashmask}}
\index{hashmask@{hashmask}!lookup3.c@{lookup3.c}}
\doxysubsubsection{\texorpdfstring{hashmask}{hashmask}}
{\footnotesize\ttfamily \#define hashmask(\begin{DoxyParamCaption}\item[{}]{n }\end{DoxyParamCaption})~(\mbox{\hyperlink{lookup3_8c_a86173ca25b300cf3276b088d3fc6bdaf}{hashsize}}(n)-\/1)}



Definition at line \mbox{\hyperlink{lookup3_8c_source_l00067}{67}} of file \mbox{\hyperlink{lookup3_8c_source}{lookup3.\+c}}.

\Hypertarget{lookup3_8c_a86173ca25b300cf3276b088d3fc6bdaf}\label{lookup3_8c_a86173ca25b300cf3276b088d3fc6bdaf} 
\index{lookup3.c@{lookup3.c}!hashsize@{hashsize}}
\index{hashsize@{hashsize}!lookup3.c@{lookup3.c}}
\doxysubsubsection{\texorpdfstring{hashsize}{hashsize}}
{\footnotesize\ttfamily \#define hashsize(\begin{DoxyParamCaption}\item[{}]{n }\end{DoxyParamCaption})~((uint32\+\_\+t)1$<$$<$(n))}



Definition at line \mbox{\hyperlink{lookup3_8c_source_l00066}{66}} of file \mbox{\hyperlink{lookup3_8c_source}{lookup3.\+c}}.

\Hypertarget{lookup3_8c_afd9fa1747724ec6142812721997394c3}\label{lookup3_8c_afd9fa1747724ec6142812721997394c3} 
\index{lookup3.c@{lookup3.c}!mix@{mix}}
\index{mix@{mix}!lookup3.c@{lookup3.c}}
\doxysubsubsection{\texorpdfstring{mix}{mix}}
{\footnotesize\ttfamily \#define mix(\begin{DoxyParamCaption}\item[{}]{a,  }\item[{}]{b,  }\item[{}]{c }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{\{\ \(\backslash\)}
\DoxyCodeLine{\ \ a\ -\/=\ c;\ \ a\ \string^=\ \mbox{\hyperlink{lookup3_8c_aae44e21ada356d9d84450d5440fbb0c4}{rot}}(c,\ 4);\ \ c\ +=\ b;\ \(\backslash\)}
\DoxyCodeLine{\ \ b\ -\/=\ a;\ \ b\ \string^=\ \mbox{\hyperlink{lookup3_8c_aae44e21ada356d9d84450d5440fbb0c4}{rot}}(a,\ 6);\ \ a\ +=\ c;\ \(\backslash\)}
\DoxyCodeLine{\ \ c\ -\/=\ b;\ \ c\ \string^=\ \mbox{\hyperlink{lookup3_8c_aae44e21ada356d9d84450d5440fbb0c4}{rot}}(b,\ 8);\ \ b\ +=\ a;\ \(\backslash\)}
\DoxyCodeLine{\ \ a\ -\/=\ c;\ \ a\ \string^=\ \mbox{\hyperlink{lookup3_8c_aae44e21ada356d9d84450d5440fbb0c4}{rot}}(c,16);\ \ c\ +=\ b;\ \(\backslash\)}
\DoxyCodeLine{\ \ b\ -\/=\ a;\ \ b\ \string^=\ \mbox{\hyperlink{lookup3_8c_aae44e21ada356d9d84450d5440fbb0c4}{rot}}(a,19);\ \ a\ +=\ c;\ \(\backslash\)}
\DoxyCodeLine{\ \ c\ -\/=\ b;\ \ c\ \string^=\ \mbox{\hyperlink{lookup3_8c_aae44e21ada356d9d84450d5440fbb0c4}{rot}}(b,\ 4);\ \ b\ +=\ a;\ \(\backslash\)}
\DoxyCodeLine{\}}

\end{DoxyCode}


Definition at line \mbox{\hyperlink{lookup3_8c_source_l00114}{114}} of file \mbox{\hyperlink{lookup3_8c_source}{lookup3.\+c}}.

\Hypertarget{lookup3_8c_aae44e21ada356d9d84450d5440fbb0c4}\label{lookup3_8c_aae44e21ada356d9d84450d5440fbb0c4} 
\index{lookup3.c@{lookup3.c}!rot@{rot}}
\index{rot@{rot}!lookup3.c@{lookup3.c}}
\doxysubsubsection{\texorpdfstring{rot}{rot}}
{\footnotesize\ttfamily \#define rot(\begin{DoxyParamCaption}\item[{}]{x,  }\item[{}]{k }\end{DoxyParamCaption})~(((x)$<$$<$(k)) \texorpdfstring{$\vert$}{|} ((x)$>$$>$(32-\/(k))))}



Definition at line \mbox{\hyperlink{lookup3_8c_source_l00068}{68}} of file \mbox{\hyperlink{lookup3_8c_source}{lookup3.\+c}}.



\doxysubsection{Function Documentation}
\Hypertarget{lookup3_8c_a04a1acea05ca32ed5d3d90c595012be3}\label{lookup3_8c_a04a1acea05ca32ed5d3d90c595012be3} 
\index{lookup3.c@{lookup3.c}!hashbig@{hashbig}}
\index{hashbig@{hashbig}!lookup3.c@{lookup3.c}}
\doxysubsubsection{\texorpdfstring{hashbig()}{hashbig()}}
{\footnotesize\ttfamily uint32\+\_\+t hashbig (\begin{DoxyParamCaption}\item[{const void \texorpdfstring{$\ast$}{*}}]{key,  }\item[{size\+\_\+t}]{length,  }\item[{uint32\+\_\+t}]{initval }\end{DoxyParamCaption})}



Definition at line \mbox{\hyperlink{lookup3_8c_source_l00807}{807}} of file \mbox{\hyperlink{lookup3_8c_source}{lookup3.\+c}}.



References \mbox{\hyperlink{lookup3_8c_source_l00063}{HASH\+\_\+\+BIG\+\_\+\+ENDIAN}}, and \mbox{\hyperlink{lookup3_8c_source_l00114}{mix}}.

\Hypertarget{lookup3_8c_a8fcafa39241f09d13a63a0f9756772cc}\label{lookup3_8c_a8fcafa39241f09d13a63a0f9756772cc} 
\index{lookup3.c@{lookup3.c}!hashlittle@{hashlittle}}
\index{hashlittle@{hashlittle}!lookup3.c@{lookup3.c}}
\doxysubsubsection{\texorpdfstring{hashlittle()}{hashlittle()}}
{\footnotesize\ttfamily uint32\+\_\+t hashlittle (\begin{DoxyParamCaption}\item[{const void \texorpdfstring{$\ast$}{*}}]{key,  }\item[{size\+\_\+t}]{length,  }\item[{uint32\+\_\+t}]{initval }\end{DoxyParamCaption})}



Definition at line \mbox{\hyperlink{lookup3_8c_source_l00281}{281}} of file \mbox{\hyperlink{lookup3_8c_source}{lookup3.\+c}}.



References \mbox{\hyperlink{lookup3_8c_source_l00062}{HASH\+\_\+\+LITTLE\+\_\+\+ENDIAN}}, and \mbox{\hyperlink{lookup3_8c_source_l00114}{mix}}.

\Hypertarget{lookup3_8c_a28bbffa78951ac929184f31d92a05388}\label{lookup3_8c_a28bbffa78951ac929184f31d92a05388} 
\index{lookup3.c@{lookup3.c}!hashlittle2@{hashlittle2}}
\index{hashlittle2@{hashlittle2}!lookup3.c@{lookup3.c}}
\doxysubsubsection{\texorpdfstring{hashlittle2()}{hashlittle2()}}
{\footnotesize\ttfamily void hashlittle2 (\begin{DoxyParamCaption}\item[{const void \texorpdfstring{$\ast$}{*}}]{key,  }\item[{size\+\_\+t}]{length,  }\item[{uint32\+\_\+t \texorpdfstring{$\ast$}{*}}]{pc,  }\item[{uint32\+\_\+t \texorpdfstring{$\ast$}{*}}]{pb }\end{DoxyParamCaption})}



Definition at line \mbox{\hyperlink{lookup3_8c_source_l00539}{539}} of file \mbox{\hyperlink{lookup3_8c_source}{lookup3.\+c}}.



References \mbox{\hyperlink{lookup3_8c_source_l00062}{HASH\+\_\+\+LITTLE\+\_\+\+ENDIAN}}, and \mbox{\hyperlink{lookup3_8c_source_l00114}{mix}}.

\Hypertarget{lookup3_8c_a6b57e35d1649b351ed629d3e022bf85f}\label{lookup3_8c_a6b57e35d1649b351ed629d3e022bf85f} 
\index{lookup3.c@{lookup3.c}!hashword@{hashword}}
\index{hashword@{hashword}!lookup3.c@{lookup3.c}}
\doxysubsubsection{\texorpdfstring{hashword()}{hashword()}}
{\footnotesize\ttfamily uint32\+\_\+t hashword (\begin{DoxyParamCaption}\item[{const uint32\+\_\+t \texorpdfstring{$\ast$}{*}}]{k,  }\item[{size\+\_\+t}]{length,  }\item[{uint32\+\_\+t}]{initval }\end{DoxyParamCaption})}



\doxylink{lookup3_8h}{lookup3.\+h} 

Minimal header file wrapping Bob Jenkins\textquotesingle{} \doxylink{lookup3_8c}{lookup3.\+c}

(c) 2019 Simon Brooke \href{mailto:simon@journeyman.cc}{\texttt{ simon@journeyman.\+cc}} Public domain. 

Definition at line \mbox{\hyperlink{lookup3_8c_source_l00173}{173}} of file \mbox{\hyperlink{lookup3_8c_source}{lookup3.\+c}}.



References \mbox{\hyperlink{lookup3_8c_source_l00114}{mix}}.

\Hypertarget{lookup3_8c_af4b16260e69ab4fc6a2584d04332404b}\label{lookup3_8c_af4b16260e69ab4fc6a2584d04332404b} 
\index{lookup3.c@{lookup3.c}!hashword2@{hashword2}}
\index{hashword2@{hashword2}!lookup3.c@{lookup3.c}}
\doxysubsubsection{\texorpdfstring{hashword2()}{hashword2()}}
{\footnotesize\ttfamily void hashword2 (\begin{DoxyParamCaption}\item[{const uint32\+\_\+t \texorpdfstring{$\ast$}{*}}]{k,  }\item[{size\+\_\+t}]{length,  }\item[{uint32\+\_\+t \texorpdfstring{$\ast$}{*}}]{pc,  }\item[{uint32\+\_\+t \texorpdfstring{$\ast$}{*}}]{pb }\end{DoxyParamCaption})}



Definition at line \mbox{\hyperlink{lookup3_8c_source_l00216}{216}} of file \mbox{\hyperlink{lookup3_8c_source}{lookup3.\+c}}.



References \mbox{\hyperlink{lookup3_8c_source_l00114}{mix}}.

