\hypertarget{opal__pointer__array_8h}{\section{opal/class/opal\+\_\+pointer\+\_\+array.h File Reference}
\label{opal__pointer__array_8h}\index{opal/class/opal\+\_\+pointer\+\_\+array.\+h@{opal/class/opal\+\_\+pointer\+\_\+array.\+h}}
}


See \hyperlink{opal__bitmap_8h}{opal\+\_\+bitmap.\+h} for an explanation of why there is a split between O\+P\+A\+L and O\+R\+T\+E for this generic class.  


{\ttfamily \#include \char`\"{}opal\+\_\+config.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/threads/mutex.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/class/opal\+\_\+object.\+h\char`\"{}}\\*
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structopal__pointer__array__t}{opal\+\_\+pointer\+\_\+array\+\_\+t}
\begin{DoxyCompactList}\small\item\em dynamic pointer array \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\hypertarget{opal__pointer__array_8h_a5a36cede33f34159baa4de0ee6c5fb31}{typedef struct \hyperlink{structopal__pointer__array__t}{opal\+\_\+pointer\+\_\+array\+\_\+t} \hyperlink{opal__pointer__array_8h_a5a36cede33f34159baa4de0ee6c5fb31}{opal\+\_\+pointer\+\_\+array\+\_\+t}}\label{opal__pointer__array_8h_a5a36cede33f34159baa4de0ee6c5fb31}

\begin{DoxyCompactList}\small\item\em Convenience typedef. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{opal__pointer__array_8h_ac45bcb7ae6b40c2b84f116d575856f95}{O\+P\+A\+L\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C \hyperlink{opal__pointer__array_8h_ac45bcb7ae6b40c2b84f116d575856f95}{O\+B\+J\+\_\+\+C\+L\+A\+S\+S\+\_\+\+D\+E\+C\+L\+A\+R\+A\+T\+I\+O\+N} (\hyperlink{structopal__pointer__array__t}{opal\+\_\+pointer\+\_\+array\+\_\+t})}\label{opal__pointer__array_8h_ac45bcb7ae6b40c2b84f116d575856f95}

\begin{DoxyCompactList}\small\item\em Class declaration. \end{DoxyCompactList}\item 
O\+P\+A\+L\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int \hyperlink{opal__pointer__array_8h_a247d8e5a6255bbdd2603dda996471629}{opal\+\_\+pointer\+\_\+array\+\_\+init} (\hyperlink{structopal__pointer__array__t}{opal\+\_\+pointer\+\_\+array\+\_\+t} $\ast$array, int initial\+\_\+allocation, int max\+\_\+size, int block\+\_\+size)
\begin{DoxyCompactList}\small\item\em Initialize the pointer array with an initial size of initial\+\_\+allocation. \end{DoxyCompactList}\item 
O\+P\+A\+L\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int \hyperlink{opal__pointer__array_8h_a977a82087f6924c3f2f17f423c585ac8}{opal\+\_\+pointer\+\_\+array\+\_\+add} (\hyperlink{structopal__pointer__array__t}{opal\+\_\+pointer\+\_\+array\+\_\+t} $\ast$array, void $\ast$ptr)
\begin{DoxyCompactList}\small\item\em Add a pointer to the array (Grow the array, if need be) \end{DoxyCompactList}\item 
O\+P\+A\+L\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int \hyperlink{opal__pointer__array_8h_a765ec92af547b70dd643070d57cf4d1f}{opal\+\_\+pointer\+\_\+array\+\_\+set\+\_\+item} (\hyperlink{structopal__pointer__array__t}{opal\+\_\+pointer\+\_\+array\+\_\+t} $\ast$array, int index, void $\ast$value)
\begin{DoxyCompactList}\small\item\em Set the value of an element in array. \end{DoxyCompactList}\item 
static void $\ast$ \hyperlink{opal__pointer__array_8h_a530b23d3c6fbe6cfeeeda222b4f835ad}{opal\+\_\+pointer\+\_\+array\+\_\+get\+\_\+item} (\hyperlink{structopal__pointer__array__t}{opal\+\_\+pointer\+\_\+array\+\_\+t} $\ast$table, int element\+\_\+index)
\begin{DoxyCompactList}\small\item\em Get the value of an element in array. \end{DoxyCompactList}\item 
static int \hyperlink{opal__pointer__array_8h_a612d77e9e19236155149a1a22511e828}{opal\+\_\+pointer\+\_\+array\+\_\+get\+\_\+size} (\hyperlink{structopal__pointer__array__t}{opal\+\_\+pointer\+\_\+array\+\_\+t} $\ast$array)
\begin{DoxyCompactList}\small\item\em Get the size of the pointer array. \end{DoxyCompactList}\item 
O\+P\+A\+L\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int \hyperlink{opal__pointer__array_8h_ac309f6719524aa2d0d1b2026b07b4ba5}{opal\+\_\+pointer\+\_\+array\+\_\+set\+\_\+size} (\hyperlink{structopal__pointer__array__t}{opal\+\_\+pointer\+\_\+array\+\_\+t} $\ast$array, int size)
\begin{DoxyCompactList}\small\item\em Set the size of the pointer array. \end{DoxyCompactList}\item 
O\+P\+A\+L\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C bool \hyperlink{opal__pointer__array_8h_a50ce784bbb0cdf4d5b061e718cf6717f}{opal\+\_\+pointer\+\_\+array\+\_\+test\+\_\+and\+\_\+set\+\_\+item} (\hyperlink{structopal__pointer__array__t}{opal\+\_\+pointer\+\_\+array\+\_\+t} $\ast$table, int index, void $\ast$value)
\begin{DoxyCompactList}\small\item\em Test whether a certain element is already in use. \end{DoxyCompactList}\item 
static void \hyperlink{opal__pointer__array_8h_a222c9a88b607eb78ddb249efee64f0a1}{opal\+\_\+pointer\+\_\+array\+\_\+remove\+\_\+all} (\hyperlink{structopal__pointer__array__t}{opal\+\_\+pointer\+\_\+array\+\_\+t} $\ast$array)
\begin{DoxyCompactList}\small\item\em Empty the array. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
See \hyperlink{opal__bitmap_8h}{opal\+\_\+bitmap.\+h} for an explanation of why there is a split between O\+P\+A\+L and O\+R\+T\+E for this generic class. 

Utility functions to manage fortran $<$-\/$>$ c opaque object translation. Note that since M\+P\+I defines fortran handles as \mbox{[}signed\mbox{]} int's, we use int everywhere in here where you would normally expect size\+\_\+t. There's some code that makes sure indices don't go above F\+O\+R\+T\+R\+A\+N\+\_\+\+H\+A\+N\+D\+L\+E\+\_\+\+M\+A\+X (which is min(I\+N\+T\+\_\+\+M\+A\+X, fortran I\+N\+T\+E\+G\+E\+R max)), just to be sure. 

\subsection{Function Documentation}
\hypertarget{opal__pointer__array_8h_a977a82087f6924c3f2f17f423c585ac8}{\index{opal\+\_\+pointer\+\_\+array.\+h@{opal\+\_\+pointer\+\_\+array.\+h}!opal\+\_\+pointer\+\_\+array\+\_\+add@{opal\+\_\+pointer\+\_\+array\+\_\+add}}
\index{opal\+\_\+pointer\+\_\+array\+\_\+add@{opal\+\_\+pointer\+\_\+array\+\_\+add}!opal\+\_\+pointer\+\_\+array.\+h@{opal\+\_\+pointer\+\_\+array.\+h}}
\subsubsection[{opal\+\_\+pointer\+\_\+array\+\_\+add}]{\setlength{\rightskip}{0pt plus 5cm}O\+P\+A\+L\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int opal\+\_\+pointer\+\_\+array\+\_\+add (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+pointer\+\_\+array\+\_\+t} $\ast$}]{table, }
\item[{void $\ast$}]{ptr}
\end{DoxyParamCaption}
)}}\label{opal__pointer__array_8h_a977a82087f6924c3f2f17f423c585ac8}


Add a pointer to the array (Grow the array, if need be) 


\begin{DoxyParams}{Parameters}
{\em array} & Pointer to array (I\+N) \\
\hline
{\em ptr} & Pointer value (I\+N)\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Index of inserted array element. Return value of (-\/1) indicates an error.
\end{DoxyReturn}
Add a pointer to the array (Grow the array, if need be)


\begin{DoxyParams}{Parameters}
{\em table} & Pointer to \hyperlink{structopal__pointer__array__t}{opal\+\_\+pointer\+\_\+array\+\_\+t} object (I\+N) \\
\hline
{\em ptr} & Pointer to be added to table (I\+N)\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Array index where ptr is inserted or O\+P\+A\+L\+\_\+\+E\+R\+R\+O\+R if it fails 
\end{DoxyReturn}


References opal\+\_\+pointer\+\_\+array\+\_\+t\+::addr, opal\+\_\+pointer\+\_\+array\+\_\+t\+::lock, opal\+\_\+pointer\+\_\+array\+\_\+t\+::lowest\+\_\+free, opal\+\_\+pointer\+\_\+array\+\_\+t\+::number\+\_\+free, O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+L\+O\+C\+K, O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+U\+N\+L\+O\+C\+K, and opal\+\_\+pointer\+\_\+array\+\_\+t\+::size.



Referenced by ompi\+\_\+request\+\_\+init(), opal\+\_\+graph\+\_\+get\+\_\+graph\+\_\+vertices(), orte\+\_\+ras\+\_\+base\+\_\+node\+\_\+insert(), and orte\+\_\+sensor\+\_\+base\+\_\+select().

\hypertarget{opal__pointer__array_8h_a530b23d3c6fbe6cfeeeda222b4f835ad}{\index{opal\+\_\+pointer\+\_\+array.\+h@{opal\+\_\+pointer\+\_\+array.\+h}!opal\+\_\+pointer\+\_\+array\+\_\+get\+\_\+item@{opal\+\_\+pointer\+\_\+array\+\_\+get\+\_\+item}}
\index{opal\+\_\+pointer\+\_\+array\+\_\+get\+\_\+item@{opal\+\_\+pointer\+\_\+array\+\_\+get\+\_\+item}!opal\+\_\+pointer\+\_\+array.\+h@{opal\+\_\+pointer\+\_\+array.\+h}}
\subsubsection[{opal\+\_\+pointer\+\_\+array\+\_\+get\+\_\+item}]{\setlength{\rightskip}{0pt plus 5cm}static void$\ast$ opal\+\_\+pointer\+\_\+array\+\_\+get\+\_\+item (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+pointer\+\_\+array\+\_\+t} $\ast$}]{table, }
\item[{int}]{element\+\_\+index}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{opal__pointer__array_8h_a530b23d3c6fbe6cfeeeda222b4f835ad}


Get the value of an element in array. 


\begin{DoxyParams}{Parameters}
{\em array} & Pointer to array (I\+N) \\
\hline
{\em element\+\_\+index} & Index of element to be returned (I\+N)\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Error code. N\+U\+L\+L indicates an error. 
\end{DoxyReturn}


References opal\+\_\+pointer\+\_\+array\+\_\+t\+::addr, opal\+\_\+pointer\+\_\+array\+\_\+t\+::lock, O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+L\+O\+C\+K, O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+U\+N\+L\+O\+C\+K, and opal\+\_\+pointer\+\_\+array\+\_\+t\+::size.



Referenced by btl\+\_\+openib\+\_\+handle\+\_\+failover\+\_\+control\+\_\+messages(), mca\+\_\+btl\+\_\+openib\+\_\+dump\+\_\+all\+\_\+internal\+\_\+queues(), mca\+\_\+btl\+\_\+openib\+\_\+endpoint\+\_\+notify(), mca\+\_\+btl\+\_\+openib\+\_\+handle\+\_\+btl\+\_\+error(), mca\+\_\+btl\+\_\+udapl\+\_\+component\+\_\+progress(), mca\+\_\+btl\+\_\+udapl\+\_\+finalize(), ompi\+\_\+errcode\+\_\+get\+\_\+mpi\+\_\+code(), ompi\+\_\+mpi\+\_\+errcode\+\_\+finalize(), ompi\+\_\+mpi\+\_\+errcode\+\_\+get\+\_\+class(), ompi\+\_\+mpi\+\_\+errnum\+\_\+add\+\_\+string(), ompi\+\_\+mpi\+\_\+errnum\+\_\+get\+\_\+string(), opal\+\_\+carto\+\_\+base\+\_\+duplicate\+\_\+graph\+\_\+fn(), opal\+\_\+carto\+\_\+base\+\_\+free\+\_\+graph\+\_\+fn(), opal\+\_\+dss\+\_\+close(), orte\+\_\+get\+\_\+job\+\_\+data\+\_\+object(), orte\+\_\+plm\+\_\+base\+\_\+orted\+\_\+exit(), orte\+\_\+ras\+\_\+base\+\_\+node\+\_\+insert(), orte\+\_\+rmaps\+\_\+base\+\_\+get\+\_\+target\+\_\+nodes(), orte\+\_\+rml\+\_\+base\+\_\+get\+\_\+contact\+\_\+info(), and orte\+\_\+sensor\+\_\+base\+\_\+select().

\hypertarget{opal__pointer__array_8h_a612d77e9e19236155149a1a22511e828}{\index{opal\+\_\+pointer\+\_\+array.\+h@{opal\+\_\+pointer\+\_\+array.\+h}!opal\+\_\+pointer\+\_\+array\+\_\+get\+\_\+size@{opal\+\_\+pointer\+\_\+array\+\_\+get\+\_\+size}}
\index{opal\+\_\+pointer\+\_\+array\+\_\+get\+\_\+size@{opal\+\_\+pointer\+\_\+array\+\_\+get\+\_\+size}!opal\+\_\+pointer\+\_\+array.\+h@{opal\+\_\+pointer\+\_\+array.\+h}}
\subsubsection[{opal\+\_\+pointer\+\_\+array\+\_\+get\+\_\+size}]{\setlength{\rightskip}{0pt plus 5cm}static int opal\+\_\+pointer\+\_\+array\+\_\+get\+\_\+size (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+pointer\+\_\+array\+\_\+t} $\ast$}]{array}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{opal__pointer__array_8h_a612d77e9e19236155149a1a22511e828}


Get the size of the pointer array. 


\begin{DoxyParams}{Parameters}
{\em array} & Pointer to array (I\+N)\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
size Size of the array
\end{DoxyReturn}
Simple inline function to return the size of the array in order to hide the member field from external users. 

References opal\+\_\+pointer\+\_\+array\+\_\+t\+::size.



Referenced by btl\+\_\+openib\+\_\+handle\+\_\+failover\+\_\+control\+\_\+messages(), mca\+\_\+btl\+\_\+openib\+\_\+dump\+\_\+all\+\_\+internal\+\_\+queues(), mca\+\_\+btl\+\_\+openib\+\_\+endpoint\+\_\+notify(), mca\+\_\+btl\+\_\+openib\+\_\+handle\+\_\+btl\+\_\+error(), and opal\+\_\+dss\+\_\+close().

\hypertarget{opal__pointer__array_8h_a247d8e5a6255bbdd2603dda996471629}{\index{opal\+\_\+pointer\+\_\+array.\+h@{opal\+\_\+pointer\+\_\+array.\+h}!opal\+\_\+pointer\+\_\+array\+\_\+init@{opal\+\_\+pointer\+\_\+array\+\_\+init}}
\index{opal\+\_\+pointer\+\_\+array\+\_\+init@{opal\+\_\+pointer\+\_\+array\+\_\+init}!opal\+\_\+pointer\+\_\+array.\+h@{opal\+\_\+pointer\+\_\+array.\+h}}
\subsubsection[{opal\+\_\+pointer\+\_\+array\+\_\+init}]{\setlength{\rightskip}{0pt plus 5cm}O\+P\+A\+L\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int opal\+\_\+pointer\+\_\+array\+\_\+init (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+pointer\+\_\+array\+\_\+t} $\ast$}]{array, }
\item[{int}]{initial\+\_\+allocation, }
\item[{int}]{max\+\_\+size, }
\item[{int}]{block\+\_\+size}
\end{DoxyParamCaption}
)}}\label{opal__pointer__array_8h_a247d8e5a6255bbdd2603dda996471629}


Initialize the pointer array with an initial size of initial\+\_\+allocation. 

Set the maximum size of the array, as well as the size of the allocation block for all subsequent growing operations. Remarque\+: The pointer array has to be created bfore calling this function.


\begin{DoxyParams}{Parameters}
{\em array} & Pointer to pointer of an array (I\+N/\+O\+U\+T) \\
\hline
{\em initial\+\_\+allocation} & The number of elements in the initial array (I\+N) \\
\hline
{\em max\+\_\+size} & The maximum size of the array (I\+N) \\
\hline
{\em block\+\_\+size} & The size for all subsequent grows of the array (I\+N).\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
O\+P\+A\+L\+\_\+\+S\+U\+C\+C\+E\+S\+S if all initializations were succesfull. Otherwise, the error indicate what went wrong in the function.
\end{DoxyReturn}
Initialize the pointer array with an initial size of initial\+\_\+allocation. 

References opal\+\_\+pointer\+\_\+array\+\_\+t\+::addr, opal\+\_\+pointer\+\_\+array\+\_\+t\+::block\+\_\+size, opal\+\_\+pointer\+\_\+array\+\_\+t\+::max\+\_\+size, opal\+\_\+pointer\+\_\+array\+\_\+t\+::number\+\_\+free, and opal\+\_\+pointer\+\_\+array\+\_\+t\+::size.



Referenced by mca\+\_\+btl\+\_\+udapl\+\_\+init(), ompi\+\_\+errcode\+\_\+intern\+\_\+init(), ompi\+\_\+errhandler\+\_\+init(), ompi\+\_\+group\+\_\+init(), ompi\+\_\+mpi\+\_\+errcode\+\_\+init(), ompi\+\_\+request\+\_\+init(), opal\+\_\+carto\+\_\+base\+\_\+duplicate\+\_\+graph\+\_\+fn(), opal\+\_\+carto\+\_\+base\+\_\+free\+\_\+graph\+\_\+fn(), opal\+\_\+dss\+\_\+open(), and orte\+\_\+sensor\+\_\+base\+\_\+open().

\hypertarget{opal__pointer__array_8h_a222c9a88b607eb78ddb249efee64f0a1}{\index{opal\+\_\+pointer\+\_\+array.\+h@{opal\+\_\+pointer\+\_\+array.\+h}!opal\+\_\+pointer\+\_\+array\+\_\+remove\+\_\+all@{opal\+\_\+pointer\+\_\+array\+\_\+remove\+\_\+all}}
\index{opal\+\_\+pointer\+\_\+array\+\_\+remove\+\_\+all@{opal\+\_\+pointer\+\_\+array\+\_\+remove\+\_\+all}!opal\+\_\+pointer\+\_\+array.\+h@{opal\+\_\+pointer\+\_\+array.\+h}}
\subsubsection[{opal\+\_\+pointer\+\_\+array\+\_\+remove\+\_\+all}]{\setlength{\rightskip}{0pt plus 5cm}static void opal\+\_\+pointer\+\_\+array\+\_\+remove\+\_\+all (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+pointer\+\_\+array\+\_\+t} $\ast$}]{array}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{opal__pointer__array_8h_a222c9a88b607eb78ddb249efee64f0a1}


Empty the array. 


\begin{DoxyParams}{Parameters}
{\em array} & Pointer to array (I\+N) \\
\hline
\end{DoxyParams}


References opal\+\_\+pointer\+\_\+array\+\_\+t\+::addr, opal\+\_\+pointer\+\_\+array\+\_\+t\+::lock, opal\+\_\+pointer\+\_\+array\+\_\+t\+::lowest\+\_\+free, opal\+\_\+pointer\+\_\+array\+\_\+t\+::number\+\_\+free, O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+L\+O\+C\+K, O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+U\+N\+L\+O\+C\+K, and opal\+\_\+pointer\+\_\+array\+\_\+t\+::size.

\hypertarget{opal__pointer__array_8h_a765ec92af547b70dd643070d57cf4d1f}{\index{opal\+\_\+pointer\+\_\+array.\+h@{opal\+\_\+pointer\+\_\+array.\+h}!opal\+\_\+pointer\+\_\+array\+\_\+set\+\_\+item@{opal\+\_\+pointer\+\_\+array\+\_\+set\+\_\+item}}
\index{opal\+\_\+pointer\+\_\+array\+\_\+set\+\_\+item@{opal\+\_\+pointer\+\_\+array\+\_\+set\+\_\+item}!opal\+\_\+pointer\+\_\+array.\+h@{opal\+\_\+pointer\+\_\+array.\+h}}
\subsubsection[{opal\+\_\+pointer\+\_\+array\+\_\+set\+\_\+item}]{\setlength{\rightskip}{0pt plus 5cm}O\+P\+A\+L\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int opal\+\_\+pointer\+\_\+array\+\_\+set\+\_\+item (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+pointer\+\_\+array\+\_\+t} $\ast$}]{table, }
\item[{int}]{index, }
\item[{void $\ast$}]{value}
\end{DoxyParamCaption}
)}}\label{opal__pointer__array_8h_a765ec92af547b70dd643070d57cf4d1f}


Set the value of an element in array. 


\begin{DoxyParams}{Parameters}
{\em array} & Pointer to array (I\+N) \\
\hline
{\em index} & Index of element to be reset (I\+N) \\
\hline
{\em value} & New value to be set at element index (I\+N)\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Error code. (-\/1) indicates an error.
\end{DoxyReturn}
Set the value of an element in array.


\begin{DoxyParams}{Parameters}
{\em table} & Pointer to \hyperlink{structopal__pointer__array__t}{opal\+\_\+pointer\+\_\+array\+\_\+t} object (I\+N) \\
\hline
{\em ptr} & Pointer to be added to table (I\+N)\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Error code
\end{DoxyReturn}
Assumption\+: N\+U\+L\+L element is free element. 

References opal\+\_\+pointer\+\_\+array\+\_\+t\+::addr, opal\+\_\+pointer\+\_\+array\+\_\+t\+::lock, opal\+\_\+pointer\+\_\+array\+\_\+t\+::lowest\+\_\+free, opal\+\_\+pointer\+\_\+array\+\_\+t\+::number\+\_\+free, opal\+\_\+output(), O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+L\+O\+C\+K, O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+U\+N\+L\+O\+C\+K, and opal\+\_\+pointer\+\_\+array\+\_\+t\+::size.



Referenced by ompi\+\_\+errcode\+\_\+intern\+\_\+init(), ompi\+\_\+mpi\+\_\+errclass\+\_\+add(), ompi\+\_\+mpi\+\_\+errcode\+\_\+add(), opal\+\_\+dss\+\_\+close(), and orte\+\_\+sensor\+\_\+base\+\_\+select().

\hypertarget{opal__pointer__array_8h_ac309f6719524aa2d0d1b2026b07b4ba5}{\index{opal\+\_\+pointer\+\_\+array.\+h@{opal\+\_\+pointer\+\_\+array.\+h}!opal\+\_\+pointer\+\_\+array\+\_\+set\+\_\+size@{opal\+\_\+pointer\+\_\+array\+\_\+set\+\_\+size}}
\index{opal\+\_\+pointer\+\_\+array\+\_\+set\+\_\+size@{opal\+\_\+pointer\+\_\+array\+\_\+set\+\_\+size}!opal\+\_\+pointer\+\_\+array.\+h@{opal\+\_\+pointer\+\_\+array.\+h}}
\subsubsection[{opal\+\_\+pointer\+\_\+array\+\_\+set\+\_\+size}]{\setlength{\rightskip}{0pt plus 5cm}O\+P\+A\+L\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int opal\+\_\+pointer\+\_\+array\+\_\+set\+\_\+size (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+pointer\+\_\+array\+\_\+t} $\ast$}]{array, }
\item[{int}]{size}
\end{DoxyParamCaption}
)}}\label{opal__pointer__array_8h_ac309f6719524aa2d0d1b2026b07b4ba5}


Set the size of the pointer array. 


\begin{DoxyParams}{Parameters}
{\em array} & Pointer to array (I\+N)\\
\hline
{\em size} & Desired size of the array\\
\hline
\end{DoxyParams}
Simple function to set the size of the array in order to hide the member field from external users. 

References opal\+\_\+pointer\+\_\+array\+\_\+t\+::lock, O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+L\+O\+C\+K, O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+U\+N\+L\+O\+C\+K, and opal\+\_\+pointer\+\_\+array\+\_\+t\+::size.



Referenced by orte\+\_\+ras\+\_\+base\+\_\+node\+\_\+insert().

\hypertarget{opal__pointer__array_8h_a50ce784bbb0cdf4d5b061e718cf6717f}{\index{opal\+\_\+pointer\+\_\+array.\+h@{opal\+\_\+pointer\+\_\+array.\+h}!opal\+\_\+pointer\+\_\+array\+\_\+test\+\_\+and\+\_\+set\+\_\+item@{opal\+\_\+pointer\+\_\+array\+\_\+test\+\_\+and\+\_\+set\+\_\+item}}
\index{opal\+\_\+pointer\+\_\+array\+\_\+test\+\_\+and\+\_\+set\+\_\+item@{opal\+\_\+pointer\+\_\+array\+\_\+test\+\_\+and\+\_\+set\+\_\+item}!opal\+\_\+pointer\+\_\+array.\+h@{opal\+\_\+pointer\+\_\+array.\+h}}
\subsubsection[{opal\+\_\+pointer\+\_\+array\+\_\+test\+\_\+and\+\_\+set\+\_\+item}]{\setlength{\rightskip}{0pt plus 5cm}O\+P\+A\+L\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C bool opal\+\_\+pointer\+\_\+array\+\_\+test\+\_\+and\+\_\+set\+\_\+item (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+pointer\+\_\+array\+\_\+t} $\ast$}]{table, }
\item[{int}]{index, }
\item[{void $\ast$}]{value}
\end{DoxyParamCaption}
)}}\label{opal__pointer__array_8h_a50ce784bbb0cdf4d5b061e718cf6717f}


Test whether a certain element is already in use. 

If not yet in use, reserve it.


\begin{DoxyParams}{Parameters}
{\em array} & Pointer to array (I\+N) \\
\hline
{\em index} & Index of element to be tested (I\+N) \\
\hline
{\em value} & New value to be set at element index (I\+N)\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true/false True if element could be reserved False if element could not be reserved (e.\+g., in use).
\end{DoxyReturn}
In contrary to array\+\_\+set, this function does not allow to overwrite a value, unless the previous value is N\+U\+L\+L ( equiv. to free ).

If not yet in use, reserve it.


\begin{DoxyParams}{Parameters}
{\em array} & Pointer to array (I\+N) \\
\hline
{\em index} & Index of element to be tested (I\+N) \\
\hline
{\em value} & New value to be set at element index (I\+N)\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true/false True if element could be reserved False if element could not be reserved (e.\+g.\+in use).
\end{DoxyReturn}
In contrary to array\+\_\+set, this function does not allow to overwrite a value, unless the previous value is N\+U\+L\+L ( equiv. to free ). 

References opal\+\_\+pointer\+\_\+array\+\_\+t\+::addr, opal\+\_\+pointer\+\_\+array\+\_\+t\+::lock, opal\+\_\+pointer\+\_\+array\+\_\+t\+::lowest\+\_\+free, opal\+\_\+pointer\+\_\+array\+\_\+t\+::number\+\_\+free, opal\+\_\+output(), O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+L\+O\+C\+K, O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+U\+N\+L\+O\+C\+K, and opal\+\_\+pointer\+\_\+array\+\_\+t\+::size.

