\hypertarget{btl__template_8h}{\section{ompi/mca/btl/template/btl\+\_\+template.h File Reference}
\label{btl__template_8h}\index{ompi/mca/btl/template/btl\+\_\+template.\+h@{ompi/mca/btl/template/btl\+\_\+template.\+h}}
}
{\ttfamily \#include \char`\"{}ompi\+\_\+config.\+h\char`\"{}}\\*
{\ttfamily \#include $<$sys/types.\+h$>$}\\*
{\ttfamily \#include $<$string.\+h$>$}\\*
{\ttfamily \#include \char`\"{}opal/mca/event/event.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}ompi/class/ompi\+\_\+free\+\_\+list.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}ompi/mca/btl/btl.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}ompi/mca/btl/base/base.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}ompi/mca/mpool/mpool.\+h\char`\"{}}\\*
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structmca__btl__template__component__t}{mca\+\_\+btl\+\_\+template\+\_\+component\+\_\+t}
\begin{DoxyCompactList}\small\item\em Infiniband (T\+E\+M\+P\+L\+A\+T\+E) B\+T\+L component. \end{DoxyCompactList}\item 
struct \hyperlink{structmca__btl__template__module__t}{mca\+\_\+btl\+\_\+template\+\_\+module\+\_\+t}
\begin{DoxyCompactList}\small\item\em B\+T\+L Module Interface. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\hypertarget{btl__template_8h_ab0f51062bc933fdc795d949bedf36218}{\#define {\bfseries M\+C\+A\+\_\+\+B\+T\+L\+\_\+\+H\+A\+S\+\_\+\+M\+P\+O\+O\+L}~1}\label{btl__template_8h_ab0f51062bc933fdc795d949bedf36218}

\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\hypertarget{btl__template_8h_a9fa012b945a6a9a7da09b6d34497cbf0}{typedef struct \\*
\hyperlink{structmca__btl__template__component__t}{mca\+\_\+btl\+\_\+template\+\_\+component\+\_\+t} {\bfseries mca\+\_\+btl\+\_\+template\+\_\+component\+\_\+t}}\label{btl__template_8h_a9fa012b945a6a9a7da09b6d34497cbf0}

\item 
\hypertarget{btl__template_8h_ada075eac946385f96532375578219791}{typedef struct \\*
\hyperlink{structmca__btl__template__module__t}{mca\+\_\+btl\+\_\+template\+\_\+module\+\_\+t} {\bfseries mca\+\_\+btl\+\_\+template\+\_\+module\+\_\+t}}\label{btl__template_8h_ada075eac946385f96532375578219791}

\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{structmca__btl__base__module__t}{mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$$\ast$ \hyperlink{btl__template_8h_a26f2d8e67e6c631a45c3ebbc6f2cedda}{mca\+\_\+btl\+\_\+template\+\_\+component\+\_\+init} (int $\ast$num\+\_\+btl\+\_\+modules, bool allow\+\_\+multi\+\_\+user\+\_\+threads, bool have\+\_\+hidden\+\_\+threads)
\begin{DoxyCompactList}\small\item\em T\+E\+M\+P\+L\+A\+T\+E component initialization. \end{DoxyCompactList}\item 
\hypertarget{btl__template_8h_a09e384b520458d7b34a7032a9e771818}{int \hyperlink{btl__template_8h_a09e384b520458d7b34a7032a9e771818}{mca\+\_\+btl\+\_\+template\+\_\+component\+\_\+progress} (void)}\label{btl__template_8h_a09e384b520458d7b34a7032a9e771818}

\begin{DoxyCompactList}\small\item\em T\+E\+M\+P\+L\+A\+T\+E component progress. \end{DoxyCompactList}\item 
int \hyperlink{btl__template_8h_a159f376a1f7cbd4149c12a57f45784b1}{mca\+\_\+btl\+\_\+template\+\_\+finalize} (struct \hyperlink{structmca__btl__base__module__t}{mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$btl)
\begin{DoxyCompactList}\small\item\em Cleanup any resources held by the B\+T\+L. \end{DoxyCompactList}\item 
int \hyperlink{btl__template_8h_af70f924955fb4ecc3d86e66584981ab1}{mca\+\_\+btl\+\_\+template\+\_\+add\+\_\+procs} (struct \hyperlink{structmca__btl__base__module__t}{mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$btl, size\+\_\+t nprocs, struct \hyperlink{structompi__proc__t}{ompi\+\_\+proc\+\_\+t} $\ast$$\ast$procs, struct \hyperlink{structmca__btl__base__endpoint__t}{mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$$\ast$peers, \hyperlink{structopal__bitmap__t}{opal\+\_\+bitmap\+\_\+t} $\ast$reachable)
\begin{DoxyCompactList}\small\item\em P\+M\+L-\/$>$B\+T\+L notification of change in the process list. \end{DoxyCompactList}\item 
int \hyperlink{btl__template_8h_a3742b94187c5b47f3b82a7a960f00943}{mca\+\_\+btl\+\_\+template\+\_\+del\+\_\+procs} (struct \hyperlink{structmca__btl__base__module__t}{mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$btl, size\+\_\+t nprocs, struct \hyperlink{structompi__proc__t}{ompi\+\_\+proc\+\_\+t} $\ast$$\ast$procs, struct \hyperlink{structmca__btl__base__endpoint__t}{mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$$\ast$peers)
\begin{DoxyCompactList}\small\item\em P\+M\+L-\/$>$B\+T\+L notification of change in the process list. \end{DoxyCompactList}\item 
int \hyperlink{btl__template_8h_a24fe6b90220e158152e432ac3a7d2760}{mca\+\_\+btl\+\_\+template\+\_\+send} (struct \hyperlink{structmca__btl__base__module__t}{mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$btl, struct \hyperlink{structmca__btl__base__endpoint__t}{mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$btl\+\_\+peer, struct \hyperlink{structmca__btl__base__descriptor__t}{mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t} $\ast$descriptor, mca\+\_\+btl\+\_\+base\+\_\+tag\+\_\+t tag)
\begin{DoxyCompactList}\small\item\em Initiate an asynchronous send. \end{DoxyCompactList}\item 
int \hyperlink{btl__template_8h_a4e4d9d813c99a92300d3d603119f06d6}{mca\+\_\+btl\+\_\+template\+\_\+put} (struct \hyperlink{structmca__btl__base__module__t}{mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$btl, struct \hyperlink{structmca__btl__base__endpoint__t}{mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$btl\+\_\+peer, struct \hyperlink{structmca__btl__base__descriptor__t}{mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t} $\ast$decriptor)
\begin{DoxyCompactList}\small\item\em Initiate an asynchronous put. \end{DoxyCompactList}\item 
int \hyperlink{btl__template_8h_a4b8e0caced93f6c9eac26683c80805dd}{mca\+\_\+btl\+\_\+template\+\_\+get} (struct \hyperlink{structmca__btl__base__module__t}{mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$btl, struct \hyperlink{structmca__btl__base__endpoint__t}{mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$btl\+\_\+peer, struct \hyperlink{structmca__btl__base__descriptor__t}{mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t} $\ast$decriptor)
\begin{DoxyCompactList}\small\item\em Initiate an asynchronous get. \end{DoxyCompactList}\item 
int \hyperlink{btl__template_8h_a51ed0dd235b99539d1703de39e79b1b3}{mca\+\_\+btl\+\_\+template\+\_\+register} (struct \hyperlink{structmca__btl__base__module__t}{mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$btl, mca\+\_\+btl\+\_\+base\+\_\+tag\+\_\+t tag, \hyperlink{btl_8h_a6b39783709e482be956466e3a5847eff}{mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+recv\+\_\+cb\+\_\+fn\+\_\+t} cbfunc, void $\ast$cbdata)
\begin{DoxyCompactList}\small\item\em Register a callback function that is called on receipt of a fragment. \end{DoxyCompactList}\item 
\hyperlink{structmca__btl__base__descriptor__t}{mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t} $\ast$ \hyperlink{btl__template_8h_a1a17f35ea3d110457983e75f0d9992d9}{mca\+\_\+btl\+\_\+template\+\_\+alloc} (struct \hyperlink{structmca__btl__base__module__t}{mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$btl, struct \hyperlink{structmca__btl__base__endpoint__t}{mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$endpoint, uint8\+\_\+t order, size\+\_\+t size, uint32\+\_\+t flags)
\begin{DoxyCompactList}\small\item\em Allocate a descriptor with a segment of the requested size. \end{DoxyCompactList}\item 
int \hyperlink{btl__template_8h_a65ffe2a01f3214d3310d0f35bcc586b9}{mca\+\_\+btl\+\_\+template\+\_\+free} (struct \hyperlink{structmca__btl__base__module__t}{mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$btl, \hyperlink{structmca__btl__base__descriptor__t}{mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t} $\ast$des)
\begin{DoxyCompactList}\small\item\em Return a segment allocated by this B\+T\+L. \end{DoxyCompactList}\item 
\hyperlink{structmca__btl__base__descriptor__t}{mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t} $\ast$ \hyperlink{btl__template_8h_a99ddf33f0de02cd61bdc99f6a081a34d}{mca\+\_\+btl\+\_\+template\+\_\+prepare\+\_\+src} (struct \hyperlink{structmca__btl__base__module__t}{mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$btl, struct \hyperlink{structmca__btl__base__endpoint__t}{mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$peer, struct \hyperlink{structmca__mpool__base__registration__t}{mca\+\_\+mpool\+\_\+base\+\_\+registration\+\_\+t} $\ast$, struct \hyperlink{structopal__convertor__t}{opal\+\_\+convertor\+\_\+t} $\ast$convertor, uint8\+\_\+t order, size\+\_\+t reserve, size\+\_\+t $\ast$size, uint32\+\_\+t flags)
\begin{DoxyCompactList}\small\item\em Prepare a descriptor for send/rdma using the supplied convertor. \end{DoxyCompactList}\item 
\hyperlink{structmca__btl__base__descriptor__t}{mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t} $\ast$ \hyperlink{btl__template_8h_a3890f6ea1b34b89fde8aee34122cb8dc}{mca\+\_\+btl\+\_\+template\+\_\+prepare\+\_\+dst} (struct \hyperlink{structmca__btl__base__module__t}{mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$btl, struct \hyperlink{structmca__btl__base__endpoint__t}{mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$peer, struct \hyperlink{structmca__mpool__base__registration__t}{mca\+\_\+mpool\+\_\+base\+\_\+registration\+\_\+t} $\ast$, struct \hyperlink{structopal__convertor__t}{opal\+\_\+convertor\+\_\+t} $\ast$convertor, uint8\+\_\+t order, size\+\_\+t reserve, size\+\_\+t $\ast$size, uint32\+\_\+t flags)
\begin{DoxyCompactList}\small\item\em Prepare a descriptor for send/rdma using the supplied convertor. \end{DoxyCompactList}\item 
int \hyperlink{btl__template_8h_aa2064e1286ed529ade3f1355b055ad02}{mca\+\_\+btl\+\_\+template\+\_\+ft\+\_\+event} (int state)
\begin{DoxyCompactList}\small\item\em Fault Tolerance Event Notification \hyperlink{structFunction}{Function}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\hypertarget{btl__template_8h_a70cb6829ec443a83208a7ad6a157d228}{O\+M\+P\+I\+\_\+\+M\+O\+D\+U\+L\+E\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C \\*
\hyperlink{structmca__btl__template__component__t}{mca\+\_\+btl\+\_\+template\+\_\+component\+\_\+t} {\bfseries mca\+\_\+btl\+\_\+template\+\_\+component}}\label{btl__template_8h_a70cb6829ec443a83208a7ad6a157d228}

\item 
\hypertarget{btl__template_8h_ada8f40e6af8428d5459a9802d5a8d987}{\hyperlink{structmca__btl__template__module__t}{mca\+\_\+btl\+\_\+template\+\_\+module\+\_\+t} {\bfseries mca\+\_\+btl\+\_\+template\+\_\+module}}\label{btl__template_8h_ada8f40e6af8428d5459a9802d5a8d987}

\end{DoxyCompactItemize}


\subsection{Function Documentation}
\hypertarget{btl__template_8h_af70f924955fb4ecc3d86e66584981ab1}{\index{btl\+\_\+template.\+h@{btl\+\_\+template.\+h}!mca\+\_\+btl\+\_\+template\+\_\+add\+\_\+procs@{mca\+\_\+btl\+\_\+template\+\_\+add\+\_\+procs}}
\index{mca\+\_\+btl\+\_\+template\+\_\+add\+\_\+procs@{mca\+\_\+btl\+\_\+template\+\_\+add\+\_\+procs}!btl\+\_\+template.\+h@{btl\+\_\+template.\+h}}
\subsubsection[{mca\+\_\+btl\+\_\+template\+\_\+add\+\_\+procs}]{\setlength{\rightskip}{0pt plus 5cm}int mca\+\_\+btl\+\_\+template\+\_\+add\+\_\+procs (
\begin{DoxyParamCaption}
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$}]{btl, }
\item[{size\+\_\+t}]{nprocs, }
\item[{struct {\bf ompi\+\_\+proc\+\_\+t} $\ast$$\ast$}]{procs, }
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$$\ast$}]{peers, }
\item[{{\bf opal\+\_\+bitmap\+\_\+t} $\ast$}]{reachable}
\end{DoxyParamCaption}
)}}\label{btl__template_8h_af70f924955fb4ecc3d86e66584981ab1}


P\+M\+L-\/$>$B\+T\+L notification of change in the process list. 


\begin{DoxyParams}{Parameters}
{\em btl} & (I\+N) \\
\hline
{\em nprocs} & (I\+N) Number of processes \\
\hline
{\em procs} & (I\+N) Set of processes \\
\hline
{\em peers} & (O\+U\+T) Set of (optional) peer addressing info. \\
\hline
{\em peers} & (I\+N/\+O\+U\+T) Set of processes that are reachable via this B\+T\+L. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
O\+M\+P\+I\+\_\+\+S\+U\+C\+C\+E\+S\+S or error status on failure. 
\end{DoxyReturn}


References mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t\+::endpoint\+\_\+btl, O\+B\+J\+\_\+\+R\+E\+L\+E\+A\+S\+E, ompi\+\_\+proc\+\_\+local(), opal\+\_\+bitmap\+\_\+set\+\_\+bit(), 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, ompi\+\_\+proc\+\_\+t\+::proc\+\_\+arch, and mca\+\_\+btl\+\_\+template\+\_\+proc\+\_\+t\+::proc\+\_\+lock.

\hypertarget{btl__template_8h_a1a17f35ea3d110457983e75f0d9992d9}{\index{btl\+\_\+template.\+h@{btl\+\_\+template.\+h}!mca\+\_\+btl\+\_\+template\+\_\+alloc@{mca\+\_\+btl\+\_\+template\+\_\+alloc}}
\index{mca\+\_\+btl\+\_\+template\+\_\+alloc@{mca\+\_\+btl\+\_\+template\+\_\+alloc}!btl\+\_\+template.\+h@{btl\+\_\+template.\+h}}
\subsubsection[{mca\+\_\+btl\+\_\+template\+\_\+alloc}]{\setlength{\rightskip}{0pt plus 5cm}{\bf mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t}$\ast$ mca\+\_\+btl\+\_\+template\+\_\+alloc (
\begin{DoxyParamCaption}
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$}]{btl, }
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$}]{endpoint, }
\item[{uint8\+\_\+t}]{order, }
\item[{size\+\_\+t}]{size, }
\item[{uint32\+\_\+t}]{flags}
\end{DoxyParamCaption}
)}}\label{btl__template_8h_a1a17f35ea3d110457983e75f0d9992d9}


Allocate a descriptor with a segment of the requested size. 

Note that the B\+T\+L layer may choose to return a smaller size if it cannot support the request.


\begin{DoxyParams}{Parameters}
{\em btl} & (I\+N) B\+T\+L module \\
\hline
{\em size} & (I\+N) \hyperlink{classRequest}{Request} segment size.\\
\hline
\end{DoxyParams}
Allocate a descriptor with a segment of the requested size.


\begin{DoxyParams}{Parameters}
{\em btl} & (I\+N) B\+T\+L module \\
\hline
{\em size} & (I\+N) \hyperlink{classRequest}{Request} segment size. \\
\hline
\end{DoxyParams}


References mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+flags, and mca\+\_\+btl\+\_\+base\+\_\+segment\+\_\+t\+::seg\+\_\+len.

\hypertarget{btl__template_8h_a26f2d8e67e6c631a45c3ebbc6f2cedda}{\index{btl\+\_\+template.\+h@{btl\+\_\+template.\+h}!mca\+\_\+btl\+\_\+template\+\_\+component\+\_\+init@{mca\+\_\+btl\+\_\+template\+\_\+component\+\_\+init}}
\index{mca\+\_\+btl\+\_\+template\+\_\+component\+\_\+init@{mca\+\_\+btl\+\_\+template\+\_\+component\+\_\+init}!btl\+\_\+template.\+h@{btl\+\_\+template.\+h}}
\subsubsection[{mca\+\_\+btl\+\_\+template\+\_\+component\+\_\+init}]{\setlength{\rightskip}{0pt plus 5cm}{\bf mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t}$\ast$$\ast$ mca\+\_\+btl\+\_\+template\+\_\+component\+\_\+init (
\begin{DoxyParamCaption}
\item[{int $\ast$}]{num\+\_\+btl\+\_\+modules, }
\item[{bool}]{allow\+\_\+multi\+\_\+user\+\_\+threads, }
\item[{bool}]{have\+\_\+hidden\+\_\+threads}
\end{DoxyParamCaption}
)}}\label{btl__template_8h_a26f2d8e67e6c631a45c3ebbc6f2cedda}


T\+E\+M\+P\+L\+A\+T\+E component initialization. 


\begin{DoxyParams}{Parameters}
{\em num\+\_\+btl\+\_\+modules} & (O\+U\+T) Number of B\+T\+Ls returned in B\+T\+L array. \\
\hline
{\em allow\+\_\+multi\+\_\+user\+\_\+threads} & (O\+U\+T) Flag indicating wether B\+T\+L supports user threads (T\+R\+U\+E) \\
\hline
{\em have\+\_\+hidden\+\_\+threads} & (O\+U\+T) Flag indicating wether B\+T\+L uses threads (T\+R\+U\+E) \\
\hline
\end{DoxyParams}
\hypertarget{btl__template_8h_a3742b94187c5b47f3b82a7a960f00943}{\index{btl\+\_\+template.\+h@{btl\+\_\+template.\+h}!mca\+\_\+btl\+\_\+template\+\_\+del\+\_\+procs@{mca\+\_\+btl\+\_\+template\+\_\+del\+\_\+procs}}
\index{mca\+\_\+btl\+\_\+template\+\_\+del\+\_\+procs@{mca\+\_\+btl\+\_\+template\+\_\+del\+\_\+procs}!btl\+\_\+template.\+h@{btl\+\_\+template.\+h}}
\subsubsection[{mca\+\_\+btl\+\_\+template\+\_\+del\+\_\+procs}]{\setlength{\rightskip}{0pt plus 5cm}int mca\+\_\+btl\+\_\+template\+\_\+del\+\_\+procs (
\begin{DoxyParamCaption}
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$}]{btl, }
\item[{size\+\_\+t}]{nprocs, }
\item[{struct {\bf ompi\+\_\+proc\+\_\+t} $\ast$$\ast$}]{procs, }
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$$\ast$}]{peers}
\end{DoxyParamCaption}
)}}\label{btl__template_8h_a3742b94187c5b47f3b82a7a960f00943}


P\+M\+L-\/$>$B\+T\+L notification of change in the process list. 


\begin{DoxyParams}{Parameters}
{\em btl} & (I\+N) B\+T\+L instance \\
\hline
{\em nproc} & (I\+N) Number of processes. \\
\hline
{\em procs} & (I\+N) Set of processes. \\
\hline
{\em peers} & (I\+N) Set of peer data structures. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{classStatus}{Status} indicating if cleanup was successful 
\end{DoxyReturn}
\hypertarget{btl__template_8h_a159f376a1f7cbd4149c12a57f45784b1}{\index{btl\+\_\+template.\+h@{btl\+\_\+template.\+h}!mca\+\_\+btl\+\_\+template\+\_\+finalize@{mca\+\_\+btl\+\_\+template\+\_\+finalize}}
\index{mca\+\_\+btl\+\_\+template\+\_\+finalize@{mca\+\_\+btl\+\_\+template\+\_\+finalize}!btl\+\_\+template.\+h@{btl\+\_\+template.\+h}}
\subsubsection[{mca\+\_\+btl\+\_\+template\+\_\+finalize}]{\setlength{\rightskip}{0pt plus 5cm}int mca\+\_\+btl\+\_\+template\+\_\+finalize (
\begin{DoxyParamCaption}
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$}]{btl}
\end{DoxyParamCaption}
)}}\label{btl__template_8h_a159f376a1f7cbd4149c12a57f45784b1}


Cleanup any resources held by the B\+T\+L. 


\begin{DoxyParams}{Parameters}
{\em btl} & B\+T\+L instance. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
O\+M\+P\+I\+\_\+\+S\+U\+C\+C\+E\+S\+S or error status on failure. 
\end{DoxyReturn}


References O\+B\+J\+\_\+\+D\+E\+S\+T\+R\+U\+C\+T.

\hypertarget{btl__template_8h_a65ffe2a01f3214d3310d0f35bcc586b9}{\index{btl\+\_\+template.\+h@{btl\+\_\+template.\+h}!mca\+\_\+btl\+\_\+template\+\_\+free@{mca\+\_\+btl\+\_\+template\+\_\+free}}
\index{mca\+\_\+btl\+\_\+template\+\_\+free@{mca\+\_\+btl\+\_\+template\+\_\+free}!btl\+\_\+template.\+h@{btl\+\_\+template.\+h}}
\subsubsection[{mca\+\_\+btl\+\_\+template\+\_\+free}]{\setlength{\rightskip}{0pt plus 5cm}int mca\+\_\+btl\+\_\+template\+\_\+free (
\begin{DoxyParamCaption}
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$}]{btl, }
\item[{{\bf mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t} $\ast$}]{des}
\end{DoxyParamCaption}
)}}\label{btl__template_8h_a65ffe2a01f3214d3310d0f35bcc586b9}


Return a segment allocated by this B\+T\+L. 


\begin{DoxyParams}{Parameters}
{\em btl} & (I\+N) B\+T\+L module \\
\hline
{\em descriptor} & (I\+N) Allocated descriptor.\\
\hline
\end{DoxyParams}
Return a segment allocated by this B\+T\+L. 

References mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t\+::btl\+\_\+eager\+\_\+limit, mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t\+::btl\+\_\+max\+\_\+send\+\_\+size, and O\+B\+J\+\_\+\+R\+E\+L\+E\+A\+S\+E.

\hypertarget{btl__template_8h_aa2064e1286ed529ade3f1355b055ad02}{\index{btl\+\_\+template.\+h@{btl\+\_\+template.\+h}!mca\+\_\+btl\+\_\+template\+\_\+ft\+\_\+event@{mca\+\_\+btl\+\_\+template\+\_\+ft\+\_\+event}}
\index{mca\+\_\+btl\+\_\+template\+\_\+ft\+\_\+event@{mca\+\_\+btl\+\_\+template\+\_\+ft\+\_\+event}!btl\+\_\+template.\+h@{btl\+\_\+template.\+h}}
\subsubsection[{mca\+\_\+btl\+\_\+template\+\_\+ft\+\_\+event}]{\setlength{\rightskip}{0pt plus 5cm}int mca\+\_\+btl\+\_\+template\+\_\+ft\+\_\+event (
\begin{DoxyParamCaption}
\item[{int}]{state}
\end{DoxyParamCaption}
)}}\label{btl__template_8h_aa2064e1286ed529ade3f1355b055ad02}


Fault Tolerance Event Notification \hyperlink{structFunction}{Function}. 


\begin{DoxyParams}{Parameters}
{\em state} & Checkpoint Stae \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
O\+M\+P\+I\+\_\+\+S\+U\+C\+C\+E\+S\+S or failure status 
\end{DoxyReturn}
\hypertarget{btl__template_8h_a4b8e0caced93f6c9eac26683c80805dd}{\index{btl\+\_\+template.\+h@{btl\+\_\+template.\+h}!mca\+\_\+btl\+\_\+template\+\_\+get@{mca\+\_\+btl\+\_\+template\+\_\+get}}
\index{mca\+\_\+btl\+\_\+template\+\_\+get@{mca\+\_\+btl\+\_\+template\+\_\+get}!btl\+\_\+template.\+h@{btl\+\_\+template.\+h}}
\subsubsection[{mca\+\_\+btl\+\_\+template\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}int mca\+\_\+btl\+\_\+template\+\_\+get (
\begin{DoxyParamCaption}
\item[{{\bf mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$}]{btl, }
\item[{{\bf mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$}]{endpoint, }
\item[{{\bf mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t} $\ast$}]{descriptor}
\end{DoxyParamCaption}
)}}\label{btl__template_8h_a4b8e0caced93f6c9eac26683c80805dd}


Initiate an asynchronous get. 


\begin{DoxyParams}{Parameters}
{\em btl} & (I\+N) B\+T\+L module \\
\hline
{\em endpoint} & (I\+N) B\+T\+L addressing information \\
\hline
{\em descriptor} & (I\+N) Description of the data to be transferred \\
\hline
\end{DoxyParams}
\hypertarget{btl__template_8h_a3890f6ea1b34b89fde8aee34122cb8dc}{\index{btl\+\_\+template.\+h@{btl\+\_\+template.\+h}!mca\+\_\+btl\+\_\+template\+\_\+prepare\+\_\+dst@{mca\+\_\+btl\+\_\+template\+\_\+prepare\+\_\+dst}}
\index{mca\+\_\+btl\+\_\+template\+\_\+prepare\+\_\+dst@{mca\+\_\+btl\+\_\+template\+\_\+prepare\+\_\+dst}!btl\+\_\+template.\+h@{btl\+\_\+template.\+h}}
\subsubsection[{mca\+\_\+btl\+\_\+template\+\_\+prepare\+\_\+dst}]{\setlength{\rightskip}{0pt plus 5cm}{\bf mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t}$\ast$ mca\+\_\+btl\+\_\+template\+\_\+prepare\+\_\+dst (
\begin{DoxyParamCaption}
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$}]{btl, }
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$}]{endpoint, }
\item[{struct {\bf mca\+\_\+mpool\+\_\+base\+\_\+registration\+\_\+t} $\ast$}]{registration, }
\item[{struct {\bf opal\+\_\+convertor\+\_\+t} $\ast$}]{convertor, }
\item[{uint8\+\_\+t}]{order, }
\item[{size\+\_\+t}]{reserve, }
\item[{size\+\_\+t $\ast$}]{size, }
\item[{uint32\+\_\+t}]{flags}
\end{DoxyParamCaption}
)}}\label{btl__template_8h_a3890f6ea1b34b89fde8aee34122cb8dc}


Prepare a descriptor for send/rdma using the supplied convertor. 

If the convertor references data that is contigous, the descriptor may simply point to the user buffer. Otherwise, this routine is responsible for allocating buffer space and packing if required.


\begin{DoxyParams}{Parameters}
{\em btl} & (I\+N) B\+T\+L module \\
\hline
{\em endpoint} & (I\+N) B\+T\+L peer addressing \\
\hline
{\em convertor} & (I\+N) Data type convertor \\
\hline
{\em reserve} & (I\+N) Additional bytes requested by upper layer to precede user data \\
\hline
{\em size} & (I\+N/\+O\+U\+T) Number of bytes to prepare (I\+N), number of bytes actually prepared (O\+U\+T) \\
\hline
\end{DoxyParams}


References mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+dst, mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+dst\+\_\+cnt, mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+flags, mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+src, mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+src\+\_\+cnt, mca\+\_\+btl\+\_\+base\+\_\+segment\+\_\+t\+::seg\+\_\+addr, and mca\+\_\+btl\+\_\+base\+\_\+segment\+\_\+t\+::seg\+\_\+len.

\hypertarget{btl__template_8h_a99ddf33f0de02cd61bdc99f6a081a34d}{\index{btl\+\_\+template.\+h@{btl\+\_\+template.\+h}!mca\+\_\+btl\+\_\+template\+\_\+prepare\+\_\+src@{mca\+\_\+btl\+\_\+template\+\_\+prepare\+\_\+src}}
\index{mca\+\_\+btl\+\_\+template\+\_\+prepare\+\_\+src@{mca\+\_\+btl\+\_\+template\+\_\+prepare\+\_\+src}!btl\+\_\+template.\+h@{btl\+\_\+template.\+h}}
\subsubsection[{mca\+\_\+btl\+\_\+template\+\_\+prepare\+\_\+src}]{\setlength{\rightskip}{0pt plus 5cm}{\bf mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t}$\ast$ mca\+\_\+btl\+\_\+template\+\_\+prepare\+\_\+src (
\begin{DoxyParamCaption}
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$}]{btl, }
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$}]{endpoint, }
\item[{struct {\bf mca\+\_\+mpool\+\_\+base\+\_\+registration\+\_\+t} $\ast$}]{registration, }
\item[{struct {\bf opal\+\_\+convertor\+\_\+t} $\ast$}]{convertor, }
\item[{uint8\+\_\+t}]{order, }
\item[{size\+\_\+t}]{reserve, }
\item[{size\+\_\+t $\ast$}]{size, }
\item[{uint32\+\_\+t}]{flags}
\end{DoxyParamCaption}
)}}\label{btl__template_8h_a99ddf33f0de02cd61bdc99f6a081a34d}


Prepare a descriptor for send/rdma using the supplied convertor. 

If the convertor references data that is contigous, the descriptor may simply point to the user buffer. Otherwise, this routine is responsible for allocating buffer space and packing if required.


\begin{DoxyParams}{Parameters}
{\em btl} & (I\+N) B\+T\+L module \\
\hline
{\em endpoint} & (I\+N) B\+T\+L peer addressing \\
\hline
{\em convertor} & (I\+N) Data type convertor \\
\hline
{\em reserve} & (I\+N) Additional bytes requested by upper layer to precede user data \\
\hline
{\em size} & (I\+N/\+O\+U\+T) Number of bytes to prepare (I\+N), number of bytes actually prepared (O\+U\+T)\\
\hline
\end{DoxyParams}
Prepare a descriptor for send/rdma using the supplied convertor.


\begin{DoxyParams}{Parameters}
{\em btl} & (I\+N) B\+T\+L module \\
\hline
{\em peer} & (I\+N) B\+T\+L peer addressing \\
\hline
\end{DoxyParams}


References mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+dst, mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+dst\+\_\+cnt, mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+flags, mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+src, mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+src\+\_\+cnt, mca\+\_\+btl\+\_\+base\+\_\+segment\+\_\+t\+::seg\+\_\+addr, and mca\+\_\+btl\+\_\+base\+\_\+segment\+\_\+t\+::seg\+\_\+len.

\hypertarget{btl__template_8h_a4e4d9d813c99a92300d3d603119f06d6}{\index{btl\+\_\+template.\+h@{btl\+\_\+template.\+h}!mca\+\_\+btl\+\_\+template\+\_\+put@{mca\+\_\+btl\+\_\+template\+\_\+put}}
\index{mca\+\_\+btl\+\_\+template\+\_\+put@{mca\+\_\+btl\+\_\+template\+\_\+put}!btl\+\_\+template.\+h@{btl\+\_\+template.\+h}}
\subsubsection[{mca\+\_\+btl\+\_\+template\+\_\+put}]{\setlength{\rightskip}{0pt plus 5cm}int mca\+\_\+btl\+\_\+template\+\_\+put (
\begin{DoxyParamCaption}
\item[{{\bf mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$}]{btl, }
\item[{{\bf mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$}]{endpoint, }
\item[{{\bf mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t} $\ast$}]{descriptor}
\end{DoxyParamCaption}
)}}\label{btl__template_8h_a4e4d9d813c99a92300d3d603119f06d6}


Initiate an asynchronous put. 


\begin{DoxyParams}{Parameters}
{\em btl} & (I\+N) B\+T\+L module \\
\hline
{\em endpoint} & (I\+N) B\+T\+L addressing information \\
\hline
{\em descriptor} & (I\+N) Description of the data to be transferred \\
\hline
\end{DoxyParams}
\hypertarget{btl__template_8h_a51ed0dd235b99539d1703de39e79b1b3}{\index{btl\+\_\+template.\+h@{btl\+\_\+template.\+h}!mca\+\_\+btl\+\_\+template\+\_\+register@{mca\+\_\+btl\+\_\+template\+\_\+register}}
\index{mca\+\_\+btl\+\_\+template\+\_\+register@{mca\+\_\+btl\+\_\+template\+\_\+register}!btl\+\_\+template.\+h@{btl\+\_\+template.\+h}}
\subsubsection[{mca\+\_\+btl\+\_\+template\+\_\+register}]{\setlength{\rightskip}{0pt plus 5cm}int mca\+\_\+btl\+\_\+template\+\_\+register (
\begin{DoxyParamCaption}
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$}]{btl, }
\item[{mca\+\_\+btl\+\_\+base\+\_\+tag\+\_\+t}]{tag, }
\item[{{\bf mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+recv\+\_\+cb\+\_\+fn\+\_\+t}}]{cbfunc, }
\item[{void $\ast$}]{cbdata}
\end{DoxyParamCaption}
)}}\label{btl__template_8h_a51ed0dd235b99539d1703de39e79b1b3}


Register a callback function that is called on receipt of a fragment. 


\begin{DoxyParams}{Parameters}
{\em btl} & (I\+N) B\+T\+L module \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{classStatus}{Status} indicating if registration was successful
\end{DoxyReturn}
Register a callback function that is called on receipt of a fragment. \hypertarget{btl__template_8h_a24fe6b90220e158152e432ac3a7d2760}{\index{btl\+\_\+template.\+h@{btl\+\_\+template.\+h}!mca\+\_\+btl\+\_\+template\+\_\+send@{mca\+\_\+btl\+\_\+template\+\_\+send}}
\index{mca\+\_\+btl\+\_\+template\+\_\+send@{mca\+\_\+btl\+\_\+template\+\_\+send}!btl\+\_\+template.\+h@{btl\+\_\+template.\+h}}
\subsubsection[{mca\+\_\+btl\+\_\+template\+\_\+send}]{\setlength{\rightskip}{0pt plus 5cm}int mca\+\_\+btl\+\_\+template\+\_\+send (
\begin{DoxyParamCaption}
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$}]{btl, }
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$}]{endpoint, }
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t} $\ast$}]{descriptor, }
\item[{mca\+\_\+btl\+\_\+base\+\_\+tag\+\_\+t}]{tag}
\end{DoxyParamCaption}
)}}\label{btl__template_8h_a24fe6b90220e158152e432ac3a7d2760}


Initiate an asynchronous send. 


\begin{DoxyParams}{Parameters}
{\em btl} & (I\+N) B\+T\+L module \\
\hline
{\em endpoint} & (I\+N) B\+T\+L addressing information \\
\hline
{\em descriptor} & (I\+N) Description of the data to be transfered \\
\hline
{\em tag} & (I\+N) The tag value used to notify the peer. \\
\hline
\end{DoxyParams}
