\hypertarget{wrap_8h}{
\section{wrap.h File Reference}
\label{wrap_8h}\index{wrap.h@{wrap.h}}
}
Implements simple wrap around functions for circular lists.  


\subsection*{Functions}
\begin{CompactItemize}
\item 
static \_\-\_\-inline int \hyperlink{wrap_8h_5e6bd4e3d4b32065bb2f9d819dfaa09c}{wrap\_\-hi} (int idx, int max)
\begin{CompactList}\small\item\em Ensures {\em idx\/} is in the interval \mbox{[}0, {\em max\/}). The check is only down on the upper bound. \item\end{CompactList}\item 
static \_\-\_\-inline int \hyperlink{wrap_8h_061ea7f4fc4b967f803e584ef30bb5c8}{wrap\_\-lo} (int idx, int max)
\begin{CompactList}\small\item\em Ensures {\em idx\/} is in the interval \mbox{[}0, {\em max\/}). The check is only down on the lower bound. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Implements simple wrap around functions for circular lists. 

\begin{Desc}
\item[Author:]JJRussell - \href{mailto:russell@slac.stanford.edu}{\tt russell@slac.stanford.edu}\end{Desc}


\footnotesize\begin{verbatim}

   CVS $Id: wrap.h,v 1.1.1.1 2007/06/18 00:42:58 russell Exp $
\end{verbatim}
\normalsize
 

\subsection{Function Documentation}
\hypertarget{wrap_8h_5e6bd4e3d4b32065bb2f9d819dfaa09c}{
\index{wrap.h@{wrap.h}!wrap\_\-hi@{wrap\_\-hi}}
\index{wrap\_\-hi@{wrap\_\-hi}!wrap.h@{wrap.h}}
\subsubsection[{wrap\_\-hi}]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline int wrap\_\-hi (int {\em idx}, \/  int {\em max})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{wrap_8h_5e6bd4e3d4b32065bb2f9d819dfaa09c}


Ensures {\em idx\/} is in the interval \mbox{[}0, {\em max\/}). The check is only down on the upper bound. 

\begin{Desc}
\item[Returns:]The constrained index\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em idx}]The index to check \item[{\em max}]The biase to subtract to {\em idx\/} if it is greater than {\em max\/} \end{description}
\end{Desc}


Referenced by bit\_\-list\_\-clear(), copy(), copy\_\-or(), find(), GRBP\_\-clusterListAdd(), GRBP\_\-gammaListAdd(), and GRBP\_\-grbAdd().\hypertarget{wrap_8h_061ea7f4fc4b967f803e584ef30bb5c8}{
\index{wrap.h@{wrap.h}!wrap\_\-lo@{wrap\_\-lo}}
\index{wrap\_\-lo@{wrap\_\-lo}!wrap.h@{wrap.h}}
\subsubsection[{wrap\_\-lo}]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline int wrap\_\-lo (int {\em idx}, \/  int {\em max})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{wrap_8h_061ea7f4fc4b967f803e584ef30bb5c8}


Ensures {\em idx\/} is in the interval \mbox{[}0, {\em max\/}). The check is only down on the lower bound. 

\begin{Desc}
\item[Returns:]The constrained index\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em idx}]The index to check \item[{\em max}]The biase to add to {\em idx\/} if it is less than 0 \end{description}
\end{Desc}


Referenced by GRBP\_\-messageFormat(), and GRBP\_\-windowTier1LatUpdate().