\hypertarget{ompi_2mca_2op_2base_2base_8h}{\section{ompi/mca/op/base/base.h File Reference}
\label{ompi_2mca_2op_2base_2base_8h}\index{ompi/mca/op/base/base.\+h@{ompi/mca/op/base/base.\+h}}
}


This framework is for the selection and assignment of \char`\"{}op\char`\"{} modules to intrinsic M\+P\+I\+\_\+\+Op objects.  


{\ttfamily \#include \char`\"{}ompi\+\_\+config.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/class/opal\+\_\+list.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/mca/mca.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}ompi/mca/op/op.\+h\char`\"{}}\\*
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structompi__op__base__selected__module__t}{ompi\+\_\+op\+\_\+base\+\_\+selected\+\_\+module\+\_\+t}
\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\hypertarget{ompi_2mca_2op_2base_2base_8h_af688d15c9d5f3def3e74c1880265c096}{typedef B\+E\+G\+I\+N\+\_\+\+C\+\_\+\+D\+E\+C\+L\+S struct \\*
\hyperlink{structompi__op__base__selected__module__t}{ompi\+\_\+op\+\_\+base\+\_\+selected\+\_\+module\+\_\+t} {\bfseries ompi\+\_\+op\+\_\+base\+\_\+selected\+\_\+module\+\_\+t}}\label{ompi_2mca_2op_2base_2base_8h_af688d15c9d5f3def3e74c1880265c096}

\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{ompi_2mca_2op_2base_2base_8h_a764da20602ac03dbaceef4d925bfea6d}{O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int \hyperlink{ompi_2mca_2op_2base_2base_8h_a764da20602ac03dbaceef4d925bfea6d}{ompi\+\_\+op\+\_\+base\+\_\+open} (void)}\label{ompi_2mca_2op_2base_2base_8h_a764da20602ac03dbaceef4d925bfea6d}

\begin{DoxyCompactList}\small\item\em Open the op framework. \end{DoxyCompactList}\item 
\hypertarget{ompi_2mca_2op_2base_2base_8h_af909ec1c27a30050a9ad466827c02a1c}{O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int \hyperlink{ompi_2mca_2op_2base_2base_8h_af909ec1c27a30050a9ad466827c02a1c}{ompi\+\_\+op\+\_\+base\+\_\+find\+\_\+available} (bool enable\+\_\+progress\+\_\+threads, bool enable\+\_\+mpi\+\_\+threads)}\label{ompi_2mca_2op_2base_2base_8h_af909ec1c27a30050a9ad466827c02a1c}

\begin{DoxyCompactList}\small\item\em Find all available op components. \end{DoxyCompactList}\item 
int \hyperlink{ompi_2mca_2op_2base_2base_8h_a4167b1dce9c14a25e31eea44041da97b}{ompi\+\_\+op\+\_\+base\+\_\+op\+\_\+select} (struct \hyperlink{structompi__op__t}{ompi\+\_\+op\+\_\+t} $\ast$op)
\begin{DoxyCompactList}\small\item\em Select an available component for a new intrinsice M\+P\+I\+\_\+\+Op (this function is {\itshape not} used for user-\/defined M\+P\+I\+\_\+\+Ops!). \end{DoxyCompactList}\item 
O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int \hyperlink{ompi_2mca_2op_2base_2base_8h_a3d0491dcfcc8a6fa695468972708dce3}{ompi\+\_\+op\+\_\+base\+\_\+op\+\_\+unselect} (struct \hyperlink{structompi__op__t}{ompi\+\_\+op\+\_\+t} $\ast$op)
\begin{DoxyCompactList}\small\item\em Finalize all op modules on a specific (intrinsic) M\+P\+I\+\_\+\+Op. \end{DoxyCompactList}\item 
\hypertarget{ompi_2mca_2op_2base_2base_8h_a09fa44dd66dfb003eda99f3c2543270d}{O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int \hyperlink{ompi_2mca_2op_2base_2base_8h_a09fa44dd66dfb003eda99f3c2543270d}{ompi\+\_\+op\+\_\+base\+\_\+close} (void)}\label{ompi_2mca_2op_2base_2base_8h_a09fa44dd66dfb003eda99f3c2543270d}

\begin{DoxyCompactList}\small\item\em Close the op framework. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\hypertarget{ompi_2mca_2op_2base_2base_8h_ae5a75389e7b2fe395ee0f84ed098459e}{O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int \hyperlink{ompi_2mca_2op_2base_2base_8h_ae5a75389e7b2fe395ee0f84ed098459e}{ompi\+\_\+op\+\_\+base\+\_\+output}}\label{ompi_2mca_2op_2base_2base_8h_ae5a75389e7b2fe395ee0f84ed098459e}

\begin{DoxyCompactList}\small\item\em Verbose output stream for this framework. \end{DoxyCompactList}\item 
\hypertarget{ompi_2mca_2op_2base_2base_8h_ada82debb1fb6ed55b2f8fb6f72abb942}{O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C \hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t} \hyperlink{ompi_2mca_2op_2base_2base_8h_ada82debb1fb6ed55b2f8fb6f72abb942}{ompi\+\_\+op\+\_\+base\+\_\+components\+\_\+opened}}\label{ompi_2mca_2op_2base_2base_8h_ada82debb1fb6ed55b2f8fb6f72abb942}

\begin{DoxyCompactList}\small\item\em List of all opened components; created when the op framework is initialized and destroyed when we reduce the list to all available op components. \end{DoxyCompactList}\item 
\hypertarget{ompi_2mca_2op_2base_2base_8h_a98bd8fb193fd34dffa05107e3b770943}{O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C bool \hyperlink{ompi_2mca_2op_2base_2base_8h_a98bd8fb193fd34dffa05107e3b770943}{ompi\+\_\+op\+\_\+base\+\_\+components\+\_\+opened\+\_\+valid}}\label{ompi_2mca_2op_2base_2base_8h_a98bd8fb193fd34dffa05107e3b770943}

\begin{DoxyCompactList}\small\item\em Indicator as to whether the list of opened op components is valid or not. \end{DoxyCompactList}\item 
\hypertarget{ompi_2mca_2op_2base_2base_8h_ab852b5d7cc26c3593976d7abcc056bbb}{O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C \hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t} \hyperlink{ompi_2mca_2op_2base_2base_8h_ab852b5d7cc26c3593976d7abcc056bbb}{ompi\+\_\+op\+\_\+base\+\_\+components\+\_\+available}}\label{ompi_2mca_2op_2base_2base_8h_ab852b5d7cc26c3593976d7abcc056bbb}

\begin{DoxyCompactList}\small\item\em List of all available components. \end{DoxyCompactList}\item 
\hypertarget{ompi_2mca_2op_2base_2base_8h_a3f210e291480b0557d43a96ff3ecaefe}{O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C bool \hyperlink{ompi_2mca_2op_2base_2base_8h_a3f210e291480b0557d43a96ff3ecaefe}{ompi\+\_\+op\+\_\+base\+\_\+components\+\_\+available\+\_\+valid}}\label{ompi_2mca_2op_2base_2base_8h_a3f210e291480b0557d43a96ff3ecaefe}

\begin{DoxyCompactList}\small\item\em Indicator as to whether the list of available op components is valid or not. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
This framework is for the selection and assignment of \char`\"{}op\char`\"{} modules to intrinsic M\+P\+I\+\_\+\+Op objects. 

This framework is not used for user-\/defined M\+P\+I\+\_\+\+Op objects.

The main idea is to let intrinsic M\+P\+I\+\_\+\+Ops be able to utilize functions from multiple op modules, based on the (datatype, operation) tuple. Hence, it is possible for specialized hardware to be utilized for datatypes and operations that are supported. 

\subsection{Function Documentation}
\hypertarget{ompi_2mca_2op_2base_2base_8h_a4167b1dce9c14a25e31eea44041da97b}{\index{ompi/mca/op/base/base.\+h@{ompi/mca/op/base/base.\+h}!ompi\+\_\+op\+\_\+base\+\_\+op\+\_\+select@{ompi\+\_\+op\+\_\+base\+\_\+op\+\_\+select}}
\index{ompi\+\_\+op\+\_\+base\+\_\+op\+\_\+select@{ompi\+\_\+op\+\_\+base\+\_\+op\+\_\+select}!ompi/mca/op/base/base.\+h@{ompi/mca/op/base/base.\+h}}
\subsubsection[{ompi\+\_\+op\+\_\+base\+\_\+op\+\_\+select}]{\setlength{\rightskip}{0pt plus 5cm}int ompi\+\_\+op\+\_\+base\+\_\+op\+\_\+select (
\begin{DoxyParamCaption}
\item[{struct {\bf ompi\+\_\+op\+\_\+t} $\ast$}]{op}
\end{DoxyParamCaption}
)}}\label{ompi_2mca_2op_2base_2base_8h_a4167b1dce9c14a25e31eea44041da97b}


Select an available component for a new intrinsice M\+P\+I\+\_\+\+Op (this function is {\itshape not} used for user-\/defined M\+P\+I\+\_\+\+Ops!). 


\begin{DoxyParams}{Parameters}
{\em op} & M\+P\+I\+\_\+\+Op that the component will be selected for.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
O\+M\+P\+I\+\_\+\+S\+U\+C\+C\+E\+S\+S Upon success. 

O\+M\+P\+I\+\_\+\+E\+R\+R\+O\+R Upon failure.
\end{DoxyReturn}
Note that the types of the parameters have \char`\"{}struct\char`\"{} in them (e.\+g., \hyperlink{structompi__op__t}{ompi\+\_\+op\+\_\+t}\char`\"{} vs. a plain \char`\"{}\hyperlink{structompi__op__t}{ompi\+\_\+op\+\_\+t}\char`\"{}) to avoid an include file loop.
\+All similar types (e.\+g., \char`\"{}struct \hyperlink{structompi__op__t}{ompi\+\_\+op\+\_\+t} $\ast$\char`\"{}, \char`\"{}\hyperlink{structompi__op__t}{ompi\+\_\+op\+\_\+t} $\ast$\char`\"{}, and
\char`\"{}M\+P\+I\+\_\+\+Op") are all typedef'ed to be the same, so the fact that we use struct here in the prototype is ok.

This function is invoked when a new M\+P\+I\+\_\+\+Op is created and op components need to be selected for it. 

References ompi\+\_\+op\+\_\+t\+::intrinsic, ompi\+\_\+op\+\_\+t\+::o\+\_\+3buff\+\_\+intrinsic, ompi\+\_\+op\+\_\+t\+::o\+\_\+f\+\_\+to\+\_\+c\+\_\+index, ompi\+\_\+op\+\_\+t\+::o\+\_\+func, ompi\+\_\+op\+\_\+t\+::o\+\_\+name, O\+B\+J\+\_\+\+R\+E\+L\+E\+A\+S\+E, O\+B\+J\+\_\+\+R\+E\+T\+A\+I\+N, ompi\+\_\+op\+\_\+base\+\_\+components\+\_\+available, ompi\+\_\+op\+\_\+base\+\_\+output, O\+M\+P\+I\+\_\+\+O\+P\+\_\+\+B\+A\+S\+E\+\_\+\+T\+Y\+P\+E\+\_\+\+M\+A\+X, opal\+\_\+list\+\_\+remove\+\_\+first(), opal\+\_\+output\+\_\+verbose(), ompi\+\_\+op\+\_\+base\+\_\+module\+\_\+1\+\_\+0\+\_\+0\+\_\+t\+::opm\+\_\+enable, and ompi\+\_\+op\+\_\+base\+\_\+module\+\_\+1\+\_\+0\+\_\+0\+\_\+t\+::opm\+\_\+fns.

\hypertarget{ompi_2mca_2op_2base_2base_8h_a3d0491dcfcc8a6fa695468972708dce3}{\index{ompi/mca/op/base/base.\+h@{ompi/mca/op/base/base.\+h}!ompi\+\_\+op\+\_\+base\+\_\+op\+\_\+unselect@{ompi\+\_\+op\+\_\+base\+\_\+op\+\_\+unselect}}
\index{ompi\+\_\+op\+\_\+base\+\_\+op\+\_\+unselect@{ompi\+\_\+op\+\_\+base\+\_\+op\+\_\+unselect}!ompi/mca/op/base/base.\+h@{ompi/mca/op/base/base.\+h}}
\subsubsection[{ompi\+\_\+op\+\_\+base\+\_\+op\+\_\+unselect}]{\setlength{\rightskip}{0pt plus 5cm}O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int ompi\+\_\+op\+\_\+base\+\_\+op\+\_\+unselect (
\begin{DoxyParamCaption}
\item[{struct {\bf ompi\+\_\+op\+\_\+t} $\ast$}]{op}
\end{DoxyParamCaption}
)}}\label{ompi_2mca_2op_2base_2base_8h_a3d0491dcfcc8a6fa695468972708dce3}


Finalize all op modules on a specific (intrinsic) M\+P\+I\+\_\+\+Op. 


\begin{DoxyParams}{Parameters}
{\em op} & The op that is being destroyed.\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em O\+M\+P\+I\+\_\+\+S\+U\+C\+C\+E\+S\+S} & Always.\\
\hline
\end{DoxyRetVals}
Note that the type of the parameter is only a \char`\"{}struct ompi\+\_\+op\+\_\+t\char`\"{} (vs. a plain \char`\"{}ompi\+\_\+op\+\_\+t\char`\"{}) to avoid an include file loop. The types \char`\"{}struct ompi\+\_\+op\+\_\+t $\ast$\char`\"{}, \char`\"{}ompi\+\_\+op\+\_\+t $\ast$\char`\"{}, and \char`\"{}\+M\+P\+I\+\_\+\+Op\char`\"{} are all typedef'ed to be the same, so the fact that we use struct here in the prototype is ok.

This function is invoked near the beginning of the destruction of an op. It finalizes the op modules associated with the M\+P\+I\+\_\+\+Op (e.\+g., allowing the component to clean up and free any resources allocated for that M\+P\+I\+\_\+\+Op) by calling the destructor on each object. 