\hypertarget{BFP_8h}{
\section{BFP.h File Reference}
\label{BFP_8h}\index{BFP.h@{BFP.h}}
}
Bit Field Pack Routines.  


{\tt \#include $<$LDT/BW.h$>$}\par
{\tt \#include $<$LDT/BWP.h$>$}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
static \_\-\_\-inline unsigned int \hyperlink{BFP_8h_77b19a6891004338b3c47bfe81fc0e5d}{BFP\_\-\_\-maskL} (int width)
\begin{CompactList}\small\item\em Produce a left justified mask of the specified width. \item\end{CompactList}\item 
static \_\-\_\-inline unsigned int \hyperlink{BFP_8h_7ff18bd1883049432bccae1561ebee84}{BFP\_\-\_\-maskR} (int width)
\begin{CompactList}\small\item\em Produce a right justified mask of the specified width. \item\end{CompactList}\item 
static \_\-\_\-inline unsigned int \hyperlink{BFP_8h_da4fa82d8ec5d531d62a2fe398a88f35}{BFP\_\-\_\-wordL} (unsigned int $\ast$w, unsigned int position, unsigned int field, unsigned int width)
\begin{CompactList}\small\item\em Packs a left justified bit field into the current position. The width of the bit field must be less than or equal to 32 bits. \item\end{CompactList}\item 
static \_\-\_\-inline unsigned int \hyperlink{BFP_8h_6357eff36dde6fb86ef72907e725cba7}{BFP\_\-\_\-wordR} (unsigned int $\ast$w, unsigned int position, unsigned int field, unsigned int width)
\begin{CompactList}\small\item\em Packs a right justified bit field into the current position. The width of the bit field must be less than or equal to 32 bits. \item\end{CompactList}\item 
static \_\-\_\-inline unsigned int \hyperlink{BFP_8h_d20fa72fea485e28d41536ae034417d7}{BFP\_\-\_\-wordB} (unsigned int $\ast$w, unsigned int position, unsigned int bit)
\begin{CompactList}\small\item\em Packs the value of the bit into the current bit position. The value of the bit is either 0 or 1, or said in a negative fashion, it is not the left justified version, {\em i.e\/}. 0x80000000 or 0. \item\end{CompactList}\item 
static \_\-\_\-inline unsigned int \hyperlink{BFP_8h_1b060127f2e46f625f15177aefcd623b}{BFP\_\-\_\-wordLP} (unsigned int $\ast$w, unsigned int position, unsigned int field, unsigned int width)
\begin{CompactList}\small\item\em Packs a left justified bit field into the current position limiting the field to the specified width. The width of the bit field must be less than or equal to 32 bits. \item\end{CompactList}\item 
static \_\-\_\-inline unsigned int \hyperlink{BFP_8h_b84bd6082501a06321f3651f33aa3412}{BFP\_\-\_\-wordRP} (unsigned int $\ast$w, unsigned int position, unsigned int field, unsigned int width)
\begin{CompactList}\small\item\em Packs a right justified bit field into the current position limiting the field to the specified width. The width of the bit field must be less than or equal to 32 bits. \item\end{CompactList}\item 
static \_\-\_\-inline unsigned int \hyperlink{BFP_8h_c793e30eb63dc295b78dd0ef595e3eb8}{BFP\_\-\_\-wordOrL} (unsigned int $\ast$w, unsigned int position, unsigned int field, unsigned int width)
\begin{CompactList}\small\item\em Packs a left justified bit field into the current position. The width of the bit field must be less than or equal to 32 bits. This word is OR'ed into the current stream. \item\end{CompactList}\item 
static \_\-\_\-inline unsigned int \hyperlink{BFP_8h_14698816f93ba2e3575cd7cba55001c3}{BFP\_\-\_\-wordOrR} (unsigned int $\ast$w, unsigned int position, unsigned int field, unsigned int width)
\begin{CompactList}\small\item\em Packs a right justified bit field into the current position. The width of the bit field must be less than or equal to 32 bits This word is OR'd into the current stream. \item\end{CompactList}\item 
static \_\-\_\-inline unsigned int \hyperlink{BFP_8h_6be666f237b21b733d955d1929504584}{BFP\_\-\_\-wordOrB} (unsigned int $\ast$w, unsigned int position, unsigned int bit)
\begin{CompactList}\small\item\em Packs the value of the bit into the current bit position. The value of the bit is either 0 or 1, or said in a negative fashion, it is not the left justified version, {\em i.e\/}. 0x80000000 or 0. \item\end{CompactList}\item 
static \_\-\_\-inline unsigned int \hyperlink{BFP_8h_e7da999efc17c24f6663133866ef2801}{BFP\_\-\_\-collapse} (unsigned int $\ast$w, unsigned int position, unsigned int wrd, unsigned int msk)
\begin{CompactList}\small\item\em Convenience routine to first collapse {\em wrd\/}, keeping only those bits set in {\em wrd\/}, then pack the collapsed word into {\em w\/} starting at bit {\em position\/}. \item\end{CompactList}\item 
static \_\-\_\-inline unsigned int \hyperlink{BFP_8h_89453885ec18be3aa7c885d9f8d99a92}{BFP\_\-\_\-copyW} (unsigned int $\ast$w, unsigned int position, const unsigned int $\ast$wrds, int nwrds)
\begin{CompactList}\small\item\em Copies the specified array of 32-bit words into the output bit array. \item\end{CompactList}\item 
static \_\-\_\-inline unsigned int \hyperlink{BFP_8h_95ea6d73e90d180ede37918f4871bc03}{BFP\_\-\_\-convert} (unsigned int $\ast$w, unsigned int position, unsigned int val, unsigned int nval, unsigned int nexp)
\begin{CompactList}\small\item\em Convenience routine to pack small integers that are embedded in a larger field. \item\end{CompactList}\item 
static \_\-\_\-inline unsigned int \hyperlink{BFP_8h_6a8263aea09bbdbdaa9b5b0b6c75a71a}{BFP\_\-\_\-word0N} (unsigned int $\ast$w, unsigned int position, unsigned int cnt)
\begin{CompactList}\small\item\em Packs {\em cnt\/} consecutive 0's. \item\end{CompactList}\item 
static \_\-\_\-inline unsigned int \hyperlink{BFP_8h_48dfe5409042e56f34d852acb3397ec5}{BFP\_\-\_\-word1N} (unsigned int $\ast$w, unsigned int position, unsigned int cnt)
\begin{CompactList}\small\item\em Packs {\em cnt\/} consecutive 1's. \item\end{CompactList}\item 
static \_\-\_\-inline unsigned int \hyperlink{BFP_8h_b286b22a9bc9e0cd8ce28cc6f73ac9c5}{BFP\_\-\_\-pack1s} (unsigned int $\ast$w, unsigned int position, unsigned int cnt)
\begin{CompactList}\small\item\em Packs {\em cnt\/} consecutive 1's terminated by a 0. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Bit Field Pack Routines. 

\begin{Desc}
\item[Author:]JJRussell - \href{mailto:russell@slac.stanford.edu}{\tt russell@slac.stanford.edu}\end{Desc}
\begin{Desc}
\item[]Inline functions to (left justified) pack bit fields into a 32-bit output vector. These routines assume that any bits ahead of the current bit position index can be overwritten. In this sense these routines are not equivalent to a bit field insert routine which only write the bits in the designated bit field.\end{Desc}
\begin{Desc}
\item[]The routines come in a 2 x 2 set. One can insert a field of a specified width that is either left or right justified. In addition one can use unprotected or protected routines, the distinction being that the unprotected routines are faster, but demand that the user guarantee that no more than the specified bits are non-zero. Conversely, the protected routines limit the bit field to the specified width. \end{Desc}


\subsection{Function Documentation}
\hypertarget{BFP_8h_e7da999efc17c24f6663133866ef2801}{
\index{BFP.h@{BFP.h}!BFP\_\-\_\-collapse@{BFP\_\-\_\-collapse}}
\index{BFP\_\-\_\-collapse@{BFP\_\-\_\-collapse}!BFP.h@{BFP.h}}
\subsubsection[{BFP\_\-\_\-collapse}]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline unsigned int BFP\_\-\_\-collapse (unsigned int $\ast$ {\em w}, \/  unsigned int {\em position}, \/  unsigned int {\em wrd}, \/  unsigned int {\em msk})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{BFP_8h_e7da999efc17c24f6663133866ef2801}


Convenience routine to first collapse {\em wrd\/}, keeping only those bits set in {\em wrd\/}, then pack the collapsed word into {\em w\/} starting at bit {\em position\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em w}]The output word \item[{\em position}]The current bit position \item[{\em wrd}]The target word \item[{\em msk}]The selection mask \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The updated bit position\end{Desc}
\begin{Desc}
\item[Note:]There is no need for a {\em right\/} and {\em left\/} version of these routines. \end{Desc}


References BFP\_\-\_\-wordL(), \_\-BW\_\-vector::bits, BWP\_\-collapseL(), and \_\-BW\_\-vector::nbits.\hypertarget{BFP_8h_95ea6d73e90d180ede37918f4871bc03}{
\index{BFP.h@{BFP.h}!BFP\_\-\_\-convert@{BFP\_\-\_\-convert}}
\index{BFP\_\-\_\-convert@{BFP\_\-\_\-convert}!BFP.h@{BFP.h}}
\subsubsection[{BFP\_\-\_\-convert}]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline unsigned int BFP\_\-\_\-convert (unsigned int $\ast$ {\em w}, \/  unsigned int {\em position}, \/  unsigned int {\em val}, \/  unsigned int {\em nval}, \/  unsigned int {\em nexp})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{BFP_8h_95ea6d73e90d180ede37918f4871bc03}


Convenience routine to pack small integers that are embedded in a larger field. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em w}]The output word \item[{\em position}]The current bit position \item[{\em val}]The interger value to be encoded \item[{\em nval}]The bit field width of val \item[{\em nexp}]The number of bits to devote to the exponent encoding\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The updated bit position\end{Desc}
\begin{Desc}
\item[Note:]There is no need for a {\em right\/} and {\em left\/} version of these routines. See BWP\_\-reduceL for a complete description of the packing algorithm \end{Desc}


References BFP\_\-\_\-wordR(), \_\-BW\_\-vector::bits, BWP\_\-convertR(), and \_\-BW\_\-vector::nbits.\hypertarget{BFP_8h_89453885ec18be3aa7c885d9f8d99a92}{
\index{BFP.h@{BFP.h}!BFP\_\-\_\-copyW@{BFP\_\-\_\-copyW}}
\index{BFP\_\-\_\-copyW@{BFP\_\-\_\-copyW}!BFP.h@{BFP.h}}
\subsubsection[{BFP\_\-\_\-copyW}]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline unsigned int BFP\_\-\_\-copyW (unsigned int $\ast$ {\em w}, \/  unsigned int {\em position}, \/  const unsigned int $\ast$ {\em wrds}, \/  int {\em nwrds})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{BFP_8h_89453885ec18be3aa7c885d9f8d99a92}


Copies the specified array of 32-bit words into the output bit array. 

\begin{Desc}
\item[Returns:]The updated bit position\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em w}]The output word \item[{\em position}]The current bit position \item[{\em wrds}]The array of 32-bit words to copy \item[{\em nwrds}]The number of 32-bit words to copy \end{description}
\end{Desc}
\hypertarget{BFP_8h_77b19a6891004338b3c47bfe81fc0e5d}{
\index{BFP.h@{BFP.h}!BFP\_\-\_\-maskL@{BFP\_\-\_\-maskL}}
\index{BFP\_\-\_\-maskL@{BFP\_\-\_\-maskL}!BFP.h@{BFP.h}}
\subsubsection[{BFP\_\-\_\-maskL}]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline unsigned int BFP\_\-\_\-maskL (int {\em width})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{BFP_8h_77b19a6891004338b3c47bfe81fc0e5d}


Produce a left justified mask of the specified width. 

\begin{Desc}
\item[Returns:]A left justified mask of the specified width\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em width}]The width of the mask\end{description}
\end{Desc}
\begin{Desc}
\item[]The BFP\_\-\_\-word packing routines do not protect themselves against stray bits ({\em i.e\/}. bits set outside the specified width) for efficiency reasons. On most occasions this protection occurs naturally as part of composing the field, so this would be a waste of time. However, when it is needed this inline provides a tidy way to produce the necessary mask. \end{Desc}


Referenced by BFP\_\-\_\-wordLP(), and BFP\_\-\_\-wordRP().\hypertarget{BFP_8h_7ff18bd1883049432bccae1561ebee84}{
\index{BFP.h@{BFP.h}!BFP\_\-\_\-maskR@{BFP\_\-\_\-maskR}}
\index{BFP\_\-\_\-maskR@{BFP\_\-\_\-maskR}!BFP.h@{BFP.h}}
\subsubsection[{BFP\_\-\_\-maskR}]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline unsigned int BFP\_\-\_\-maskR (int {\em width})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{BFP_8h_7ff18bd1883049432bccae1561ebee84}


Produce a right justified mask of the specified width. 

\begin{Desc}
\item[Returns:]A right justified mask of the specified width\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em width}]The width of the mask, must be between 0 and 31.\end{description}
\end{Desc}
\begin{Desc}
\item[]The BFP\_\-\_\-word packing routines do not protect themselves against stray bits ({\em i.e\/}. bits set outside the specified width) for efficiency reasons. On most occasions this protection occurs naturally as part of composing the field, so this would be a waste of time. However, when it is needed this inline provides a tidy way to produce the necessary mask. \end{Desc}
\hypertarget{BFP_8h_b286b22a9bc9e0cd8ce28cc6f73ac9c5}{
\index{BFP.h@{BFP.h}!BFP\_\-\_\-pack1s@{BFP\_\-\_\-pack1s}}
\index{BFP\_\-\_\-pack1s@{BFP\_\-\_\-pack1s}!BFP.h@{BFP.h}}
\subsubsection[{BFP\_\-\_\-pack1s}]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline unsigned int BFP\_\-\_\-pack1s (unsigned int $\ast$ {\em w}, \/  unsigned int {\em position}, \/  unsigned int {\em cnt})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{BFP_8h_b286b22a9bc9e0cd8ce28cc6f73ac9c5}


Packs {\em cnt\/} consecutive 1's terminated by a 0. 

\_\-\_\-inline unsigned int BFP\_\-\_\-pack1s (unsigned int $\ast$w, unsigned int position, unsigned int cnt) \begin{Desc}
\item[Returns:]The next bit position to write, must be pos + cnt + 1\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em w}]The output word \item[{\em position}]The current bit position \item[{\em cnt}]The number of 1s to pack \end{description}
\end{Desc}


References BFP\_\-\_\-wordL().\hypertarget{BFP_8h_6a8263aea09bbdbdaa9b5b0b6c75a71a}{
\index{BFP.h@{BFP.h}!BFP\_\-\_\-word0N@{BFP\_\-\_\-word0N}}
\index{BFP\_\-\_\-word0N@{BFP\_\-\_\-word0N}!BFP.h@{BFP.h}}
\subsubsection[{BFP\_\-\_\-word0N}]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline unsigned int BFP\_\-\_\-word0N (unsigned int $\ast$ {\em w}, \/  unsigned int {\em position}, \/  unsigned int {\em cnt})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{BFP_8h_6a8263aea09bbdbdaa9b5b0b6c75a71a}


Packs {\em cnt\/} consecutive 0's. 

\begin{Desc}
\item[Returns:]The updated bit position;\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em w}]The output word \item[{\em position}]The current bit position \item[{\em cnt}]The number of 0s to pack, must be $>$ 0.\end{description}
\end{Desc}
\begin{Desc}
\item[Warning:]This routine is not protected against {\em cnt\/} = 0; \end{Desc}


References \_\-BA::togo.\hypertarget{BFP_8h_48dfe5409042e56f34d852acb3397ec5}{
\index{BFP.h@{BFP.h}!BFP\_\-\_\-word1N@{BFP\_\-\_\-word1N}}
\index{BFP\_\-\_\-word1N@{BFP\_\-\_\-word1N}!BFP.h@{BFP.h}}
\subsubsection[{BFP\_\-\_\-word1N}]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline unsigned int BFP\_\-\_\-word1N (unsigned int $\ast$ {\em w}, \/  unsigned int {\em position}, \/  unsigned int {\em cnt})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{BFP_8h_48dfe5409042e56f34d852acb3397ec5}


Packs {\em cnt\/} consecutive 1's. 

\_\-\_\-inline unsigned int BFP\_\-word1N (unsigned int $\ast$w, unsigned int position, unsigned int cnt) \begin{Desc}
\item[Returns:]The next bit position to write, must be position + cnt\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em w}]The output word \item[{\em position}]The current bit position \item[{\em cnt}]The number of 1s to pack, must be $>$ 0\end{description}
\end{Desc}
\begin{Desc}
\item[Warning:]This routine is not protected againt {\em cnt\/} = 0;\end{Desc}
\begin{Desc}
\item[Note:]This routine could be implemented more efficiently by aligning the number of bits to be set with a 32-bit boundary. \end{Desc}


References BFP\_\-\_\-wordL().\hypertarget{BFP_8h_d20fa72fea485e28d41536ae034417d7}{
\index{BFP.h@{BFP.h}!BFP\_\-\_\-wordB@{BFP\_\-\_\-wordB}}
\index{BFP\_\-\_\-wordB@{BFP\_\-\_\-wordB}!BFP.h@{BFP.h}}
\subsubsection[{BFP\_\-\_\-wordB}]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline unsigned int BFP\_\-\_\-wordB (unsigned int $\ast$ {\em w}, \/  unsigned int {\em position}, \/  unsigned int {\em bit})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{BFP_8h_d20fa72fea485e28d41536ae034417d7}


Packs the value of the bit into the current bit position. The value of the bit is either 0 or 1, or said in a negative fashion, it is not the left justified version, {\em i.e\/}. 0x80000000 or 0. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em w}]The output word \item[{\em position}]The current bit position \item[{\em bit}]The value of the bit to insert (0 or 1) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The updated bit position \end{Desc}


Referenced by HDE\_\-encodeSS(), HDE\_\-tableEncode(), huff\_\-table\_\-encode(), and pack\_\-delta1().\hypertarget{BFP_8h_da4fa82d8ec5d531d62a2fe398a88f35}{
\index{BFP.h@{BFP.h}!BFP\_\-\_\-wordL@{BFP\_\-\_\-wordL}}
\index{BFP\_\-\_\-wordL@{BFP\_\-\_\-wordL}!BFP.h@{BFP.h}}
\subsubsection[{BFP\_\-\_\-wordL}]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline unsigned int BFP\_\-\_\-wordL (unsigned int $\ast$ {\em w}, \/  unsigned int {\em position}, \/  unsigned int {\em field}, \/  unsigned int {\em width})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{BFP_8h_da4fa82d8ec5d531d62a2fe398a88f35}


Packs a left justified bit field into the current position. The width of the bit field must be less than or equal to 32 bits. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em w}]The output word array to insert the bit field into \item[{\em position}]The current bit position in the output bit field \item[{\em field}]The left justified field to insert \item[{\em width}]The width of the field to insert \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The new bit position (essentially position + width). \end{Desc}


Referenced by BFP\_\-\_\-collapse(), BFP\_\-\_\-pack1s(), BFP\_\-\_\-word1N(), BFP\_\-\_\-wordLP(), BFP\_\-\_\-wordR(), and BFP\_\-\_\-wordRP().\hypertarget{BFP_8h_1b060127f2e46f625f15177aefcd623b}{
\index{BFP.h@{BFP.h}!BFP\_\-\_\-wordLP@{BFP\_\-\_\-wordLP}}
\index{BFP\_\-\_\-wordLP@{BFP\_\-\_\-wordLP}!BFP.h@{BFP.h}}
\subsubsection[{BFP\_\-\_\-wordLP}]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline unsigned int BFP\_\-\_\-wordLP (unsigned int $\ast$ {\em w}, \/  unsigned int {\em position}, \/  unsigned int {\em field}, \/  unsigned int {\em width})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{BFP_8h_1b060127f2e46f625f15177aefcd623b}


Packs a left justified bit field into the current position limiting the field to the specified width. The width of the bit field must be less than or equal to 32 bits. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em w}]The output word array to insert the bit field into \item[{\em position}]The current bit position in the output bit field \item[{\em field}]The left justified field to insert \item[{\em width}]The width of the field to insert \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The new bit position (essentially position + width). \end{Desc}


References BFP\_\-\_\-maskL(), and BFP\_\-\_\-wordL().\hypertarget{BFP_8h_6be666f237b21b733d955d1929504584}{
\index{BFP.h@{BFP.h}!BFP\_\-\_\-wordOrB@{BFP\_\-\_\-wordOrB}}
\index{BFP\_\-\_\-wordOrB@{BFP\_\-\_\-wordOrB}!BFP.h@{BFP.h}}
\subsubsection[{BFP\_\-\_\-wordOrB}]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline unsigned int BFP\_\-\_\-wordOrB (unsigned int $\ast$ {\em w}, \/  unsigned int {\em position}, \/  unsigned int {\em bit})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{BFP_8h_6be666f237b21b733d955d1929504584}


Packs the value of the bit into the current bit position. The value of the bit is either 0 or 1, or said in a negative fashion, it is not the left justified version, {\em i.e\/}. 0x80000000 or 0. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em w}]The output word \item[{\em position}]The current bit position \item[{\em bit}]The value of the bit to insert (0 or 1) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The updated bit position \end{Desc}
\hypertarget{BFP_8h_c793e30eb63dc295b78dd0ef595e3eb8}{
\index{BFP.h@{BFP.h}!BFP\_\-\_\-wordOrL@{BFP\_\-\_\-wordOrL}}
\index{BFP\_\-\_\-wordOrL@{BFP\_\-\_\-wordOrL}!BFP.h@{BFP.h}}
\subsubsection[{BFP\_\-\_\-wordOrL}]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline unsigned int BFP\_\-\_\-wordOrL (unsigned int $\ast$ {\em w}, \/  unsigned int {\em position}, \/  unsigned int {\em field}, \/  unsigned int {\em width})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{BFP_8h_c793e30eb63dc295b78dd0ef595e3eb8}


Packs a left justified bit field into the current position. The width of the bit field must be less than or equal to 32 bits. This word is OR'ed into the current stream. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em w}]The output word array to insert the bit field into \item[{\em position}]The current bit position in the output bit field \item[{\em field}]The left justified field to insert \item[{\em width}]The width of the field to insert \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The new bit position (essentially position + width). \end{Desc}


Referenced by BFP\_\-\_\-wordOrR().\hypertarget{BFP_8h_14698816f93ba2e3575cd7cba55001c3}{
\index{BFP.h@{BFP.h}!BFP\_\-\_\-wordOrR@{BFP\_\-\_\-wordOrR}}
\index{BFP\_\-\_\-wordOrR@{BFP\_\-\_\-wordOrR}!BFP.h@{BFP.h}}
\subsubsection[{BFP\_\-\_\-wordOrR}]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline unsigned int BFP\_\-\_\-wordOrR (unsigned int $\ast$ {\em w}, \/  unsigned int {\em position}, \/  unsigned int {\em field}, \/  unsigned int {\em width})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{BFP_8h_14698816f93ba2e3575cd7cba55001c3}


Packs a right justified bit field into the current position. The width of the bit field must be less than or equal to 32 bits This word is OR'd into the current stream. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em w}]The output word array to insert the bit field into \item[{\em position}]The current bit position in the output bit field \item[{\em field}]The left justified field to insert \item[{\em width}]The width of the field to insert \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The new bit position (essentially position + width). \end{Desc}


References BFP\_\-\_\-wordOrL().\hypertarget{BFP_8h_6357eff36dde6fb86ef72907e725cba7}{
\index{BFP.h@{BFP.h}!BFP\_\-\_\-wordR@{BFP\_\-\_\-wordR}}
\index{BFP\_\-\_\-wordR@{BFP\_\-\_\-wordR}!BFP.h@{BFP.h}}
\subsubsection[{BFP\_\-\_\-wordR}]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline unsigned int BFP\_\-\_\-wordR (unsigned int $\ast$ {\em w}, \/  unsigned int {\em position}, \/  unsigned int {\em field}, \/  unsigned int {\em width})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{BFP_8h_6357eff36dde6fb86ef72907e725cba7}


Packs a right justified bit field into the current position. The width of the bit field must be less than or equal to 32 bits. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em w}]The output word array to insert the bit field into \item[{\em position}]The current bit position in the output bit field \item[{\em field}]The left justified field to insert \item[{\em width}]The width of the field to insert \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The new bit position (essentially position + width). \end{Desc}


References BFP\_\-\_\-wordL().

Referenced by BFP\_\-\_\-convert(), direct\_\-symbols\_\-encode(), pack\_\-delta1(), pack\_\-delta2(), pack\_\-delta\_\-huff(), pack\_\-seed\_\-min\_\-max(), and pack\_\-short().\hypertarget{BFP_8h_b84bd6082501a06321f3651f33aa3412}{
\index{BFP.h@{BFP.h}!BFP\_\-\_\-wordRP@{BFP\_\-\_\-wordRP}}
\index{BFP\_\-\_\-wordRP@{BFP\_\-\_\-wordRP}!BFP.h@{BFP.h}}
\subsubsection[{BFP\_\-\_\-wordRP}]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline unsigned int BFP\_\-\_\-wordRP (unsigned int $\ast$ {\em w}, \/  unsigned int {\em position}, \/  unsigned int {\em field}, \/  unsigned int {\em width})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{BFP_8h_b84bd6082501a06321f3651f33aa3412}


Packs a right justified bit field into the current position limiting the field to the specified width. The width of the bit field must be less than or equal to 32 bits. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em w}]The output word array to insert the bit field into \item[{\em position}]The current bit position in the output bit field \item[{\em field}]The right justified field to insert \item[{\em width}]The width of the field to insert \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The new bit position (essentially position + width). \end{Desc}


References BFP\_\-\_\-maskL(), and BFP\_\-\_\-wordL().