\hypertarget{attribute_8h}{\section{ompi/attribute/attribute.h File Reference}
\label{attribute_8h}\index{ompi/attribute/attribute.\+h@{ompi/attribute/attribute.\+h}}
}


Implementation for taking care of the attribute that can hang off a comm, win or datatype.  


{\ttfamily \#include $<$string.\+h$>$}\\*
{\ttfamily \#include \char`\"{}mpi.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}ompi\+\_\+config.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}ompi/constants.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/class/opal\+\_\+object.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/class/opal\+\_\+hash\+\_\+table.\+h\char`\"{}}\\*
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
union \hyperlink{unionompi__attribute__fn__ptr__union__t}{ompi\+\_\+attribute\+\_\+fn\+\_\+ptr\+\_\+union\+\_\+t}
\item 
union \hyperlink{unionompi__attribute__fortran__ptr__t}{ompi\+\_\+attribute\+\_\+fortran\+\_\+ptr\+\_\+t}
\begin{DoxyCompactList}\small\item\em Union to help convert between Fortran attributes (which must be stored by value) and C pointers (which is the back-\/end storage of all attributes). \end{DoxyCompactList}\item 
struct \hyperlink{structompi__attribute__keyval__t}{ompi\+\_\+attribute\+\_\+keyval\+\_\+t}
\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\hypertarget{attribute_8h_a1b310774ed354224e6c107937712adb3}{\#define {\bfseries A\+T\+T\+R\+\_\+\+H\+A\+S\+H\+\_\+\+S\+I\+Z\+E}~10}\label{attribute_8h_a1b310774ed354224e6c107937712adb3}

\item 
\hypertarget{attribute_8h_a861d167e0e1cea435299f7f084dde0ca}{\#define {\bfseries O\+M\+P\+I\+\_\+\+K\+E\+Y\+V\+A\+L\+\_\+\+P\+R\+E\+D\+E\+F\+I\+N\+E\+D}~0x0001}\label{attribute_8h_a861d167e0e1cea435299f7f084dde0ca}

\item 
\hypertarget{attribute_8h_afb227839cf281b486cc00f2b2c3c2865}{\#define {\bfseries O\+M\+P\+I\+\_\+\+K\+E\+Y\+V\+A\+L\+\_\+\+F77}~0x0002}\label{attribute_8h_afb227839cf281b486cc00f2b2c3c2865}

\item 
\hypertarget{attribute_8h_a601539a305aa68ff1cf71626d63c1dbd}{\#define {\bfseries O\+M\+P\+I\+\_\+\+K\+E\+Y\+V\+A\+L\+\_\+\+F77\+\_\+\+M\+P\+I1}~0x0004}\label{attribute_8h_a601539a305aa68ff1cf71626d63c1dbd}

\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\hypertarget{attribute_8h_a87190606a4b9c6da9b6c3a9cefadbcbf}{typedef enum \hyperlink{attribute_8h_a8b9b36acf517ee908e6c95232ee4b7fd}{ompi\+\_\+attribute\+\_\+type\+\_\+t} {\bfseries ompi\+\_\+attribute\+\_\+type\+\_\+t}}\label{attribute_8h_a87190606a4b9c6da9b6c3a9cefadbcbf}

\item 
\hypertarget{attribute_8h_a9dd1e6e0f863657629708851d5482b31}{typedef void( {\bfseries ompi\+\_\+mpi1\+\_\+fortran\+\_\+copy\+\_\+attr\+\_\+function} )(M\+P\+I\+\_\+\+Fint $\ast$oldobj, M\+P\+I\+\_\+\+Fint $\ast$keyval, M\+P\+I\+\_\+\+Fint $\ast$extra\+\_\+state, M\+P\+I\+\_\+\+Fint $\ast$attr\+\_\+in, M\+P\+I\+\_\+\+Fint $\ast$attr\+\_\+out, ompi\+\_\+fortran\+\_\+logical\+\_\+t $\ast$flag, M\+P\+I\+\_\+\+Fint $\ast$ierr)}\label{attribute_8h_a9dd1e6e0f863657629708851d5482b31}

\item 
\hypertarget{attribute_8h_a92d36feda133a44a3e2065a281accb49}{typedef void( {\bfseries ompi\+\_\+mpi1\+\_\+fortran\+\_\+delete\+\_\+attr\+\_\+function} )(M\+P\+I\+\_\+\+Fint $\ast$obj, M\+P\+I\+\_\+\+Fint $\ast$keyval, M\+P\+I\+\_\+\+Fint $\ast$attr\+\_\+in, M\+P\+I\+\_\+\+Fint $\ast$extra\+\_\+state, M\+P\+I\+\_\+\+Fint $\ast$ierr)}\label{attribute_8h_a92d36feda133a44a3e2065a281accb49}

\item 
\hypertarget{attribute_8h_a2238ba3a6583028a975fb9b4d72df722}{typedef void( {\bfseries ompi\+\_\+mpi2\+\_\+fortran\+\_\+copy\+\_\+attr\+\_\+function} )(M\+P\+I\+\_\+\+Fint $\ast$oldobj, M\+P\+I\+\_\+\+Fint $\ast$keyval, void $\ast$extra\+\_\+state, void $\ast$attr\+\_\+in, void $\ast$attr\+\_\+out, ompi\+\_\+fortran\+\_\+logical\+\_\+t $\ast$flag, M\+P\+I\+\_\+\+Fint $\ast$ierr)}\label{attribute_8h_a2238ba3a6583028a975fb9b4d72df722}

\item 
\hypertarget{attribute_8h_ace25f71e6bb3f133484913a3890d3c0f}{typedef void( {\bfseries ompi\+\_\+mpi2\+\_\+fortran\+\_\+delete\+\_\+attr\+\_\+function} )(M\+P\+I\+\_\+\+Fint $\ast$obj, M\+P\+I\+\_\+\+Fint $\ast$keyval, void $\ast$attr\+\_\+in, void $\ast$extra\+\_\+state, M\+P\+I\+\_\+\+Fint $\ast$ierr)}\label{attribute_8h_ace25f71e6bb3f133484913a3890d3c0f}

\item 
\hypertarget{attribute_8h_afe64f108cdc18527ac3e611826c91205}{typedef int( {\bfseries M\+P\+I\+\_\+\+Comm\+\_\+internal\+\_\+copy\+\_\+attr\+\_\+function} )(\hyperlink{structompi__communicator__t}{M\+P\+I\+\_\+\+Comm}, int, void $\ast$, void $\ast$, void $\ast$, int $\ast$, \hyperlink{structompi__communicator__t}{M\+P\+I\+\_\+\+Comm})}\label{attribute_8h_afe64f108cdc18527ac3e611826c91205}

\item 
\hypertarget{attribute_8h_ab3c849dc4329e57328df50a02052e532}{typedef int( {\bfseries M\+P\+I\+\_\+\+Type\+\_\+internal\+\_\+copy\+\_\+attr\+\_\+function} )(\hyperlink{structompi__datatype__t}{M\+P\+I\+\_\+\+Datatype}, int, void $\ast$, void $\ast$, void $\ast$, int $\ast$, \hyperlink{structompi__datatype__t}{M\+P\+I\+\_\+\+Datatype})}\label{attribute_8h_ab3c849dc4329e57328df50a02052e532}

\item 
\hypertarget{attribute_8h_aedc847c1ed0e5e1599a44f7d4d75b324}{typedef int( {\bfseries M\+P\+I\+\_\+\+Win\+\_\+internal\+\_\+copy\+\_\+attr\+\_\+function} )(\hyperlink{structompi__win__t}{M\+P\+I\+\_\+\+Win}, int, void $\ast$, void $\ast$, void $\ast$, int $\ast$, \hyperlink{structompi__win__t}{M\+P\+I\+\_\+\+Win})}\label{attribute_8h_aedc847c1ed0e5e1599a44f7d4d75b324}

\item 
\hypertarget{attribute_8h_aa717510f303739e3c502eb4981dbd425}{typedef void( {\bfseries ompi\+\_\+attribute\+\_\+keyval\+\_\+destructor\+\_\+fn\+\_\+t} )(int)}\label{attribute_8h_aa717510f303739e3c502eb4981dbd425}

\item 
\hypertarget{attribute_8h_a3a569fd8d457e81c7f61436a659efbf5}{typedef union \\*
\hyperlink{unionompi__attribute__fn__ptr__union__t}{ompi\+\_\+attribute\+\_\+fn\+\_\+ptr\+\_\+union\+\_\+t} {\bfseries ompi\+\_\+attribute\+\_\+fn\+\_\+ptr\+\_\+union\+\_\+t}}\label{attribute_8h_a3a569fd8d457e81c7f61436a659efbf5}

\item 
\hypertarget{attribute_8h_a3009a85108e454ab75f89d06db1dc15a}{typedef union \\*
\hyperlink{unionompi__attribute__fortran__ptr__t}{ompi\+\_\+attribute\+\_\+fortran\+\_\+ptr\+\_\+t} \hyperlink{attribute_8h_a3009a85108e454ab75f89d06db1dc15a}{ompi\+\_\+attribute\+\_\+fortran\+\_\+ptr\+\_\+t}}\label{attribute_8h_a3009a85108e454ab75f89d06db1dc15a}

\begin{DoxyCompactList}\small\item\em Convenience typedef. \end{DoxyCompactList}\item 
\hypertarget{attribute_8h_ac4bff919edbc31681a2eedd5e33e6b83}{typedef struct \\*
\hyperlink{structompi__attribute__keyval__t}{ompi\+\_\+attribute\+\_\+keyval\+\_\+t} {\bfseries ompi\+\_\+attribute\+\_\+keyval\+\_\+t}}\label{attribute_8h_ac4bff919edbc31681a2eedd5e33e6b83}

\end{DoxyCompactItemize}
\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \hyperlink{attribute_8h_a8b9b36acf517ee908e6c95232ee4b7fd}{ompi\+\_\+attribute\+\_\+type\+\_\+t} \{ \hyperlink{attribute_8h_a8b9b36acf517ee908e6c95232ee4b7fda27b50b59c4c4b164959ba564ada0c94a}{U\+N\+U\+S\+E\+D\+\_\+\+A\+T\+T\+R} = 0, 
\hyperlink{attribute_8h_a8b9b36acf517ee908e6c95232ee4b7fda33254fd530838e769e557ac8fcb3b28c}{C\+O\+M\+M\+\_\+\+A\+T\+T\+R}, 
\hyperlink{attribute_8h_a8b9b36acf517ee908e6c95232ee4b7fda77f4cf4a16057c37984ed04a43962da5}{T\+Y\+P\+E\+\_\+\+A\+T\+T\+R}, 
\hyperlink{attribute_8h_a8b9b36acf517ee908e6c95232ee4b7fda05fbfc559b3da704d86b35b3a7e474e0}{W\+I\+N\+\_\+\+A\+T\+T\+R}
 \}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{attribute_8h_ac900eecffe62f5333b29b582394c464b}{static int \hyperlink{attribute_8h_ac900eecffe62f5333b29b582394c464b}{ompi\+\_\+attr\+\_\+hash\+\_\+init} (\hyperlink{structopal__hash__table__t}{opal\+\_\+hash\+\_\+table\+\_\+t} $\ast$$\ast$hash)}\label{attribute_8h_ac900eecffe62f5333b29b582394c464b}

\begin{DoxyCompactList}\small\item\em Convenient way to initialize the attribute hash table per M\+P\+I-\/\+Object. \end{DoxyCompactList}\item 
int \hyperlink{attribute_8h_a9af9a68c2b8a68390caa36a39b91354b}{ompi\+\_\+attr\+\_\+init} (void)
\begin{DoxyCompactList}\small\item\em Initialize the main attribute hash that stores the keyvals and meta data. \end{DoxyCompactList}\item 
\hypertarget{attribute_8h_ad12ed051215ac3226c2137c4675e5b2d}{int \hyperlink{attribute_8h_ad12ed051215ac3226c2137c4675e5b2d}{ompi\+\_\+attr\+\_\+finalize} (void)}\label{attribute_8h_ad12ed051215ac3226c2137c4675e5b2d}

\begin{DoxyCompactList}\small\item\em Destroy the main attribute hash that stores the keyvals and meta data. \end{DoxyCompactList}\item 
O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int \hyperlink{attribute_8h_a2e4c88995df496868559bc78ba95dcb8}{ompi\+\_\+attr\+\_\+create\+\_\+keyval} (\hyperlink{attribute_8h_a8b9b36acf517ee908e6c95232ee4b7fd}{ompi\+\_\+attribute\+\_\+type\+\_\+t} type, \hyperlink{unionompi__attribute__fn__ptr__union__t}{ompi\+\_\+attribute\+\_\+fn\+\_\+ptr\+\_\+union\+\_\+t} copy\+\_\+attr\+\_\+fn, \hyperlink{unionompi__attribute__fn__ptr__union__t}{ompi\+\_\+attribute\+\_\+fn\+\_\+ptr\+\_\+union\+\_\+t} delete\+\_\+attr\+\_\+fn, int $\ast$key, void $\ast$extra\+\_\+state, int flags, void $\ast$bindings\+\_\+extra\+\_\+state)
\begin{DoxyCompactList}\small\item\em Create a new key for use by attribute of Comm/\+Win/\+Datatype. \end{DoxyCompactList}\item 
\hypertarget{attribute_8h_af5755a674d66041df2e5818af54a9201}{O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int \hyperlink{attribute_8h_af5755a674d66041df2e5818af54a9201}{ompi\+\_\+attr\+\_\+create\+\_\+keyval\+\_\+fint} (\hyperlink{attribute_8h_a8b9b36acf517ee908e6c95232ee4b7fd}{ompi\+\_\+attribute\+\_\+type\+\_\+t} type, \hyperlink{unionompi__attribute__fn__ptr__union__t}{ompi\+\_\+attribute\+\_\+fn\+\_\+ptr\+\_\+union\+\_\+t} copy\+\_\+attr\+\_\+fn, \hyperlink{unionompi__attribute__fn__ptr__union__t}{ompi\+\_\+attribute\+\_\+fn\+\_\+ptr\+\_\+union\+\_\+t} delete\+\_\+attr\+\_\+fn, int $\ast$key, M\+P\+I\+\_\+\+Fint extra\+\_\+state, int flags, void $\ast$bindings\+\_\+extra\+\_\+state)}\label{attribute_8h_af5755a674d66041df2e5818af54a9201}

\begin{DoxyCompactList}\small\item\em Same as ompi\+\_\+attr\+\_\+create\+\_\+keyval, but extra\+\_\+state is a Fortran default integer. \end{DoxyCompactList}\item 
\hypertarget{attribute_8h_a2bb7c3f83d5c0ceebefbe1c78c2917fa}{O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int \hyperlink{attribute_8h_a2bb7c3f83d5c0ceebefbe1c78c2917fa}{ompi\+\_\+attr\+\_\+create\+\_\+keyval\+\_\+aint} (\hyperlink{attribute_8h_a8b9b36acf517ee908e6c95232ee4b7fd}{ompi\+\_\+attribute\+\_\+type\+\_\+t} type, \hyperlink{unionompi__attribute__fn__ptr__union__t}{ompi\+\_\+attribute\+\_\+fn\+\_\+ptr\+\_\+union\+\_\+t} copy\+\_\+attr\+\_\+fn, \hyperlink{unionompi__attribute__fn__ptr__union__t}{ompi\+\_\+attribute\+\_\+fn\+\_\+ptr\+\_\+union\+\_\+t} delete\+\_\+attr\+\_\+fn, int $\ast$key, M\+P\+I\+\_\+\+Aint extra\+\_\+state, int flags, void $\ast$bindings\+\_\+extra\+\_\+state)}\label{attribute_8h_a2bb7c3f83d5c0ceebefbe1c78c2917fa}

\begin{DoxyCompactList}\small\item\em Same as ompi\+\_\+attr\+\_\+create\+\_\+keyval, but extra\+\_\+state is a Fortran address integer. \end{DoxyCompactList}\item 
int \hyperlink{attribute_8h_aec63e9a7d16f157bad607be9e9d69248}{ompi\+\_\+attr\+\_\+free\+\_\+keyval} (\hyperlink{attribute_8h_a8b9b36acf517ee908e6c95232ee4b7fd}{ompi\+\_\+attribute\+\_\+type\+\_\+t} type, int $\ast$key, bool predefined)
\begin{DoxyCompactList}\small\item\em Free an attribute keyval. \end{DoxyCompactList}\item 
int \hyperlink{attribute_8h_adbbad00337bf503cd1c6cfa3b1d15506}{ompi\+\_\+attr\+\_\+set\+\_\+c} (\hyperlink{attribute_8h_a8b9b36acf517ee908e6c95232ee4b7fd}{ompi\+\_\+attribute\+\_\+type\+\_\+t} type, void $\ast$object, \hyperlink{structopal__hash__table__t}{opal\+\_\+hash\+\_\+table\+\_\+t} $\ast$$\ast$attr\+\_\+hash, int key, void $\ast$attribute, bool predefined)
\begin{DoxyCompactList}\small\item\em Set an attribute on the comm/win/datatype in a form valid for C. \end{DoxyCompactList}\item 
O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int \hyperlink{attribute_8h_a007eeee7038acb94515309c30c5012b0}{ompi\+\_\+attr\+\_\+set\+\_\+fortran\+\_\+mpi1} (\hyperlink{attribute_8h_a8b9b36acf517ee908e6c95232ee4b7fd}{ompi\+\_\+attribute\+\_\+type\+\_\+t} type, void $\ast$object, \hyperlink{structopal__hash__table__t}{opal\+\_\+hash\+\_\+table\+\_\+t} $\ast$$\ast$attr\+\_\+hash, int key, M\+P\+I\+\_\+\+Fint attribute, bool predefined)
\begin{DoxyCompactList}\small\item\em Set an attribute on the comm/win/datatype in a form valid for Fortran M\+P\+I-\/1. \end{DoxyCompactList}\item 
O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int \hyperlink{attribute_8h_ab34f09601dba96fd1aa24d1b73518a31}{ompi\+\_\+attr\+\_\+set\+\_\+fortran\+\_\+mpi2} (\hyperlink{attribute_8h_a8b9b36acf517ee908e6c95232ee4b7fd}{ompi\+\_\+attribute\+\_\+type\+\_\+t} type, void $\ast$object, \hyperlink{structopal__hash__table__t}{opal\+\_\+hash\+\_\+table\+\_\+t} $\ast$$\ast$attr\+\_\+hash, int key, M\+P\+I\+\_\+\+Aint attribute, bool predefined)
\begin{DoxyCompactList}\small\item\em Set an attribute on the comm/win/datatype in a form valid for Fortran M\+P\+I-\/2. \end{DoxyCompactList}\item 
int \hyperlink{attribute_8h_a32e79f1f06ac8f339fe76a714bcba46f}{ompi\+\_\+attr\+\_\+get\+\_\+c} (\hyperlink{structopal__hash__table__t}{opal\+\_\+hash\+\_\+table\+\_\+t} $\ast$attr\+\_\+hash, int key, void $\ast$$\ast$attribute, int $\ast$flag)
\begin{DoxyCompactList}\small\item\em Get an attribute on the comm/win/datatype in a form valid for C. \end{DoxyCompactList}\item 
O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int \hyperlink{attribute_8h_ad5e23a8ed029291551dc73d221ab091e}{ompi\+\_\+attr\+\_\+get\+\_\+fortran\+\_\+mpi1} (\hyperlink{structopal__hash__table__t}{opal\+\_\+hash\+\_\+table\+\_\+t} $\ast$attr\+\_\+hash, int key, M\+P\+I\+\_\+\+Fint $\ast$attribute, int $\ast$flag)
\begin{DoxyCompactList}\small\item\em Get an attribute on the comm/win/datatype in a form valid for Fortran M\+P\+I-\/1. \end{DoxyCompactList}\item 
O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int \hyperlink{attribute_8h_a98bd41d2f5d86561643857809bdad43e}{ompi\+\_\+attr\+\_\+get\+\_\+fortran\+\_\+mpi2} (\hyperlink{structopal__hash__table__t}{opal\+\_\+hash\+\_\+table\+\_\+t} $\ast$attr\+\_\+hash, int key, M\+P\+I\+\_\+\+Aint $\ast$attribute, int $\ast$flag)
\begin{DoxyCompactList}\small\item\em Get an attribute on the comm/win/datatype in a form valid for Fortran M\+P\+I-\/2. \end{DoxyCompactList}\item 
int \hyperlink{attribute_8h_ab1ef737fff5361c48b9ef9893b450fc6}{ompi\+\_\+attr\+\_\+delete} (\hyperlink{attribute_8h_a8b9b36acf517ee908e6c95232ee4b7fd}{ompi\+\_\+attribute\+\_\+type\+\_\+t} type, void $\ast$object, \hyperlink{structopal__hash__table__t}{opal\+\_\+hash\+\_\+table\+\_\+t} $\ast$attr\+\_\+hash, int key, bool predefined)
\begin{DoxyCompactList}\small\item\em Delete an attribute on the comm/win/datatype. \end{DoxyCompactList}\item 
int \hyperlink{attribute_8h_a7c8719be9da033f5de365c18504e5470}{ompi\+\_\+attr\+\_\+copy\+\_\+all} (\hyperlink{attribute_8h_a8b9b36acf517ee908e6c95232ee4b7fd}{ompi\+\_\+attribute\+\_\+type\+\_\+t} type, void $\ast$old\+\_\+object, void $\ast$new\+\_\+object, \hyperlink{structopal__hash__table__t}{opal\+\_\+hash\+\_\+table\+\_\+t} $\ast$oldattr\+\_\+hash, \hyperlink{structopal__hash__table__t}{opal\+\_\+hash\+\_\+table\+\_\+t} $\ast$newkeyhash)
\begin{DoxyCompactList}\small\item\em This to be used from functions like M\+P\+I\+\_\+$\ast$\+\_\+\+D\+U\+P inorder to copy all the attributes from the old Comm/\+Win/\+Dtype object to a new object. \end{DoxyCompactList}\item 
int \hyperlink{attribute_8h_a21612af8393a68f3b1872e1b52617d26}{ompi\+\_\+attr\+\_\+delete\+\_\+all} (\hyperlink{attribute_8h_a8b9b36acf517ee908e6c95232ee4b7fd}{ompi\+\_\+attribute\+\_\+type\+\_\+t} type, void $\ast$object, \hyperlink{structopal__hash__table__t}{opal\+\_\+hash\+\_\+table\+\_\+t} $\ast$attr\+\_\+hash)
\begin{DoxyCompactList}\small\item\em This to be used to delete all the attributes from the Comm/\+Win/\+Dtype object in one shot. \end{DoxyCompactList}\item 
\hypertarget{attribute_8h_a32ca8203123407d9543774b0a88c85b3}{int {\bfseries ompi\+\_\+attr\+\_\+create\+\_\+predefined} (void)}\label{attribute_8h_a32ca8203123407d9543774b0a88c85b3}

\item 
\hypertarget{attribute_8h_abb601687ffa4dd5e6ec3452987470073}{int {\bfseries ompi\+\_\+attr\+\_\+free\+\_\+predefined} (void)}\label{attribute_8h_abb601687ffa4dd5e6ec3452987470073}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Implementation for taking care of the attribute that can hang off a comm, win or datatype. 



\subsection{Enumeration Type Documentation}
\hypertarget{attribute_8h_a8b9b36acf517ee908e6c95232ee4b7fd}{\index{attribute.\+h@{attribute.\+h}!ompi\+\_\+attribute\+\_\+type\+\_\+t@{ompi\+\_\+attribute\+\_\+type\+\_\+t}}
\index{ompi\+\_\+attribute\+\_\+type\+\_\+t@{ompi\+\_\+attribute\+\_\+type\+\_\+t}!attribute.\+h@{attribute.\+h}}
\subsubsection[{ompi\+\_\+attribute\+\_\+type\+\_\+t}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf ompi\+\_\+attribute\+\_\+type\+\_\+t}}}\label{attribute_8h_a8b9b36acf517ee908e6c95232ee4b7fd}
\begin{Desc}
\item[Enumerator]\par
\begin{description}
\index{U\+N\+U\+S\+E\+D\+\_\+\+A\+T\+T\+R@{U\+N\+U\+S\+E\+D\+\_\+\+A\+T\+T\+R}!attribute.\+h@{attribute.\+h}}\index{attribute.\+h@{attribute.\+h}!U\+N\+U\+S\+E\+D\+\_\+\+A\+T\+T\+R@{U\+N\+U\+S\+E\+D\+\_\+\+A\+T\+T\+R}}\item[{\em 
\hypertarget{attribute_8h_a8b9b36acf517ee908e6c95232ee4b7fda27b50b59c4c4b164959ba564ada0c94a}{U\+N\+U\+S\+E\+D\+\_\+\+A\+T\+T\+R}\label{attribute_8h_a8b9b36acf517ee908e6c95232ee4b7fda27b50b59c4c4b164959ba564ada0c94a}
}]Make the compilers happy when we have to construct an attribute. \index{C\+O\+M\+M\+\_\+\+A\+T\+T\+R@{C\+O\+M\+M\+\_\+\+A\+T\+T\+R}!attribute.\+h@{attribute.\+h}}\index{attribute.\+h@{attribute.\+h}!C\+O\+M\+M\+\_\+\+A\+T\+T\+R@{C\+O\+M\+M\+\_\+\+A\+T\+T\+R}}\item[{\em 
\hypertarget{attribute_8h_a8b9b36acf517ee908e6c95232ee4b7fda33254fd530838e769e557ac8fcb3b28c}{C\+O\+M\+M\+\_\+\+A\+T\+T\+R}\label{attribute_8h_a8b9b36acf517ee908e6c95232ee4b7fda33254fd530838e769e557ac8fcb3b28c}
}]The attribute belongs to a comm object. Starts with 1 so that we can have it initialized to 0 using memset in the constructor \index{T\+Y\+P\+E\+\_\+\+A\+T\+T\+R@{T\+Y\+P\+E\+\_\+\+A\+T\+T\+R}!attribute.\+h@{attribute.\+h}}\index{attribute.\+h@{attribute.\+h}!T\+Y\+P\+E\+\_\+\+A\+T\+T\+R@{T\+Y\+P\+E\+\_\+\+A\+T\+T\+R}}\item[{\em 
\hypertarget{attribute_8h_a8b9b36acf517ee908e6c95232ee4b7fda77f4cf4a16057c37984ed04a43962da5}{T\+Y\+P\+E\+\_\+\+A\+T\+T\+R}\label{attribute_8h_a8b9b36acf517ee908e6c95232ee4b7fda77f4cf4a16057c37984ed04a43962da5}
}]The attribute belongs to datatype object. \index{W\+I\+N\+\_\+\+A\+T\+T\+R@{W\+I\+N\+\_\+\+A\+T\+T\+R}!attribute.\+h@{attribute.\+h}}\index{attribute.\+h@{attribute.\+h}!W\+I\+N\+\_\+\+A\+T\+T\+R@{W\+I\+N\+\_\+\+A\+T\+T\+R}}\item[{\em 
\hypertarget{attribute_8h_a8b9b36acf517ee908e6c95232ee4b7fda05fbfc559b3da704d86b35b3a7e474e0}{W\+I\+N\+\_\+\+A\+T\+T\+R}\label{attribute_8h_a8b9b36acf517ee908e6c95232ee4b7fda05fbfc559b3da704d86b35b3a7e474e0}
}]The attribute belongs to a win object. \end{description}
\end{Desc}


\subsection{Function Documentation}
\hypertarget{attribute_8h_a7c8719be9da033f5de365c18504e5470}{\index{attribute.\+h@{attribute.\+h}!ompi\+\_\+attr\+\_\+copy\+\_\+all@{ompi\+\_\+attr\+\_\+copy\+\_\+all}}
\index{ompi\+\_\+attr\+\_\+copy\+\_\+all@{ompi\+\_\+attr\+\_\+copy\+\_\+all}!attribute.\+h@{attribute.\+h}}
\subsubsection[{ompi\+\_\+attr\+\_\+copy\+\_\+all}]{\setlength{\rightskip}{0pt plus 5cm}int ompi\+\_\+attr\+\_\+copy\+\_\+all (
\begin{DoxyParamCaption}
\item[{{\bf ompi\+\_\+attribute\+\_\+type\+\_\+t}}]{type, }
\item[{void $\ast$}]{old\+\_\+object, }
\item[{void $\ast$}]{new\+\_\+object, }
\item[{{\bf opal\+\_\+hash\+\_\+table\+\_\+t} $\ast$}]{oldattr\+\_\+hash, }
\item[{{\bf opal\+\_\+hash\+\_\+table\+\_\+t} $\ast$}]{newkeyhash}
\end{DoxyParamCaption}
)}}\label{attribute_8h_a7c8719be9da033f5de365c18504e5470}


This to be used from functions like M\+P\+I\+\_\+$\ast$\+\_\+\+D\+U\+P inorder to copy all the attributes from the old Comm/\+Win/\+Dtype object to a new object. 


\begin{DoxyParams}{Parameters}
{\em type} & Type of attribute (C\+O\+M\+M/\+W\+I\+N/\+D\+T\+Y\+P\+E) (I\+N) \\
\hline
{\em old\+\_\+object} & The old C\+O\+M\+M/\+W\+I\+N/\+D\+T\+Y\+P\+E object (I\+N) \\
\hline
{\em new\+\_\+object} & The new C\+O\+M\+M/\+W\+I\+N/\+D\+T\+Y\+P\+E object (I\+N) \\
\hline
{\em attr\+\_\+hash} & The attribute hash table hanging on old object(\+I\+N) \\
\hline
{\em newattr\+\_\+hash} & The attribute hash table hanging on new object(\+I\+N) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
O\+M\+P\+I error code 
\end{DoxyReturn}


References ompi\+\_\+attribute\+\_\+keyval\+\_\+t\+::attr\+\_\+flag, C\+O\+M\+M\+\_\+\+A\+T\+T\+R, O\+B\+J\+\_\+\+R\+E\+L\+E\+A\+S\+E, opal\+\_\+hash\+\_\+table\+\_\+get\+\_\+first\+\_\+key\+\_\+uint32(), opal\+\_\+hash\+\_\+table\+\_\+get\+\_\+next\+\_\+key\+\_\+uint32(), opal\+\_\+hash\+\_\+table\+\_\+get\+\_\+value\+\_\+uint32(), 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, T\+Y\+P\+E\+\_\+\+A\+T\+T\+R, U\+N\+U\+S\+E\+D\+\_\+\+A\+T\+T\+R, and W\+I\+N\+\_\+\+A\+T\+T\+R.

\hypertarget{attribute_8h_a2e4c88995df496868559bc78ba95dcb8}{\index{attribute.\+h@{attribute.\+h}!ompi\+\_\+attr\+\_\+create\+\_\+keyval@{ompi\+\_\+attr\+\_\+create\+\_\+keyval}}
\index{ompi\+\_\+attr\+\_\+create\+\_\+keyval@{ompi\+\_\+attr\+\_\+create\+\_\+keyval}!attribute.\+h@{attribute.\+h}}
\subsubsection[{ompi\+\_\+attr\+\_\+create\+\_\+keyval}]{\setlength{\rightskip}{0pt plus 5cm}O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int ompi\+\_\+attr\+\_\+create\+\_\+keyval (
\begin{DoxyParamCaption}
\item[{{\bf ompi\+\_\+attribute\+\_\+type\+\_\+t}}]{type, }
\item[{{\bf ompi\+\_\+attribute\+\_\+fn\+\_\+ptr\+\_\+union\+\_\+t}}]{copy\+\_\+attr\+\_\+fn, }
\item[{{\bf ompi\+\_\+attribute\+\_\+fn\+\_\+ptr\+\_\+union\+\_\+t}}]{delete\+\_\+attr\+\_\+fn, }
\item[{int $\ast$}]{key, }
\item[{void $\ast$}]{extra\+\_\+state, }
\item[{int}]{flags, }
\item[{void $\ast$}]{bindings\+\_\+extra\+\_\+state}
\end{DoxyParamCaption}
)}}\label{attribute_8h_a2e4c88995df496868559bc78ba95dcb8}


Create a new key for use by attribute of Comm/\+Win/\+Datatype. 


\begin{DoxyParams}{Parameters}
{\em type} & Type of attribute (C\+O\+M\+M/\+W\+I\+N/\+D\+T\+Y\+P\+E) (I\+N) \\
\hline
{\em copy\+\_\+attr\+\_\+fn} & Union variable containing the function pointer to be used in order to copy the attribute (I\+N) \\
\hline
{\em delete\+\_\+attr\+\_\+fn} & \hyperlink{structFunction}{Function} pointer to be used for deleting the attribute (I\+N) \\
\hline
{\em key} & The newly created key is returned here (O\+U\+T) \\
\hline
{\em extra\+\_\+state} & Extra state to hang off/do some special things (I\+N) \\
\hline
{\em flags} & Flags for the key -- flags contain O\+M\+P\+I\+\_\+\+K\+E\+Y\+V\+A\+L\+\_\+\+F77, O\+M\+P\+I\+\_\+\+K\+E\+Y\+V\+A\+L\+\_\+\+P\+R\+E\+D\+E\+F\+I\+N\+E\+D \\
\hline
{\em bindings\+\_\+extra\+\_\+state} & Extra state that, if non-\/\+N\+U\+L\+L, will automatically be free()'ed by the C base when the keyval is destroyed.\\
\hline
\end{DoxyParams}
N\+O\+T\+E\+: I have taken the assumption that user cannot modify/delete any predefined keys or the attributes attached. To accomplish this, all M\+P\+I$\ast$ calls will have O\+M\+P\+I\+\_\+\+K\+E\+Y\+V\+A\+L\+\_\+\+P\+R\+E\+D\+E\+F\+I\+N\+E\+D set as 0. M\+P\+I implementors who will need to play with the predefined keys and attributes would call the ompi$\ast$ functions here and not the M\+P\+I$\ast$ functions, with O\+M\+P\+I\+\_\+\+K\+E\+Y\+V\+A\+L\+\_\+\+P\+R\+E\+D\+E\+F\+I\+N\+E\+D set to 1. E\+N\+D O\+F N\+O\+T\+E

N\+O\+T\+E\+: For the function pointers, you need to create a variable of the union type \char`\"{}ompi\+\_\+attribute\+\_\+fn\+\_\+ptr\+\_\+union\+\_\+t\char`\"{} and assign the proper field. to be passed into this function E\+N\+D O\+F N\+O\+T\+E

\begin{DoxyReturn}{Returns}
O\+M\+P\+I return code 
\end{DoxyReturn}
\hypertarget{attribute_8h_ab1ef737fff5361c48b9ef9893b450fc6}{\index{attribute.\+h@{attribute.\+h}!ompi\+\_\+attr\+\_\+delete@{ompi\+\_\+attr\+\_\+delete}}
\index{ompi\+\_\+attr\+\_\+delete@{ompi\+\_\+attr\+\_\+delete}!attribute.\+h@{attribute.\+h}}
\subsubsection[{ompi\+\_\+attr\+\_\+delete}]{\setlength{\rightskip}{0pt plus 5cm}int ompi\+\_\+attr\+\_\+delete (
\begin{DoxyParamCaption}
\item[{{\bf ompi\+\_\+attribute\+\_\+type\+\_\+t}}]{type, }
\item[{void $\ast$}]{object, }
\item[{{\bf opal\+\_\+hash\+\_\+table\+\_\+t} $\ast$}]{attr\+\_\+hash, }
\item[{int}]{key, }
\item[{bool}]{predefined}
\end{DoxyParamCaption}
)}}\label{attribute_8h_ab1ef737fff5361c48b9ef9893b450fc6}


Delete an attribute on the comm/win/datatype. 


\begin{DoxyParams}{Parameters}
{\em type} & Type of attribute (C\+O\+M\+M/\+W\+I\+N/\+D\+T\+Y\+P\+E) (I\+N) \\
\hline
{\em object} & The actual Comm/\+Win/\+Datatype object (I\+N) \\
\hline
{\em attr\+\_\+hash} & The attribute hash table hanging on the object(\+I\+N) \\
\hline
{\em key} & Key val for the attribute (I\+N) \\
\hline
{\em predefined} & Whether the key is predefined or not 0/1 (I\+N) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
O\+M\+P\+I error code 
\end{DoxyReturn}


References ompi\+\_\+attribute\+\_\+keyval\+\_\+t\+::attr\+\_\+flag, ompi\+\_\+attribute\+\_\+keyval\+\_\+t\+::attr\+\_\+type, C\+O\+M\+M\+\_\+\+A\+T\+T\+R, O\+B\+J\+\_\+\+R\+E\+L\+E\+A\+S\+E, opal\+\_\+hash\+\_\+table\+\_\+get\+\_\+value\+\_\+uint32(), opal\+\_\+hash\+\_\+table\+\_\+remove\+\_\+value\+\_\+uint32(), 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, T\+Y\+P\+E\+\_\+\+A\+T\+T\+R, and W\+I\+N\+\_\+\+A\+T\+T\+R.



Referenced by ompi\+\_\+attr\+\_\+delete\+\_\+all().

\hypertarget{attribute_8h_a21612af8393a68f3b1872e1b52617d26}{\index{attribute.\+h@{attribute.\+h}!ompi\+\_\+attr\+\_\+delete\+\_\+all@{ompi\+\_\+attr\+\_\+delete\+\_\+all}}
\index{ompi\+\_\+attr\+\_\+delete\+\_\+all@{ompi\+\_\+attr\+\_\+delete\+\_\+all}!attribute.\+h@{attribute.\+h}}
\subsubsection[{ompi\+\_\+attr\+\_\+delete\+\_\+all}]{\setlength{\rightskip}{0pt plus 5cm}int ompi\+\_\+attr\+\_\+delete\+\_\+all (
\begin{DoxyParamCaption}
\item[{{\bf ompi\+\_\+attribute\+\_\+type\+\_\+t}}]{type, }
\item[{void $\ast$}]{object, }
\item[{{\bf opal\+\_\+hash\+\_\+table\+\_\+t} $\ast$}]{attr\+\_\+hash}
\end{DoxyParamCaption}
)}}\label{attribute_8h_a21612af8393a68f3b1872e1b52617d26}


This to be used to delete all the attributes from the Comm/\+Win/\+Dtype object in one shot. 


\begin{DoxyParams}{Parameters}
{\em type} & Type of attribute (C\+O\+M\+M/\+W\+I\+N/\+D\+T\+Y\+P\+E) (I\+N) \\
\hline
{\em object} & The C\+O\+M\+M/\+W\+I\+N/\+D\+T\+Y\+P\+E object (I\+N) \\
\hline
{\em attr\+\_\+hash} & The attribute hash table hanging on the object(\+I\+N) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
O\+M\+P\+I error code 
\end{DoxyReturn}


References ompi\+\_\+attr\+\_\+delete(), opal\+\_\+hash\+\_\+table\+\_\+get\+\_\+first\+\_\+key\+\_\+uint32(), opal\+\_\+hash\+\_\+table\+\_\+get\+\_\+next\+\_\+key\+\_\+uint32(), O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+L\+O\+C\+K, and O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+U\+N\+L\+O\+C\+K.



Referenced by ompi\+\_\+mpi\+\_\+finalize().

\hypertarget{attribute_8h_aec63e9a7d16f157bad607be9e9d69248}{\index{attribute.\+h@{attribute.\+h}!ompi\+\_\+attr\+\_\+free\+\_\+keyval@{ompi\+\_\+attr\+\_\+free\+\_\+keyval}}
\index{ompi\+\_\+attr\+\_\+free\+\_\+keyval@{ompi\+\_\+attr\+\_\+free\+\_\+keyval}!attribute.\+h@{attribute.\+h}}
\subsubsection[{ompi\+\_\+attr\+\_\+free\+\_\+keyval}]{\setlength{\rightskip}{0pt plus 5cm}int ompi\+\_\+attr\+\_\+free\+\_\+keyval (
\begin{DoxyParamCaption}
\item[{{\bf ompi\+\_\+attribute\+\_\+type\+\_\+t}}]{type, }
\item[{int $\ast$}]{key, }
\item[{bool}]{predefined}
\end{DoxyParamCaption}
)}}\label{attribute_8h_aec63e9a7d16f157bad607be9e9d69248}


Free an attribute keyval. 


\begin{DoxyParams}{Parameters}
{\em type} & Type of attribute (C\+O\+M\+M/\+W\+I\+N/\+D\+T\+Y\+P\+E) (I\+N) \\
\hline
{\em key} & key, which is set to M\+P\+I\+\_\+\+K\+E\+Y\+\_\+\+I\+N\+V\+A\+L\+I\+D (I\+N/\+O\+U\+T) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
O\+M\+P\+I error code 
\end{DoxyReturn}


References ompi\+\_\+attribute\+\_\+keyval\+\_\+t\+::attr\+\_\+flag, ompi\+\_\+attribute\+\_\+keyval\+\_\+t\+::attr\+\_\+type, O\+B\+J\+\_\+\+R\+E\+L\+E\+A\+S\+E, opal\+\_\+hash\+\_\+table\+\_\+get\+\_\+value\+\_\+uint32(), O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+L\+O\+C\+K, and O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+U\+N\+L\+O\+C\+K.

\hypertarget{attribute_8h_a32e79f1f06ac8f339fe76a714bcba46f}{\index{attribute.\+h@{attribute.\+h}!ompi\+\_\+attr\+\_\+get\+\_\+c@{ompi\+\_\+attr\+\_\+get\+\_\+c}}
\index{ompi\+\_\+attr\+\_\+get\+\_\+c@{ompi\+\_\+attr\+\_\+get\+\_\+c}!attribute.\+h@{attribute.\+h}}
\subsubsection[{ompi\+\_\+attr\+\_\+get\+\_\+c}]{\setlength{\rightskip}{0pt plus 5cm}int ompi\+\_\+attr\+\_\+get\+\_\+c (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+hash\+\_\+table\+\_\+t} $\ast$}]{attr\+\_\+hash, }
\item[{int}]{key, }
\item[{void $\ast$$\ast$}]{attribute, }
\item[{int $\ast$}]{flag}
\end{DoxyParamCaption}
)}}\label{attribute_8h_a32e79f1f06ac8f339fe76a714bcba46f}


Get an attribute on the comm/win/datatype in a form valid for C. 


\begin{DoxyParams}{Parameters}
{\em attr\+\_\+hash} & The attribute hash table hanging on the object(\+I\+N) \\
\hline
{\em key} & Key val for the attribute (I\+N) \\
\hline
{\em attribute} & The actual attribute pointer (O\+U\+T) \\
\hline
{\em flag} & Flag whether an attribute is associated with the key (O\+U\+T) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
O\+M\+P\+I error code
\end{DoxyReturn}
All three of these functions (\hyperlink{attribute_8h_a32e79f1f06ac8f339fe76a714bcba46f}{ompi\+\_\+attr\+\_\+get\+\_\+c()}, \hyperlink{attribute_8h_ad5e23a8ed029291551dc73d221ab091e}{ompi\+\_\+attr\+\_\+get\+\_\+fortran\+\_\+mpi1()}, and \hyperlink{attribute_8h_a98bd41d2f5d86561643857809bdad43e}{ompi\+\_\+attr\+\_\+get\+\_\+fortran\+\_\+mpi2()}) could have been combined into one function that took some kind of (void$\ast$) and an enum to indicate which way to translate the final representation, but that just seemed to make an already complicated situation more complicated through yet another layer of indirection.

So yes, this is more code, but it's clearer and less error-\/prone (read\+: better) this way. \hypertarget{attribute_8h_ad5e23a8ed029291551dc73d221ab091e}{\index{attribute.\+h@{attribute.\+h}!ompi\+\_\+attr\+\_\+get\+\_\+fortran\+\_\+mpi1@{ompi\+\_\+attr\+\_\+get\+\_\+fortran\+\_\+mpi1}}
\index{ompi\+\_\+attr\+\_\+get\+\_\+fortran\+\_\+mpi1@{ompi\+\_\+attr\+\_\+get\+\_\+fortran\+\_\+mpi1}!attribute.\+h@{attribute.\+h}}
\subsubsection[{ompi\+\_\+attr\+\_\+get\+\_\+fortran\+\_\+mpi1}]{\setlength{\rightskip}{0pt plus 5cm}O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int ompi\+\_\+attr\+\_\+get\+\_\+fortran\+\_\+mpi1 (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+hash\+\_\+table\+\_\+t} $\ast$}]{attr\+\_\+hash, }
\item[{int}]{key, }
\item[{M\+P\+I\+\_\+\+Fint $\ast$}]{attribute, }
\item[{int $\ast$}]{flag}
\end{DoxyParamCaption}
)}}\label{attribute_8h_ad5e23a8ed029291551dc73d221ab091e}


Get an attribute on the comm/win/datatype in a form valid for Fortran M\+P\+I-\/1. 


\begin{DoxyParams}{Parameters}
{\em attr\+\_\+hash} & The attribute hash table hanging on the object(\+I\+N) \\
\hline
{\em key} & Key val for the attribute (I\+N) \\
\hline
{\em attribute} & The actual attribute pointer (O\+U\+T) \\
\hline
{\em flag} & Flag whether an attribute is associated with the key (O\+U\+T) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
O\+M\+P\+I error code
\end{DoxyReturn}
All three of these functions (\hyperlink{attribute_8h_a32e79f1f06ac8f339fe76a714bcba46f}{ompi\+\_\+attr\+\_\+get\+\_\+c()}, \hyperlink{attribute_8h_ad5e23a8ed029291551dc73d221ab091e}{ompi\+\_\+attr\+\_\+get\+\_\+fortran\+\_\+mpi1()}, and \hyperlink{attribute_8h_a98bd41d2f5d86561643857809bdad43e}{ompi\+\_\+attr\+\_\+get\+\_\+fortran\+\_\+mpi2()}) could have been combined into one function that took some kind of (void$\ast$) and an enum to indicate which way to translate the final representation, but that just seemed to make an already complicated situation more complicated through yet another layer of indirection.

So yes, this is more code, but it's clearer and less error-\/prone (read\+: better) this way. \hypertarget{attribute_8h_a98bd41d2f5d86561643857809bdad43e}{\index{attribute.\+h@{attribute.\+h}!ompi\+\_\+attr\+\_\+get\+\_\+fortran\+\_\+mpi2@{ompi\+\_\+attr\+\_\+get\+\_\+fortran\+\_\+mpi2}}
\index{ompi\+\_\+attr\+\_\+get\+\_\+fortran\+\_\+mpi2@{ompi\+\_\+attr\+\_\+get\+\_\+fortran\+\_\+mpi2}!attribute.\+h@{attribute.\+h}}
\subsubsection[{ompi\+\_\+attr\+\_\+get\+\_\+fortran\+\_\+mpi2}]{\setlength{\rightskip}{0pt plus 5cm}O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int ompi\+\_\+attr\+\_\+get\+\_\+fortran\+\_\+mpi2 (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+hash\+\_\+table\+\_\+t} $\ast$}]{attr\+\_\+hash, }
\item[{int}]{key, }
\item[{M\+P\+I\+\_\+\+Aint $\ast$}]{attribute, }
\item[{int $\ast$}]{flag}
\end{DoxyParamCaption}
)}}\label{attribute_8h_a98bd41d2f5d86561643857809bdad43e}


Get an attribute on the comm/win/datatype in a form valid for Fortran M\+P\+I-\/2. 


\begin{DoxyParams}{Parameters}
{\em attrhash} & The attribute hash table hanging on the object(\+I\+N) \\
\hline
{\em key} & Key val for the attribute (I\+N) \\
\hline
{\em attribute} & The actual attribute pointer (O\+U\+T) \\
\hline
{\em flag} & Flag whether an attribute is associated with the key (O\+U\+T) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
O\+M\+P\+I error code
\end{DoxyReturn}
All three of these functions (\hyperlink{attribute_8h_a32e79f1f06ac8f339fe76a714bcba46f}{ompi\+\_\+attr\+\_\+get\+\_\+c()}, \hyperlink{attribute_8h_ad5e23a8ed029291551dc73d221ab091e}{ompi\+\_\+attr\+\_\+get\+\_\+fortran\+\_\+mpi1()}, and \hyperlink{attribute_8h_a98bd41d2f5d86561643857809bdad43e}{ompi\+\_\+attr\+\_\+get\+\_\+fortran\+\_\+mpi2()}) could have been combined into one function that took some kind of (void$\ast$) and an enum to indicate which way to translate the final representation, but that just seemed to make an already complicated situation more complicated through yet another layer of indirection.

So yes, this is more code, but it's clearer and less error-\/prone (read\+: better) this way. \hypertarget{attribute_8h_a9af9a68c2b8a68390caa36a39b91354b}{\index{attribute.\+h@{attribute.\+h}!ompi\+\_\+attr\+\_\+init@{ompi\+\_\+attr\+\_\+init}}
\index{ompi\+\_\+attr\+\_\+init@{ompi\+\_\+attr\+\_\+init}!attribute.\+h@{attribute.\+h}}
\subsubsection[{ompi\+\_\+attr\+\_\+init}]{\setlength{\rightskip}{0pt plus 5cm}int ompi\+\_\+attr\+\_\+init (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{attribute_8h_a9af9a68c2b8a68390caa36a39b91354b}


Initialize the main attribute hash that stores the keyvals and meta data. 

\begin{DoxyReturn}{Returns}
O\+M\+P\+I return code 
\end{DoxyReturn}


References O\+B\+J\+\_\+\+C\+O\+N\+S\+T\+R\+U\+C\+T, opal\+\_\+bitmap\+\_\+init(), opal\+\_\+bitmap\+\_\+set\+\_\+max\+\_\+size(), and opal\+\_\+hash\+\_\+table\+\_\+init().



Referenced by ompi\+\_\+mpi\+\_\+init().

\hypertarget{attribute_8h_adbbad00337bf503cd1c6cfa3b1d15506}{\index{attribute.\+h@{attribute.\+h}!ompi\+\_\+attr\+\_\+set\+\_\+c@{ompi\+\_\+attr\+\_\+set\+\_\+c}}
\index{ompi\+\_\+attr\+\_\+set\+\_\+c@{ompi\+\_\+attr\+\_\+set\+\_\+c}!attribute.\+h@{attribute.\+h}}
\subsubsection[{ompi\+\_\+attr\+\_\+set\+\_\+c}]{\setlength{\rightskip}{0pt plus 5cm}int ompi\+\_\+attr\+\_\+set\+\_\+c (
\begin{DoxyParamCaption}
\item[{{\bf ompi\+\_\+attribute\+\_\+type\+\_\+t}}]{type, }
\item[{void $\ast$}]{object, }
\item[{{\bf opal\+\_\+hash\+\_\+table\+\_\+t} $\ast$$\ast$}]{attr\+\_\+hash, }
\item[{int}]{key, }
\item[{void $\ast$}]{attribute, }
\item[{bool}]{predefined}
\end{DoxyParamCaption}
)}}\label{attribute_8h_adbbad00337bf503cd1c6cfa3b1d15506}


Set an attribute on the comm/win/datatype in a form valid for C. 


\begin{DoxyParams}{Parameters}
{\em type} & Type of attribute (C\+O\+M\+M/\+W\+I\+N/\+D\+T\+Y\+P\+E) (I\+N) \\
\hline
{\em object} & The actual Comm/\+Win/\+Datatype object (I\+N) \\
\hline
{\em attr\+\_\+hash} & The attribute hash table hanging on the object(I\+N/\+O\+U\+T) \\
\hline
{\em key} & Key val for the attribute (I\+N) \\
\hline
{\em attribute} & The actual attribute pointer (I\+N) \\
\hline
{\em predefined} & Whether the key is predefined or not 0/1 (I\+N) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
O\+M\+P\+I error code
\end{DoxyReturn}
If ($\ast$attr\+\_\+hash) == N\+U\+L\+L, a new hash will be created and initialized.

All three of these functions (\hyperlink{attribute_8h_adbbad00337bf503cd1c6cfa3b1d15506}{ompi\+\_\+attr\+\_\+set\+\_\+c()}, \hyperlink{attribute_8h_a007eeee7038acb94515309c30c5012b0}{ompi\+\_\+attr\+\_\+set\+\_\+fortran\+\_\+mpi1()}, and \hyperlink{attribute_8h_ab34f09601dba96fd1aa24d1b73518a31}{ompi\+\_\+attr\+\_\+set\+\_\+fortran\+\_\+mpi2()}) could have been combined into one function that took some kind of (void$\ast$) and an enum to indicate which way to translate the final representation, but that just seemed to make an already complicated situation more complicated through yet another layer of indirection.

So yes, this is more code, but it's clearer and less error-\/prone (read\+: better) this way. \hypertarget{attribute_8h_a007eeee7038acb94515309c30c5012b0}{\index{attribute.\+h@{attribute.\+h}!ompi\+\_\+attr\+\_\+set\+\_\+fortran\+\_\+mpi1@{ompi\+\_\+attr\+\_\+set\+\_\+fortran\+\_\+mpi1}}
\index{ompi\+\_\+attr\+\_\+set\+\_\+fortran\+\_\+mpi1@{ompi\+\_\+attr\+\_\+set\+\_\+fortran\+\_\+mpi1}!attribute.\+h@{attribute.\+h}}
\subsubsection[{ompi\+\_\+attr\+\_\+set\+\_\+fortran\+\_\+mpi1}]{\setlength{\rightskip}{0pt plus 5cm}O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int ompi\+\_\+attr\+\_\+set\+\_\+fortran\+\_\+mpi1 (
\begin{DoxyParamCaption}
\item[{{\bf ompi\+\_\+attribute\+\_\+type\+\_\+t}}]{type, }
\item[{void $\ast$}]{object, }
\item[{{\bf opal\+\_\+hash\+\_\+table\+\_\+t} $\ast$$\ast$}]{attr\+\_\+hash, }
\item[{int}]{key, }
\item[{M\+P\+I\+\_\+\+Fint}]{attribute, }
\item[{bool}]{predefined}
\end{DoxyParamCaption}
)}}\label{attribute_8h_a007eeee7038acb94515309c30c5012b0}


Set an attribute on the comm/win/datatype in a form valid for Fortran M\+P\+I-\/1. 


\begin{DoxyParams}{Parameters}
{\em type} & Type of attribute (C\+O\+M\+M/\+W\+I\+N/\+D\+T\+Y\+P\+E) (I\+N) \\
\hline
{\em object} & The actual Comm/\+Win/\+Datatype object (I\+N) \\
\hline
{\em attr\+\_\+hash} & The attribute hash table hanging on the object(I\+N/\+O\+U\+T) \\
\hline
{\em key} & Key val for the attribute (I\+N) \\
\hline
{\em attribute} & The actual attribute pointer (I\+N) \\
\hline
{\em predefined} & Whether the key is predefined or not 0/1 (I\+N) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
O\+M\+P\+I error code
\end{DoxyReturn}
If ($\ast$attr\+\_\+hash) == N\+U\+L\+L, a new hash will be created and initialized.

All three of these functions (\hyperlink{attribute_8h_adbbad00337bf503cd1c6cfa3b1d15506}{ompi\+\_\+attr\+\_\+set\+\_\+c()}, \hyperlink{attribute_8h_a007eeee7038acb94515309c30c5012b0}{ompi\+\_\+attr\+\_\+set\+\_\+fortran\+\_\+mpi1()}, and \hyperlink{attribute_8h_ab34f09601dba96fd1aa24d1b73518a31}{ompi\+\_\+attr\+\_\+set\+\_\+fortran\+\_\+mpi2()}) could have been combined into one function that took some kind of (void$\ast$) and an enum to indicate which way to translate the final representation, but that just seemed to make an already complicated situation more complicated through yet another layer of indirection.

So yes, this is more code, but it's clearer and less error-\/prone (read\+: better) this way. \hypertarget{attribute_8h_ab34f09601dba96fd1aa24d1b73518a31}{\index{attribute.\+h@{attribute.\+h}!ompi\+\_\+attr\+\_\+set\+\_\+fortran\+\_\+mpi2@{ompi\+\_\+attr\+\_\+set\+\_\+fortran\+\_\+mpi2}}
\index{ompi\+\_\+attr\+\_\+set\+\_\+fortran\+\_\+mpi2@{ompi\+\_\+attr\+\_\+set\+\_\+fortran\+\_\+mpi2}!attribute.\+h@{attribute.\+h}}
\subsubsection[{ompi\+\_\+attr\+\_\+set\+\_\+fortran\+\_\+mpi2}]{\setlength{\rightskip}{0pt plus 5cm}O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int ompi\+\_\+attr\+\_\+set\+\_\+fortran\+\_\+mpi2 (
\begin{DoxyParamCaption}
\item[{{\bf ompi\+\_\+attribute\+\_\+type\+\_\+t}}]{type, }
\item[{void $\ast$}]{object, }
\item[{{\bf opal\+\_\+hash\+\_\+table\+\_\+t} $\ast$$\ast$}]{attr\+\_\+hash, }
\item[{int}]{key, }
\item[{M\+P\+I\+\_\+\+Aint}]{attribute, }
\item[{bool}]{predefined}
\end{DoxyParamCaption}
)}}\label{attribute_8h_ab34f09601dba96fd1aa24d1b73518a31}


Set an attribute on the comm/win/datatype in a form valid for Fortran M\+P\+I-\/2. 


\begin{DoxyParams}{Parameters}
{\em type} & Type of attribute (C\+O\+M\+M/\+W\+I\+N/\+D\+T\+Y\+P\+E) (I\+N) \\
\hline
{\em object} & The actual Comm/\+Win/\+Datatype object (I\+N) \\
\hline
{\em attr\+\_\+hash} & The attribute hash table hanging on the object(I\+N/\+O\+U\+T) \\
\hline
{\em key} & Key val for the attribute (I\+N) \\
\hline
{\em attribute} & The actual attribute pointer (I\+N) \\
\hline
{\em predefined} & Whether the key is predefined or not 0/1 (I\+N) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
O\+M\+P\+I error code
\end{DoxyReturn}
If ($\ast$attr\+\_\+hash) == N\+U\+L\+L, a new hash will be created and initialized.

All three of these functions (\hyperlink{attribute_8h_adbbad00337bf503cd1c6cfa3b1d15506}{ompi\+\_\+attr\+\_\+set\+\_\+c()}, \hyperlink{attribute_8h_a007eeee7038acb94515309c30c5012b0}{ompi\+\_\+attr\+\_\+set\+\_\+fortran\+\_\+mpi1()}, and \hyperlink{attribute_8h_ab34f09601dba96fd1aa24d1b73518a31}{ompi\+\_\+attr\+\_\+set\+\_\+fortran\+\_\+mpi2()}) could have been combined into one function that took some kind of (void$\ast$) and an enum to indicate which way to translate the final representation, but that just seemed to make an already complicated situation more complicated through yet another layer of indirection.

So yes, this is more code, but it's clearer and less error-\/prone (read\+: better) this way. 