\hypertarget{op__x86__module__sum_8c}{\section{ompi/mca/op/x86/op\+\_\+x86\+\_\+module\+\_\+sum.c File Reference}
\label{op__x86__module__sum_8c}\index{ompi/mca/op/x86/op\+\_\+x86\+\_\+module\+\_\+sum.\+c@{ompi/mca/op/x86/op\+\_\+x86\+\_\+module\+\_\+sum.\+c}}
}


This is the sum module source code.  


{\ttfamily \#include \char`\"{}ompi\+\_\+config.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/class/opal\+\_\+object.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/util/output.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}ompi/constants.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}ompi/op/op.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}ompi/mca/op/op.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}ompi/mca/op/base/base.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}ompi/mca/op/x86/op\+\_\+x86.\+h\char`\"{}}\\*
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structmodule__sum__t}{module\+\_\+sum\+\_\+t}
\begin{DoxyCompactList}\small\item\em S\+U\+M module struct, including local cached info. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{op__x86__module__sum_8c_a48ccccb3180182008a1b61a606b4bdd1}{static void \hyperlink{op__x86__module__sum_8c_a48ccccb3180182008a1b61a606b4bdd1}{module\+\_\+sum\+\_\+constructor} (\hyperlink{structmodule__sum__t}{module\+\_\+sum\+\_\+t} $\ast$m)}\label{op__x86__module__sum_8c_a48ccccb3180182008a1b61a606b4bdd1}

\begin{DoxyCompactList}\small\item\em Sum module constructor. \end{DoxyCompactList}\item 
\hypertarget{op__x86__module__sum_8c_a358ab782f640a22c26d1cd8c55622e03}{static void \hyperlink{op__x86__module__sum_8c_a358ab782f640a22c26d1cd8c55622e03}{module\+\_\+sum\+\_\+destructor} (\hyperlink{structmodule__sum__t}{module\+\_\+sum\+\_\+t} $\ast$m)}\label{op__x86__module__sum_8c_a358ab782f640a22c26d1cd8c55622e03}

\begin{DoxyCompactList}\small\item\em Sum module destructor. \end{DoxyCompactList}\item 
static \hyperlink{op__x86__module__sum_8c_afbfce8d8c960d3f81fc6d5136c7c8295}{O\+B\+J\+\_\+\+C\+L\+A\+S\+S\+\_\+\+I\+N\+S\+T\+A\+N\+C\+E} (\hyperlink{structmodule__sum__t}{module\+\_\+sum\+\_\+t}, \hyperlink{structompi__op__base__module__1__0__0__t}{ompi\+\_\+op\+\_\+base\+\_\+module\+\_\+t}, \hyperlink{op__x86__module__sum_8c_a48ccccb3180182008a1b61a606b4bdd1}{module\+\_\+sum\+\_\+constructor}, \hyperlink{op__x86__module__sum_8c_a358ab782f640a22c26d1cd8c55622e03}{module\+\_\+sum\+\_\+destructor})
\begin{DoxyCompactList}\small\item\em Setup the class for the sum module, listing\+: \end{DoxyCompactList}\item 
\hypertarget{op__x86__module__sum_8c_aba1c88231cbdee53623481aaba07dd57}{static void \hyperlink{op__x86__module__sum_8c_aba1c88231cbdee53623481aaba07dd57}{sum\+\_\+float} (void $\ast$in, void $\ast$out, int $\ast$count, \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$$\ast$type, \hyperlink{structompi__op__base__module__1__0__0__t}{ompi\+\_\+op\+\_\+base\+\_\+module\+\_\+t} $\ast$module)}\label{op__x86__module__sum_8c_aba1c88231cbdee53623481aaba07dd57}

\begin{DoxyCompactList}\small\item\em Sum function for C float. \end{DoxyCompactList}\item 
\hypertarget{op__x86__module__sum_8c_a848f1d85a11a90d1d437146a8aa6cb15}{static void \hyperlink{op__x86__module__sum_8c_a848f1d85a11a90d1d437146a8aa6cb15}{sum\+\_\+int16\+\_\+t} (void $\ast$in, void $\ast$out, int $\ast$count, \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$$\ast$type, \hyperlink{structompi__op__base__module__1__0__0__t}{ompi\+\_\+op\+\_\+base\+\_\+module\+\_\+t} $\ast$module)}\label{op__x86__module__sum_8c_a848f1d85a11a90d1d437146a8aa6cb15}

\begin{DoxyCompactList}\small\item\em Sum function for C int16\+\_\+t. \end{DoxyCompactList}\item 
\hypertarget{op__x86__module__sum_8c_ad3e1c2adb021fff3f54f80c31b6e484b}{static void \hyperlink{op__x86__module__sum_8c_ad3e1c2adb021fff3f54f80c31b6e484b}{sum\+\_\+int32\+\_\+t} (void $\ast$in, void $\ast$out, int $\ast$count, \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$$\ast$type, \hyperlink{structompi__op__base__module__1__0__0__t}{ompi\+\_\+op\+\_\+base\+\_\+module\+\_\+t} $\ast$module)}\label{op__x86__module__sum_8c_ad3e1c2adb021fff3f54f80c31b6e484b}

\begin{DoxyCompactList}\small\item\em Sum function for C int32\+\_\+t. \end{DoxyCompactList}\item 
\hypertarget{op__x86__module__sum_8c_ac023da6dea6224a4a1af9e2f69c38bf6}{static void \hyperlink{op__x86__module__sum_8c_ac023da6dea6224a4a1af9e2f69c38bf6}{sum\+\_\+int64\+\_\+t} (void $\ast$in, void $\ast$out, int $\ast$count, \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$$\ast$type, \hyperlink{structompi__op__base__module__1__0__0__t}{ompi\+\_\+op\+\_\+base\+\_\+module\+\_\+t} $\ast$module)}\label{op__x86__module__sum_8c_ac023da6dea6224a4a1af9e2f69c38bf6}

\begin{DoxyCompactList}\small\item\em Sum function for C int64\+\_\+t. \end{DoxyCompactList}\item 
\hyperlink{structompi__op__base__module__1__0__0__t}{ompi\+\_\+op\+\_\+base\+\_\+module\+\_\+t} $\ast$ \hyperlink{op__x86__module__sum_8c_a473ba87279de21845aa9677757441ffc}{ompi\+\_\+op\+\_\+x86\+\_\+setup\+\_\+sum} (\hyperlink{structompi__op__t}{ompi\+\_\+op\+\_\+t} $\ast$op)
\begin{DoxyCompactList}\small\item\em Setup function for M\+P\+I\+\_\+\+S\+U\+M. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
This is the sum module source code. 

It contains the \char`\"{}setup\char`\"{} functions that will create a module for the M\+P\+I\+\_\+\+S\+U\+M M\+P\+I\+\_\+\+Op. 

\subsection{Function Documentation}
\hypertarget{op__x86__module__sum_8c_afbfce8d8c960d3f81fc6d5136c7c8295}{\index{op\+\_\+x86\+\_\+module\+\_\+sum.\+c@{op\+\_\+x86\+\_\+module\+\_\+sum.\+c}!O\+B\+J\+\_\+\+C\+L\+A\+S\+S\+\_\+\+I\+N\+S\+T\+A\+N\+C\+E@{O\+B\+J\+\_\+\+C\+L\+A\+S\+S\+\_\+\+I\+N\+S\+T\+A\+N\+C\+E}}
\index{O\+B\+J\+\_\+\+C\+L\+A\+S\+S\+\_\+\+I\+N\+S\+T\+A\+N\+C\+E@{O\+B\+J\+\_\+\+C\+L\+A\+S\+S\+\_\+\+I\+N\+S\+T\+A\+N\+C\+E}!op\+\_\+x86\+\_\+module\+\_\+sum.\+c@{op\+\_\+x86\+\_\+module\+\_\+sum.\+c}}
\subsubsection[{O\+B\+J\+\_\+\+C\+L\+A\+S\+S\+\_\+\+I\+N\+S\+T\+A\+N\+C\+E}]{\setlength{\rightskip}{0pt plus 5cm}static O\+B\+J\+\_\+\+C\+L\+A\+S\+S\+\_\+\+I\+N\+S\+T\+A\+N\+C\+E (
\begin{DoxyParamCaption}
\item[{{\bf module\+\_\+sum\+\_\+t}}]{, }
\item[{{\bf ompi\+\_\+op\+\_\+base\+\_\+module\+\_\+t}}]{, }
\item[{{\bf module\+\_\+sum\+\_\+constructor}}]{, }
\item[{{\bf module\+\_\+sum\+\_\+destructor}}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{op__x86__module__sum_8c_afbfce8d8c960d3f81fc6d5136c7c8295}


Setup the class for the sum module, listing\+: 


\begin{DoxyItemize}
\item the name of the class
\item the \char`\"{}parent\char`\"{} of the class
\item function pointer for the constructor (or N\+U\+L\+L)
\item function pointer for the destructor (or N\+U\+L\+L) 
\end{DoxyItemize}\hypertarget{op__x86__module__sum_8c_a473ba87279de21845aa9677757441ffc}{\index{op\+\_\+x86\+\_\+module\+\_\+sum.\+c@{op\+\_\+x86\+\_\+module\+\_\+sum.\+c}!ompi\+\_\+op\+\_\+x86\+\_\+setup\+\_\+sum@{ompi\+\_\+op\+\_\+x86\+\_\+setup\+\_\+sum}}
\index{ompi\+\_\+op\+\_\+x86\+\_\+setup\+\_\+sum@{ompi\+\_\+op\+\_\+x86\+\_\+setup\+\_\+sum}!op\+\_\+x86\+\_\+module\+\_\+sum.\+c@{op\+\_\+x86\+\_\+module\+\_\+sum.\+c}}
\subsubsection[{ompi\+\_\+op\+\_\+x86\+\_\+setup\+\_\+sum}]{\setlength{\rightskip}{0pt plus 5cm}{\bf ompi\+\_\+op\+\_\+base\+\_\+module\+\_\+t}$\ast$ ompi\+\_\+op\+\_\+x86\+\_\+setup\+\_\+sum (
\begin{DoxyParamCaption}
\item[{{\bf ompi\+\_\+op\+\_\+t} $\ast$}]{op}
\end{DoxyParamCaption}
)}}\label{op__x86__module__sum_8c_a473ba87279de21845aa9677757441ffc}


Setup function for M\+P\+I\+\_\+\+S\+U\+M. 

Setup for M\+P\+I\+\_\+\+M\+A\+X and return a module.

If we get here, we can assume that a) the hardware is present, b) the M\+P\+I thread scenario is what we want, and c) the S\+U\+M operation is supported. So this function's job is to create a module and fill in function pointers for the functions that this hardware supports. 

References ompi\+\_\+op\+\_\+t\+::intrinsic, ompi\+\_\+op\+\_\+t\+::o\+\_\+func, O\+B\+J\+\_\+\+R\+E\+T\+A\+I\+N, O\+M\+P\+I\+\_\+\+O\+P\+\_\+\+B\+A\+S\+E\+\_\+\+T\+Y\+P\+E\+\_\+\+F\+L\+O\+A\+T, O\+M\+P\+I\+\_\+\+O\+P\+\_\+\+B\+A\+S\+E\+\_\+\+T\+Y\+P\+E\+\_\+\+I\+N\+T16\+\_\+\+T, O\+M\+P\+I\+\_\+\+O\+P\+\_\+\+B\+A\+S\+E\+\_\+\+T\+Y\+P\+E\+\_\+\+I\+N\+T32\+\_\+\+T, O\+M\+P\+I\+\_\+\+O\+P\+\_\+\+B\+A\+S\+E\+\_\+\+T\+Y\+P\+E\+\_\+\+I\+N\+T64\+\_\+\+T, ompi\+\_\+op\+\_\+base\+\_\+module\+\_\+1\+\_\+0\+\_\+0\+\_\+t\+::opm\+\_\+fns, sum\+\_\+float(), sum\+\_\+int16\+\_\+t(), sum\+\_\+int32\+\_\+t(), and sum\+\_\+int64\+\_\+t().

