\hypertarget{BWU_8h}{
\section{BWU.h File Reference}
\label{BWU_8h}\index{BWU.h@{BWU.h}}
}
Bit Word interface definitions, unpacking specific routines. 

{\tt \#include \char`\"{}LDT/BW.h\char`\"{}}\par


Include dependency graph for BWU.h:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=53pt]{BWU_8h__incl}
\end{center}
\end{figure}


This graph shows which files directly or indirectly include this file:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=45pt]{BWU_8h__dep__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{CompactItemize}
\item 
unsigned int \hyperlink{BWU_8h_a55a6a36acd754e36423b2fdee63b8e9}{BWU\_\-expand} (unsigned int wrd, unsigned int msk)
\begin{CompactList}\small\item\em Expands {\em wrd\/} according to the bits set in {\em msk\/}. This is the inverse operation of BWP\_\-collapse. \item\end{CompactList}\item 
unsigned int \hyperlink{BWU_8h_62233973572a27e959874b5148bcb44d}{BWU\_\-revert} (unsigned int wrd, unsigned int nwrd, unsigned int nexp)
\begin{CompactList}\small\item\em Reverts {\em wrd\/} to the original integer. This is the inverse operation of BWP\_\-convert. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Bit Word interface definitions, unpacking specific routines. 

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


\footnotesize\begin{verbatim}

   CVS $Id: BWU.h,v 1.1 2006/09/13 17:09:08 russell Exp $
\end{verbatim}
\normalsize
 

\subsection{Function Documentation}
\hypertarget{BWU_8h_a55a6a36acd754e36423b2fdee63b8e9}{
\index{BWU.h@{BWU.h}!BWU_expand@{BWU\_\-expand}}
\index{BWU_expand@{BWU\_\-expand}!BWU.h@{BWU.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned int BWU\_\-expand (unsigned int {\em msk}, unsigned int {\em wrd})}}
\label{BWU_8h_a55a6a36acd754e36423b2fdee63b8e9}


Expands {\em wrd\/} according to the bits set in {\em msk\/}. This is the inverse operation of BWP\_\-collapse. 

\begin{Desc}
\item[Returns:]The expanded word\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em wrd}]The mask to control the expansion \item[{\em msk}]The word to expand\end{description}
\end{Desc}
For each cleared bit encountered in {\em msk\/}, a 0 is placed into the equivalent bit position in the output word. For each set bit in {\em msk\/}, the value of the next available bit is pulled from the top of {\em wrd\/} and inserted into the equivalent bit position in the output word. Here {\em equivalent\/} {\em bit\/} {\em position\/} means the same bit position as in {\em msk\/}.

Example 

\footnotesize\begin{verbatim}
        msk = 0x001101110;
        wrd = 0x1011;

    Expand wrd where the 0's in msk are
        out = 0x001001100;

    If one collapsed out
        msk = 0x001101110;
        out = 0x001001100;
        wrd = 1011;
\end{verbatim}
\normalsize
 \hypertarget{BWU_8h_62233973572a27e959874b5148bcb44d}{
\index{BWU.h@{BWU.h}!BWU_revert@{BWU\_\-revert}}
\index{BWU_revert@{BWU\_\-revert}!BWU.h@{BWU.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned int BWU\_\-revert (unsigned int {\em wrd}, unsigned int {\em nwrd}, unsigned int {\em nexp})}}
\label{BWU_8h_62233973572a27e959874b5148bcb44d}


Reverts {\em wrd\/} to the original integer. This is the inverse operation of BWP\_\-convert. 

\begin{Desc}
\item[Returns:]The revert word\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em wrd}]The word to expand \item[{\em nwrd}]The bit field width of the expanded word \item[{\em nexp}]The number of bits in the exponent. \end{description}
\end{Desc}
