\doxysection{include/osmocom/core/hash.h File Reference}
\label{hash_8h}\index{include/osmocom/core/hash.h@{include/osmocom/core/hash.h}}
{\ttfamily \#include $<$osmocom/core/log2.\+h$>$}\newline
{\ttfamily \#include $<$limits.\+h$>$}\newline
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ BITS\+\_\+\+PER\+\_\+\+LONG}~64
\item 
\#define \textbf{ hash\+\_\+long}(val,  bits)~\textbf{ hash\+\_\+64}(val, bits)
\item 
\#define \textbf{ GOLDEN\+\_\+\+RATIO\+\_\+\+PRIME}~\textbf{ GOLDEN\+\_\+\+RATIO\+\_\+64}
\item 
\#define \textbf{ GOLDEN\+\_\+\+RATIO\+\_\+32}~0x61\+C88647
\item 
\#define \textbf{ GOLDEN\+\_\+\+RATIO\+\_\+64}~0x61\+C8864680\+B583\+EBull
\item 
\#define \textbf{ \+\_\+\+\_\+hash\+\_\+32}~\textbf{ \+\_\+\+\_\+hash\+\_\+32\+\_\+generic}
\item 
\#define \textbf{ hash\+\_\+32}~\textbf{ hash\+\_\+32\+\_\+generic}
\item 
\#define \textbf{ hash\+\_\+64}~\textbf{ hash\+\_\+64\+\_\+generic}
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
static uint32\+\_\+t \textbf{ \+\_\+\+\_\+hash\+\_\+32\+\_\+generic} (uint32\+\_\+t val)
\item 
static uint32\+\_\+t \textbf{ hash\+\_\+32\+\_\+generic} (uint32\+\_\+t val, unsigned int bits)
\item 
static \textbf{ \+\_\+\+\_\+always\+\_\+inline} uint32\+\_\+t \textbf{ hash\+\_\+64\+\_\+generic} (uint64\+\_\+t val, unsigned int bits)
\item 
static uint32\+\_\+t \textbf{ hash\+\_\+ptr} (const void $\ast$ptr, unsigned int bits)
\item 
static uint32\+\_\+t \textbf{ hash32\+\_\+ptr} (const void $\ast$ptr)
\end{DoxyCompactItemize}


\doxysubsection{Macro Definition Documentation}
\mbox{\label{hash_8h_a8d8d1dce869119a8be21a94e2ba8d756}} 
\index{hash.h@{hash.h}!\_\_hash\_32@{\_\_hash\_32}}
\index{\_\_hash\_32@{\_\_hash\_32}!hash.h@{hash.h}}
\doxysubsubsection{\_\_hash\_32}
{\footnotesize\ttfamily \#define \+\_\+\+\_\+hash\+\_\+32~\textbf{ \+\_\+\+\_\+hash\+\_\+32\+\_\+generic}}

\mbox{\label{hash_8h_a2f660aa23a5dbc0f4b8df48b4302b8c3}} 
\index{hash.h@{hash.h}!BITS\_PER\_LONG@{BITS\_PER\_LONG}}
\index{BITS\_PER\_LONG@{BITS\_PER\_LONG}!hash.h@{hash.h}}
\doxysubsubsection{BITS\_PER\_LONG}
{\footnotesize\ttfamily \#define BITS\+\_\+\+PER\+\_\+\+LONG~64}

\mbox{\label{hash_8h_a65cdcd6d7314769ffc01484117bc9e2e}} 
\index{hash.h@{hash.h}!GOLDEN\_RATIO\_32@{GOLDEN\_RATIO\_32}}
\index{GOLDEN\_RATIO\_32@{GOLDEN\_RATIO\_32}!hash.h@{hash.h}}
\doxysubsubsection{GOLDEN\_RATIO\_32}
{\footnotesize\ttfamily \#define GOLDEN\+\_\+\+RATIO\+\_\+32~0x61\+C88647}

\mbox{\label{hash_8h_a90294bf3a21e2c26fb3bf5408d726457}} 
\index{hash.h@{hash.h}!GOLDEN\_RATIO\_64@{GOLDEN\_RATIO\_64}}
\index{GOLDEN\_RATIO\_64@{GOLDEN\_RATIO\_64}!hash.h@{hash.h}}
\doxysubsubsection{GOLDEN\_RATIO\_64}
{\footnotesize\ttfamily \#define GOLDEN\+\_\+\+RATIO\+\_\+64~0x61\+C8864680\+B583\+EBull}

\mbox{\label{hash_8h_a40b36924d64ce9b58066e36266492495}} 
\index{hash.h@{hash.h}!GOLDEN\_RATIO\_PRIME@{GOLDEN\_RATIO\_PRIME}}
\index{GOLDEN\_RATIO\_PRIME@{GOLDEN\_RATIO\_PRIME}!hash.h@{hash.h}}
\doxysubsubsection{GOLDEN\_RATIO\_PRIME}
{\footnotesize\ttfamily \#define GOLDEN\+\_\+\+RATIO\+\_\+\+PRIME~\textbf{ GOLDEN\+\_\+\+RATIO\+\_\+64}}

\mbox{\label{hash_8h_a262e86a8f2ea036b6c1107c113e378fd}} 
\index{hash.h@{hash.h}!hash\_32@{hash\_32}}
\index{hash\_32@{hash\_32}!hash.h@{hash.h}}
\doxysubsubsection{hash\_32}
{\footnotesize\ttfamily \#define hash\+\_\+32~\textbf{ hash\+\_\+32\+\_\+generic}}

\mbox{\label{hash_8h_aff1ae1ab81c6a054b1395aaa2a40c9cc}} 
\index{hash.h@{hash.h}!hash\_64@{hash\_64}}
\index{hash\_64@{hash\_64}!hash.h@{hash.h}}
\doxysubsubsection{hash\_64}
{\footnotesize\ttfamily \#define hash\+\_\+64~\textbf{ hash\+\_\+64\+\_\+generic}}

\mbox{\label{hash_8h_a2687e31a7b8915a3ad27c4aa5066bd4f}} 
\index{hash.h@{hash.h}!hash\_long@{hash\_long}}
\index{hash\_long@{hash\_long}!hash.h@{hash.h}}
\doxysubsubsection{hash\_long}
{\footnotesize\ttfamily \#define hash\+\_\+long(\begin{DoxyParamCaption}\item[{}]{val,  }\item[{}]{bits }\end{DoxyParamCaption})~\textbf{ hash\+\_\+64}(val, bits)}



\doxysubsection{Function Documentation}
\mbox{\label{hash_8h_a32d25ef21bd45fc07811b594025a23d9}} 
\index{hash.h@{hash.h}!\_\_hash\_32\_generic@{\_\_hash\_32\_generic}}
\index{\_\_hash\_32\_generic@{\_\_hash\_32\_generic}!hash.h@{hash.h}}
\doxysubsubsection{\_\_hash\_32\_generic()}
{\footnotesize\ttfamily static uint32\+\_\+t \+\_\+\+\_\+hash\+\_\+32\+\_\+generic (\begin{DoxyParamCaption}\item[{uint32\+\_\+t}]{val }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



References \textbf{ GOLDEN\+\_\+\+RATIO\+\_\+32}.

\mbox{\label{hash_8h_a531a8a683d8cd7d9f5e9fb4b00171fca}} 
\index{hash.h@{hash.h}!hash32\_ptr@{hash32\_ptr}}
\index{hash32\_ptr@{hash32\_ptr}!hash.h@{hash.h}}
\doxysubsubsection{hash32\_ptr()}
{\footnotesize\ttfamily static uint32\+\_\+t hash32\+\_\+ptr (\begin{DoxyParamCaption}\item[{const void $\ast$}]{ptr }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}

\mbox{\label{hash_8h_a3492a17d6073a1733d9e306e7574c5e1}} 
\index{hash.h@{hash.h}!hash\_32\_generic@{hash\_32\_generic}}
\index{hash\_32\_generic@{hash\_32\_generic}!hash.h@{hash.h}}
\doxysubsubsection{hash\_32\_generic()}
{\footnotesize\ttfamily static uint32\+\_\+t hash\+\_\+32\+\_\+generic (\begin{DoxyParamCaption}\item[{uint32\+\_\+t}]{val,  }\item[{unsigned int}]{bits }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



References \textbf{ \+\_\+\+\_\+hash\+\_\+32}.

\mbox{\label{hash_8h_ad9826d4f2fad1021bc2594e2d1ace86e}} 
\index{hash.h@{hash.h}!hash\_64\_generic@{hash\_64\_generic}}
\index{hash\_64\_generic@{hash\_64\_generic}!hash.h@{hash.h}}
\doxysubsubsection{hash\_64\_generic()}
{\footnotesize\ttfamily static \textbf{ \+\_\+\+\_\+always\+\_\+inline} uint32\+\_\+t hash\+\_\+64\+\_\+generic (\begin{DoxyParamCaption}\item[{uint64\+\_\+t}]{val,  }\item[{unsigned int}]{bits }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ \+\_\+\+\_\+hash\+\_\+32}, \textbf{ GOLDEN\+\_\+\+RATIO\+\_\+64}, and \textbf{ hash\+\_\+32}.

\mbox{\label{hash_8h_a9bd996302254713d1f73c93bf778698e}} 
\index{hash.h@{hash.h}!hash\_ptr@{hash\_ptr}}
\index{hash\_ptr@{hash\_ptr}!hash.h@{hash.h}}
\doxysubsubsection{hash\_ptr()}
{\footnotesize\ttfamily static uint32\+\_\+t hash\+\_\+ptr (\begin{DoxyParamCaption}\item[{const void $\ast$}]{ptr,  }\item[{unsigned int}]{bits }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



References \textbf{ hash\+\_\+long}.

