\hypertarget{op__example__module__bxor_8c}{\section{ompi/mca/op/example/op\+\_\+example\+\_\+module\+\_\+bxor.c File Reference}
\label{op__example__module__bxor_8c}\index{ompi/mca/op/example/op\+\_\+example\+\_\+module\+\_\+bxor.\+c@{ompi/mca/op/example/op\+\_\+example\+\_\+module\+\_\+bxor.\+c}}
}


This is the bxor 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/example/op\+\_\+example.\+h\char`\"{}}\\*
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structmodule__bxor__t}{module\+\_\+bxor\+\_\+t}
\begin{DoxyCompactList}\small\item\em Derive a struct from the base op module struct, allowing us to cache some module-\/specific information for B\+X\+O\+R. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{op__example__module__bxor_8c_a7c29eed4093ece7628e5ee3b00a9a0b0}{static void \hyperlink{op__example__module__bxor_8c_a7c29eed4093ece7628e5ee3b00a9a0b0}{module\+\_\+bxor\+\_\+constructor} (\hyperlink{structmodule__bxor__t}{module\+\_\+bxor\+\_\+t} $\ast$m)}\label{op__example__module__bxor_8c_a7c29eed4093ece7628e5ee3b00a9a0b0}

\begin{DoxyCompactList}\small\item\em \char`\"{}\+Constructor\char`\"{} for the bxor module class \end{DoxyCompactList}\item 
\hypertarget{op__example__module__bxor_8c_a70e9292935b02ea7bcc485a9f16ca8da}{static void \hyperlink{op__example__module__bxor_8c_a70e9292935b02ea7bcc485a9f16ca8da}{module\+\_\+bxor\+\_\+destructor} (\hyperlink{structmodule__bxor__t}{module\+\_\+bxor\+\_\+t} $\ast$m)}\label{op__example__module__bxor_8c_a70e9292935b02ea7bcc485a9f16ca8da}

\begin{DoxyCompactList}\small\item\em \char`\"{}\+Destructor\char`\"{} for the bxor module class \end{DoxyCompactList}\item 
static \hyperlink{op__example__module__bxor_8c_a153782500c0b470e58473a5a52e98d4e}{O\+B\+J\+\_\+\+C\+L\+A\+S\+S\+\_\+\+I\+N\+S\+T\+A\+N\+C\+E} (\hyperlink{structmodule__bxor__t}{module\+\_\+bxor\+\_\+t}, \hyperlink{structompi__op__base__module__1__0__0__t}{ompi\+\_\+op\+\_\+base\+\_\+module\+\_\+t}, \hyperlink{op__example__module__bxor_8c_a7c29eed4093ece7628e5ee3b00a9a0b0}{module\+\_\+bxor\+\_\+constructor}, \hyperlink{op__example__module__bxor_8c_a70e9292935b02ea7bcc485a9f16ca8da}{module\+\_\+bxor\+\_\+destructor})
\begin{DoxyCompactList}\small\item\em Setup the class for the bxor module, listing\+: \end{DoxyCompactList}\item 
\hypertarget{op__example__module__bxor_8c_ab1a92c470da2fd7c07b7357d676cc747}{static void \hyperlink{op__example__module__bxor_8c_ab1a92c470da2fd7c07b7357d676cc747}{bxor\+\_\+int} (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__example__module__bxor_8c_ab1a92c470da2fd7c07b7357d676cc747}

\begin{DoxyCompactList}\small\item\em Bxor function for C int. \end{DoxyCompactList}\item 
\hypertarget{op__example__module__bxor_8c_a3efbcca2fb2b1f69c415eb9b3d3013c1}{static void \hyperlink{op__example__module__bxor_8c_a3efbcca2fb2b1f69c415eb9b3d3013c1}{bxor\+\_\+long} (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__example__module__bxor_8c_a3efbcca2fb2b1f69c415eb9b3d3013c1}

\begin{DoxyCompactList}\small\item\em Bxor function for C long. \end{DoxyCompactList}\item 
\hypertarget{op__example__module__bxor_8c_adff1151e2bd16995eff2f9f2625c0c13}{static void \hyperlink{op__example__module__bxor_8c_adff1151e2bd16995eff2f9f2625c0c13}{bxor\+\_\+integer} (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__example__module__bxor_8c_adff1151e2bd16995eff2f9f2625c0c13}

\begin{DoxyCompactList}\small\item\em Bxor function for Fortran I\+N\+T\+E\+G\+E\+R. \end{DoxyCompactList}\item 
\hyperlink{structompi__op__base__module__1__0__0__t}{ompi\+\_\+op\+\_\+base\+\_\+module\+\_\+t} $\ast$ \hyperlink{op__example__module__bxor_8c_a2a0a357b819fc2579f7064715a86c3fc}{ompi\+\_\+op\+\_\+example\+\_\+setup\+\_\+bxor} (\hyperlink{structompi__op__t}{ompi\+\_\+op\+\_\+t} $\ast$op)
\begin{DoxyCompactList}\small\item\em Setup function for M\+P\+I\+\_\+\+B\+X\+O\+R. \end{DoxyCompactList}\end{DoxyCompactItemize}


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

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

\subsection{Function Documentation}
\hypertarget{op__example__module__bxor_8c_a153782500c0b470e58473a5a52e98d4e}{\index{op\+\_\+example\+\_\+module\+\_\+bxor.\+c@{op\+\_\+example\+\_\+module\+\_\+bxor.\+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\+\_\+example\+\_\+module\+\_\+bxor.\+c@{op\+\_\+example\+\_\+module\+\_\+bxor.\+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\+\_\+bxor\+\_\+t}}]{, }
\item[{{\bf ompi\+\_\+op\+\_\+base\+\_\+module\+\_\+t}}]{, }
\item[{{\bf module\+\_\+bxor\+\_\+constructor}}]{, }
\item[{{\bf module\+\_\+bxor\+\_\+destructor}}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{op__example__module__bxor_8c_a153782500c0b470e58473a5a52e98d4e}


Setup the class for the bxor 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__example__module__bxor_8c_a2a0a357b819fc2579f7064715a86c3fc}{\index{op\+\_\+example\+\_\+module\+\_\+bxor.\+c@{op\+\_\+example\+\_\+module\+\_\+bxor.\+c}!ompi\+\_\+op\+\_\+example\+\_\+setup\+\_\+bxor@{ompi\+\_\+op\+\_\+example\+\_\+setup\+\_\+bxor}}
\index{ompi\+\_\+op\+\_\+example\+\_\+setup\+\_\+bxor@{ompi\+\_\+op\+\_\+example\+\_\+setup\+\_\+bxor}!op\+\_\+example\+\_\+module\+\_\+bxor.\+c@{op\+\_\+example\+\_\+module\+\_\+bxor.\+c}}
\subsubsection[{ompi\+\_\+op\+\_\+example\+\_\+setup\+\_\+bxor}]{\setlength{\rightskip}{0pt plus 5cm}{\bf ompi\+\_\+op\+\_\+base\+\_\+module\+\_\+t}$\ast$ ompi\+\_\+op\+\_\+example\+\_\+setup\+\_\+bxor (
\begin{DoxyParamCaption}
\item[{{\bf ompi\+\_\+op\+\_\+t} $\ast$}]{op}
\end{DoxyParamCaption}
)}}\label{op__example__module__bxor_8c_a2a0a357b819fc2579f7064715a86c3fc}


Setup function for M\+P\+I\+\_\+\+B\+X\+O\+R. 

Setup for M\+P\+I\+\_\+\+B\+X\+O\+R 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 B\+X\+O\+R 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.

This function is {\itshape not} allowed to changed the op; it can only read it to save functions/modules that were already set. The op base will analyze what was returned in the module and re-\/set values on the op if necessary. 

References bxor\+\_\+int(), bxor\+\_\+integer(), bxor\+\_\+long(), 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\+\_\+\+I\+N\+T\+E\+G\+E\+R, and ompi\+\_\+op\+\_\+base\+\_\+module\+\_\+1\+\_\+0\+\_\+0\+\_\+t\+::opm\+\_\+fns.

