\hypertarget{coll__sm_8h}{\section{ompi/mca/coll/sm/coll\+\_\+sm.h File Reference}
\label{coll__sm_8h}\index{ompi/mca/coll/sm/coll\+\_\+sm.\+h@{ompi/mca/coll/sm/coll\+\_\+sm.\+h}}
}
{\ttfamily \#include \char`\"{}ompi\+\_\+config.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}mpi.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/mca/mca.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/datatype/opal\+\_\+convertor.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}orte/types.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}ompi/mca/coll/coll.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}ompi/mca/common/sm/common\+\_\+sm.\+h\char`\"{}}\\*
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structmca__coll__sm__component__t}{mca\+\_\+coll\+\_\+sm\+\_\+component\+\_\+t}
\begin{DoxyCompactList}\small\item\em Structure to hold the sm coll component. \end{DoxyCompactList}\item 
struct \hyperlink{structmca__coll__sm__tree__node__t}{mca\+\_\+coll\+\_\+sm\+\_\+tree\+\_\+node\+\_\+t}
\begin{DoxyCompactList}\small\item\em Structure for representing a node in the tree. \end{DoxyCompactList}\item 
struct \hyperlink{structmca__coll__sm__in__use__flag__t}{mca\+\_\+coll\+\_\+sm\+\_\+in\+\_\+use\+\_\+flag\+\_\+t}
\begin{DoxyCompactList}\small\item\em Simple structure comprising the \char`\"{}in use\char`\"{} flags. \end{DoxyCompactList}\item 
struct \hyperlink{structmca__coll__sm__data__index__t}{mca\+\_\+coll\+\_\+sm\+\_\+data\+\_\+index\+\_\+t}
\begin{DoxyCompactList}\small\item\em Structure containing pointers to various arrays of data in the per-\/communicator shmem data segment (one of these indexes a single segment in the per-\/communicator shmem data segment). \end{DoxyCompactList}\item 
struct \hyperlink{structmca__coll__sm__comm__t}{mca\+\_\+coll\+\_\+sm\+\_\+comm\+\_\+t}
\begin{DoxyCompactList}\small\item\em Structure for the sm coll module to hang off the communicator. \end{DoxyCompactList}\item 
struct \hyperlink{structmca__coll__sm__module__t}{mca\+\_\+coll\+\_\+sm\+\_\+module\+\_\+t}
\begin{DoxyCompactList}\small\item\em Coll sm module. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\hypertarget{coll__sm_8h_a26db26bfc706bcf6175994010898ce2c}{\#define {\bfseries S\+P\+I\+N\+\_\+\+C\+O\+N\+D\+I\+T\+I\+O\+N\+\_\+\+M\+A\+X}~100000}\label{coll__sm_8h_a26db26bfc706bcf6175994010898ce2c}

\item 
\#define {\bfseries S\+P\+I\+N\+\_\+\+C\+O\+N\+D\+I\+T\+I\+O\+N}(cond, exit\+\_\+label)
\item 
\#define \hyperlink{coll__sm_8h_a01f574f01a6ac1668c362b03ad578e57}{F\+L\+A\+G\+\_\+\+S\+E\+T\+U\+P}(flag\+\_\+num, flag, data)
\begin{DoxyCompactList}\small\item\em Macro to setup flag usage. \end{DoxyCompactList}\item 
\hypertarget{coll__sm_8h_a1d028229b43a62ba18b6552307b5b220}{\#define \hyperlink{coll__sm_8h_a1d028229b43a62ba18b6552307b5b220}{F\+L\+A\+G\+\_\+\+W\+A\+I\+T\+\_\+\+F\+O\+R\+\_\+\+I\+D\+L\+E}(flag, label)~S\+P\+I\+N\+\_\+\+C\+O\+N\+D\+I\+T\+I\+O\+N(0 == (flag)-\/$>$mcsiuf\+\_\+num\+\_\+procs\+\_\+using, label)}\label{coll__sm_8h_a1d028229b43a62ba18b6552307b5b220}

\begin{DoxyCompactList}\small\item\em Macro to wait for the in-\/use flag to become idle (used by the root) \end{DoxyCompactList}\item 
\hypertarget{coll__sm_8h_a8677860a7ea51d3f665e5043f86a16f0}{\#define \hyperlink{coll__sm_8h_a8677860a7ea51d3f665e5043f86a16f0}{F\+L\+A\+G\+\_\+\+W\+A\+I\+T\+\_\+\+F\+O\+R\+\_\+\+O\+P}(flag, op, label)~S\+P\+I\+N\+\_\+\+C\+O\+N\+D\+I\+T\+I\+O\+N((op) == flag-\/$>$mcsiuf\+\_\+operation\+\_\+count, label)}\label{coll__sm_8h_a8677860a7ea51d3f665e5043f86a16f0}

\begin{DoxyCompactList}\small\item\em Macro to wait for a flag to indicate that it's ready for this operation (used by non-\/root processes to know when F\+L\+A\+G\+\_\+\+S\+E\+T() has been called) \end{DoxyCompactList}\item 
\#define \hyperlink{coll__sm_8h_a9842da7dd70b301a51aa96f63eb0134d}{F\+L\+A\+G\+\_\+\+R\+E\+T\+A\+I\+N}(flag, num\+\_\+procs, op\+\_\+count)
\begin{DoxyCompactList}\small\item\em Macro to set an in-\/use flag with relevant data to claim it. \end{DoxyCompactList}\item 
\hypertarget{coll__sm_8h_a348146958d736e39a9f3cefad24410cc}{\#define \hyperlink{coll__sm_8h_a348146958d736e39a9f3cefad24410cc}{F\+L\+A\+G\+\_\+\+R\+E\+L\+E\+A\+S\+E}(flag)~\hyperlink{include_2opal_2sys_2atomic_8h_a661bc8cc446888169d78ff4649f02ea7}{opal\+\_\+atomic\+\_\+add}(\&(flag)-\/$>$mcsiuf\+\_\+num\+\_\+procs\+\_\+using, -\/1)}\label{coll__sm_8h_a348146958d736e39a9f3cefad24410cc}

\begin{DoxyCompactList}\small\item\em Macro to release an in-\/use flag from this process. \end{DoxyCompactList}\item 
\#define \hyperlink{coll__sm_8h_a4c4af612fb166db29c8fa1df608f9e93}{C\+O\+P\+Y\+\_\+\+F\+R\+A\+G\+M\+E\+N\+T\+\_\+\+I\+N}(convertor, index, rank, iov, max\+\_\+data)
\begin{DoxyCompactList}\small\item\em Macro to copy a single segment in from a user buffer to a shared segment. \end{DoxyCompactList}\item 
\#define \hyperlink{coll__sm_8h_a722bde1c2d944ab73eaaa5f4127ff258}{C\+O\+P\+Y\+\_\+\+F\+R\+A\+G\+M\+E\+N\+T\+\_\+\+O\+U\+T}(convertor, src\+\_\+rank, index, iov, max\+\_\+data)
\begin{DoxyCompactList}\small\item\em Macro to copy a single segment out from a shared segment to a user buffer. \end{DoxyCompactList}\item 
\#define \hyperlink{coll__sm_8h_a719c68a2b408a9ea71c97cfa844c5795}{C\+O\+P\+Y\+\_\+\+F\+R\+A\+G\+M\+E\+N\+T\+\_\+\+B\+E\+T\+W\+E\+E\+N}(src\+\_\+rank, dest\+\_\+rank, index, len)
\begin{DoxyCompactList}\small\item\em Macro to memcpy a fragment between one shared segment and another. \end{DoxyCompactList}\item 
\#define \hyperlink{coll__sm_8h_a390afa244b47414184608a640b999ffc}{P\+A\+R\+E\+N\+T\+\_\+\+N\+O\+T\+I\+F\+Y\+\_\+\+C\+H\+I\+L\+D\+R\+E\+N}(children, num\+\_\+children, index, value)
\begin{DoxyCompactList}\small\item\em Macro to tell children that a segment is ready (normalize the child's I\+D based on the shift used to calculate the \char`\"{}me\char`\"{} node in the tree). \end{DoxyCompactList}\item 
\#define \hyperlink{coll__sm_8h_a4ac4738c5f7d75d3034001e547d9b8b2}{C\+H\+I\+L\+D\+\_\+\+W\+A\+I\+T\+\_\+\+F\+O\+R\+\_\+\+N\+O\+T\+I\+F\+Y}(rank, index, value, label)
\begin{DoxyCompactList}\small\item\em Macro for childen to wait for parent notification (use real rank). \end{DoxyCompactList}\item 
\#define \hyperlink{coll__sm_8h_a7b37a36be8c249b547e99e3b13b6eba8}{C\+H\+I\+L\+D\+\_\+\+N\+O\+T\+I\+F\+Y\+\_\+\+P\+A\+R\+E\+N\+T}(child\+\_\+rank, parent\+\_\+rank, index, value)
\begin{DoxyCompactList}\small\item\em Macro for children to tell parent that the data is ready in their segment. \end{DoxyCompactList}\item 
\#define \hyperlink{coll__sm_8h_a969a7a3c1c7f521352d3e2ab9543fd2b}{P\+A\+R\+E\+N\+T\+\_\+\+W\+A\+I\+T\+\_\+\+F\+O\+R\+\_\+\+N\+O\+T\+I\+F\+Y\+\_\+\+S\+P\+E\+C\+I\+F\+I\+C}(child\+\_\+rank, parent\+\_\+rank, index, value, label)
\begin{DoxyCompactList}\small\item\em Macro for parent to wait for a specific child to tell it that the data is in the child's segment. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct \\*
\hyperlink{structmca__coll__sm__component__t}{mca\+\_\+coll\+\_\+sm\+\_\+component\+\_\+t} \hyperlink{coll__sm_8h_a60f0c763b13de10e76b9af1a0edb285b}{mca\+\_\+coll\+\_\+sm\+\_\+component\+\_\+t}
\begin{DoxyCompactList}\small\item\em Structure to hold the sm coll component. \end{DoxyCompactList}\item 
\hypertarget{coll__sm_8h_a048231b6abc0c07c27a1541afd25753c}{typedef struct \\*
\hyperlink{structmca__coll__sm__tree__node__t}{mca\+\_\+coll\+\_\+sm\+\_\+tree\+\_\+node\+\_\+t} \hyperlink{coll__sm_8h_a048231b6abc0c07c27a1541afd25753c}{mca\+\_\+coll\+\_\+sm\+\_\+tree\+\_\+node\+\_\+t}}\label{coll__sm_8h_a048231b6abc0c07c27a1541afd25753c}

\begin{DoxyCompactList}\small\item\em Structure for representing a node in the tree. \end{DoxyCompactList}\item 
typedef struct \\*
\hyperlink{structmca__coll__sm__in__use__flag__t}{mca\+\_\+coll\+\_\+sm\+\_\+in\+\_\+use\+\_\+flag\+\_\+t} \hyperlink{coll__sm_8h_a2d57db72b7731f032b8ff581c2f53c04}{mca\+\_\+coll\+\_\+sm\+\_\+in\+\_\+use\+\_\+flag\+\_\+t}
\begin{DoxyCompactList}\small\item\em Simple structure comprising the \char`\"{}in use\char`\"{} flags. \end{DoxyCompactList}\item 
typedef struct \\*
\hyperlink{structmca__coll__sm__data__index__t}{mca\+\_\+coll\+\_\+sm\+\_\+data\+\_\+index\+\_\+t} \hyperlink{coll__sm_8h_ab4acffb35b08ab6779c0fa52899c7863}{mca\+\_\+coll\+\_\+sm\+\_\+data\+\_\+index\+\_\+t}
\begin{DoxyCompactList}\small\item\em Structure containing pointers to various arrays of data in the per-\/communicator shmem data segment (one of these indexes a single segment in the per-\/communicator shmem data segment). \end{DoxyCompactList}\item 
typedef struct \hyperlink{structmca__coll__sm__comm__t}{mca\+\_\+coll\+\_\+sm\+\_\+comm\+\_\+t} \hyperlink{coll__sm_8h_a5940d89918a25ea2506f973629aa885e}{mca\+\_\+coll\+\_\+sm\+\_\+comm\+\_\+t}
\begin{DoxyCompactList}\small\item\em Structure for the sm coll module to hang off the communicator. \end{DoxyCompactList}\item 
\hypertarget{coll__sm_8h_a9ebff77d01b6c80041ba959d287c3196}{typedef struct \hyperlink{structmca__coll__sm__module__t}{mca\+\_\+coll\+\_\+sm\+\_\+module\+\_\+t} \hyperlink{coll__sm_8h_a9ebff77d01b6c80041ba959d287c3196}{mca\+\_\+coll\+\_\+sm\+\_\+module\+\_\+t}}\label{coll__sm_8h_a9ebff77d01b6c80041ba959d287c3196}

\begin{DoxyCompactList}\small\item\em Coll sm module. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{coll__sm_8h_a2d46ee1130a7cf517baff9de0fc3b31e}{{\bfseries O\+B\+J\+\_\+\+C\+L\+A\+S\+S\+\_\+\+D\+E\+C\+L\+A\+R\+A\+T\+I\+O\+N} (\hyperlink{structmca__coll__sm__module__t}{mca\+\_\+coll\+\_\+sm\+\_\+module\+\_\+t})}\label{coll__sm_8h_a2d46ee1130a7cf517baff9de0fc3b31e}

\item 
\hypertarget{coll__sm_8h_abccc35e92b6880cf1a163c86e785bb0e}{int {\bfseries mca\+\_\+coll\+\_\+sm\+\_\+init\+\_\+query} (bool enable\+\_\+progress\+\_\+threads, bool enable\+\_\+mpi\+\_\+threads)}\label{coll__sm_8h_abccc35e92b6880cf1a163c86e785bb0e}

\item 
\hypertarget{coll__sm_8h_a68dc9e24f6ecd2ff070d58b55458e4b4}{\hyperlink{coll_8h_aa26d67e9c1a6d83345102a7ef73ea7d1}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t} $\ast$ {\bfseries mca\+\_\+coll\+\_\+sm\+\_\+comm\+\_\+query} (struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, int $\ast$priority)}\label{coll__sm_8h_a68dc9e24f6ecd2ff070d58b55458e4b4}

\item 
\hypertarget{coll__sm_8h_ad2119827a74d2b3c282ac91634337c9e}{int {\bfseries ompi\+\_\+coll\+\_\+sm\+\_\+lazy\+\_\+enable} (\hyperlink{coll_8h_aa26d67e9c1a6d83345102a7ef73ea7d1}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t} $\ast$module, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm)}\label{coll__sm_8h_ad2119827a74d2b3c282ac91634337c9e}

\item 
\hypertarget{coll__sm_8h_aee98f13c7b672d329f78075748b1f8fc}{int {\bfseries mca\+\_\+coll\+\_\+sm\+\_\+allgather\+\_\+intra} (void $\ast$sbuf, int scount, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$sdtype, void $\ast$rbuf, int rcount, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$rdtype, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, \hyperlink{coll_8h_aa26d67e9c1a6d83345102a7ef73ea7d1}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t} $\ast$module)}\label{coll__sm_8h_aee98f13c7b672d329f78075748b1f8fc}

\item 
\hypertarget{coll__sm_8h_a5dedc3fc9009d0309ab797d6258f3a39}{int {\bfseries mca\+\_\+coll\+\_\+sm\+\_\+allgatherv\+\_\+intra} (void $\ast$sbuf, int scount, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$sdtype, void $\ast$rbuf, int $\ast$rcounts, int $\ast$disps, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$rdtype, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, \hyperlink{coll_8h_aa26d67e9c1a6d83345102a7ef73ea7d1}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t} $\ast$module)}\label{coll__sm_8h_a5dedc3fc9009d0309ab797d6258f3a39}

\item 
int \hyperlink{coll__sm_8h_a987b8740f8fd7d9e82e33189125fa470}{mca\+\_\+coll\+\_\+sm\+\_\+allreduce\+\_\+intra} (void $\ast$sbuf, void $\ast$rbuf, int count, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$dtype, struct \hyperlink{structompi__op__t}{ompi\+\_\+op\+\_\+t} $\ast$op, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, \hyperlink{coll_8h_aa26d67e9c1a6d83345102a7ef73ea7d1}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t} $\ast$module)
\begin{DoxyCompactList}\small\item\em Shared memory allreduce. \end{DoxyCompactList}\item 
\hypertarget{coll__sm_8h_aeb234040dc0f3b40601282dbd47f4f62}{int {\bfseries mca\+\_\+coll\+\_\+sm\+\_\+alltoall\+\_\+intra} (void $\ast$sbuf, int scount, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$sdtype, void $\ast$rbuf, int rcount, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$rdtype, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, \hyperlink{coll_8h_aa26d67e9c1a6d83345102a7ef73ea7d1}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t} $\ast$module)}\label{coll__sm_8h_aeb234040dc0f3b40601282dbd47f4f62}

\item 
\hypertarget{coll__sm_8h_af4535d425793a9536377f6a894d1c6fd}{int {\bfseries mca\+\_\+coll\+\_\+sm\+\_\+alltoallv\+\_\+intra} (void $\ast$sbuf, int $\ast$scounts, int $\ast$sdisps, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$sdtype, void $\ast$rbuf, int $\ast$rcounts, int $\ast$rdisps, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$rdtype, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, \hyperlink{coll_8h_aa26d67e9c1a6d83345102a7ef73ea7d1}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t} $\ast$module)}\label{coll__sm_8h_af4535d425793a9536377f6a894d1c6fd}

\item 
\hypertarget{coll__sm_8h_a6322471be9da83144ae41fc084a29915}{int {\bfseries mca\+\_\+coll\+\_\+sm\+\_\+alltoallw\+\_\+intra} (void $\ast$sbuf, int $\ast$scounts, int $\ast$sdisps, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$$\ast$sdtypes, void $\ast$rbuf, int $\ast$rcounts, int $\ast$rdisps, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$$\ast$rdtypes, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, \hyperlink{coll_8h_aa26d67e9c1a6d83345102a7ef73ea7d1}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t} $\ast$module)}\label{coll__sm_8h_a6322471be9da83144ae41fc084a29915}

\item 
int \hyperlink{coll__sm_8h_a3b9624c11ecd4f439f9712ac6361ce4c}{mca\+\_\+coll\+\_\+sm\+\_\+barrier\+\_\+intra} (struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, \hyperlink{coll_8h_aa26d67e9c1a6d83345102a7ef73ea7d1}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t} $\ast$module)
\begin{DoxyCompactList}\small\item\em Shared memory barrier. \end{DoxyCompactList}\item 
int \hyperlink{coll__sm_8h_aa59d0c45ecd6db1e5b0a918ff47f8b92}{mca\+\_\+coll\+\_\+sm\+\_\+bcast\+\_\+intra} (void $\ast$buff, int count, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$datatype, int root, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, \hyperlink{coll_8h_aa26d67e9c1a6d83345102a7ef73ea7d1}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t} $\ast$module)
\begin{DoxyCompactList}\small\item\em Shared memory broadcast. \end{DoxyCompactList}\item 
\hypertarget{coll__sm_8h_acf42d44d0a38569f3643731903cebae0}{int {\bfseries mca\+\_\+coll\+\_\+sm\+\_\+bcast\+\_\+log\+\_\+intra} (void $\ast$buff, int count, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$datatype, int root, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, \hyperlink{coll_8h_aa26d67e9c1a6d83345102a7ef73ea7d1}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t} $\ast$module)}\label{coll__sm_8h_acf42d44d0a38569f3643731903cebae0}

\item 
\hypertarget{coll__sm_8h_ad367049bd773bbfaa95525f9b5f26fd1}{int {\bfseries mca\+\_\+coll\+\_\+sm\+\_\+exscan\+\_\+intra} (void $\ast$sbuf, void $\ast$rbuf, int count, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$dtype, struct \hyperlink{structompi__op__t}{ompi\+\_\+op\+\_\+t} $\ast$op, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, \hyperlink{coll_8h_aa26d67e9c1a6d83345102a7ef73ea7d1}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t} $\ast$module)}\label{coll__sm_8h_ad367049bd773bbfaa95525f9b5f26fd1}

\item 
\hypertarget{coll__sm_8h_a8e91da58c23919f7f11881e3591d3320}{int {\bfseries mca\+\_\+coll\+\_\+sm\+\_\+gather\+\_\+intra} (void $\ast$sbuf, int scount, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$sdtype, void $\ast$rbuf, int rcount, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$rdtype, int root, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, \hyperlink{coll_8h_aa26d67e9c1a6d83345102a7ef73ea7d1}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t} $\ast$module)}\label{coll__sm_8h_a8e91da58c23919f7f11881e3591d3320}

\item 
\hypertarget{coll__sm_8h_a97f37fa20d5ab92978e862a1ca782d4f}{int {\bfseries mca\+\_\+coll\+\_\+sm\+\_\+gatherv\+\_\+intra} (void $\ast$sbuf, int scount, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$sdtype, void $\ast$rbuf, int $\ast$rcounts, int $\ast$disps, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$rdtype, int root, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, \hyperlink{coll_8h_aa26d67e9c1a6d83345102a7ef73ea7d1}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t} $\ast$module)}\label{coll__sm_8h_a97f37fa20d5ab92978e862a1ca782d4f}

\item 
int \hyperlink{coll__sm_8h_a5d8fc02715fe2cd2476ac5a1bdb8d55d}{mca\+\_\+coll\+\_\+sm\+\_\+reduce\+\_\+intra} (void $\ast$sbuf, void $\ast$rbuf, int count, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$dtype, struct \hyperlink{structompi__op__t}{ompi\+\_\+op\+\_\+t} $\ast$op, int root, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, \hyperlink{coll_8h_aa26d67e9c1a6d83345102a7ef73ea7d1}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t} $\ast$module)
\begin{DoxyCompactList}\small\item\em Shared memory reduction. \end{DoxyCompactList}\item 
\hypertarget{coll__sm_8h_a5ba0dc29b1bdfd68c9858a9ab23460f1}{int {\bfseries mca\+\_\+coll\+\_\+sm\+\_\+reduce\+\_\+log\+\_\+intra} (void $\ast$sbuf, void $\ast$rbuf, int count, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$dtype, struct \hyperlink{structompi__op__t}{ompi\+\_\+op\+\_\+t} $\ast$op, int root, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, \hyperlink{coll_8h_aa26d67e9c1a6d83345102a7ef73ea7d1}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t} $\ast$module)}\label{coll__sm_8h_a5ba0dc29b1bdfd68c9858a9ab23460f1}

\item 
\hypertarget{coll__sm_8h_adae6cb9b6a1199d36d48da3c7256b4b7}{int {\bfseries mca\+\_\+coll\+\_\+sm\+\_\+reduce\+\_\+scatter\+\_\+intra} (void $\ast$sbuf, void $\ast$rbuf, int $\ast$rcounts, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$dtype, struct \hyperlink{structompi__op__t}{ompi\+\_\+op\+\_\+t} $\ast$op, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, \hyperlink{coll_8h_aa26d67e9c1a6d83345102a7ef73ea7d1}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t} $\ast$module)}\label{coll__sm_8h_adae6cb9b6a1199d36d48da3c7256b4b7}

\item 
\hypertarget{coll__sm_8h_a20c12dd7e6587088f2c4b4463c726ebf}{int {\bfseries mca\+\_\+coll\+\_\+sm\+\_\+scan\+\_\+intra} (void $\ast$sbuf, void $\ast$rbuf, int count, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$dtype, struct \hyperlink{structompi__op__t}{ompi\+\_\+op\+\_\+t} $\ast$op, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, \hyperlink{coll_8h_aa26d67e9c1a6d83345102a7ef73ea7d1}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t} $\ast$module)}\label{coll__sm_8h_a20c12dd7e6587088f2c4b4463c726ebf}

\item 
\hypertarget{coll__sm_8h_a10d7f7ef63a98b6363ec90e512f66190}{int {\bfseries mca\+\_\+coll\+\_\+sm\+\_\+scatter\+\_\+intra} (void $\ast$sbuf, int scount, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$sdtype, void $\ast$rbuf, int rcount, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$rdtype, int root, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, \hyperlink{coll_8h_aa26d67e9c1a6d83345102a7ef73ea7d1}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t} $\ast$module)}\label{coll__sm_8h_a10d7f7ef63a98b6363ec90e512f66190}

\item 
\hypertarget{coll__sm_8h_a46f88442fc6acc38f0f8410d14f17e2e}{int {\bfseries mca\+\_\+coll\+\_\+sm\+\_\+scatterv\+\_\+intra} (void $\ast$sbuf, int $\ast$scounts, int $\ast$disps, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$sdtype, void $\ast$rbuf, int rcount, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$rdtype, int root, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, \hyperlink{coll_8h_aa26d67e9c1a6d83345102a7ef73ea7d1}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t} $\ast$module)}\label{coll__sm_8h_a46f88442fc6acc38f0f8410d14f17e2e}

\item 
\hypertarget{coll__sm_8h_af5f4d546a31eac0356b59830e5f5e0f3}{int {\bfseries mca\+\_\+coll\+\_\+sm\+\_\+ft\+\_\+event} (int state)}\label{coll__sm_8h_af5f4d546a31eac0356b59830e5f5e0f3}

\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\hypertarget{coll__sm_8h_a421b577a384362a0eea85f5c3b40226e}{O\+M\+P\+I\+\_\+\+M\+O\+D\+U\+L\+E\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C \\*
\hyperlink{structmca__coll__sm__component__t}{mca\+\_\+coll\+\_\+sm\+\_\+component\+\_\+t} \hyperlink{coll__sm_8h_a421b577a384362a0eea85f5c3b40226e}{mca\+\_\+coll\+\_\+sm\+\_\+component}}\label{coll__sm_8h_a421b577a384362a0eea85f5c3b40226e}

\begin{DoxyCompactList}\small\item\em Global component instance. \end{DoxyCompactList}\item 
\hypertarget{coll__sm_8h_a6038218fc738d4b0ad9bcf6e8db49d6d}{uint32\+\_\+t \hyperlink{coll__sm_8h_a6038218fc738d4b0ad9bcf6e8db49d6d}{mca\+\_\+coll\+\_\+sm\+\_\+one}}\label{coll__sm_8h_a6038218fc738d4b0ad9bcf6e8db49d6d}

\begin{DoxyCompactList}\small\item\em Global variables used in the macros (essentially constants, so these are thread safe) \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Macro Definition Documentation}
\hypertarget{coll__sm_8h_a7b37a36be8c249b547e99e3b13b6eba8}{\index{coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}!C\+H\+I\+L\+D\+\_\+\+N\+O\+T\+I\+F\+Y\+\_\+\+P\+A\+R\+E\+N\+T@{C\+H\+I\+L\+D\+\_\+\+N\+O\+T\+I\+F\+Y\+\_\+\+P\+A\+R\+E\+N\+T}}
\index{C\+H\+I\+L\+D\+\_\+\+N\+O\+T\+I\+F\+Y\+\_\+\+P\+A\+R\+E\+N\+T@{C\+H\+I\+L\+D\+\_\+\+N\+O\+T\+I\+F\+Y\+\_\+\+P\+A\+R\+E\+N\+T}!coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}}
\subsubsection[{C\+H\+I\+L\+D\+\_\+\+N\+O\+T\+I\+F\+Y\+\_\+\+P\+A\+R\+E\+N\+T}]{\setlength{\rightskip}{0pt plus 5cm}\#define C\+H\+I\+L\+D\+\_\+\+N\+O\+T\+I\+F\+Y\+\_\+\+P\+A\+R\+E\+N\+T(
\begin{DoxyParamCaption}
\item[{}]{child\+\_\+rank, }
\item[{}]{parent\+\_\+rank, }
\item[{}]{index, }
\item[{}]{value}
\end{DoxyParamCaption}
)}}\label{coll__sm_8h_a7b37a36be8c249b547e99e3b13b6eba8}
{\bfseries Value\+:}
\begin{DoxyCode}
((\textcolor{keywordtype}{size\_t} \textcolor{keyword}{volatile} *) \(\backslash\)
     (((\textcolor{keywordtype}{char}*) (index)->mcbmi\_control) + \(\backslash\)
      (\hyperlink{coll__sm_8h_a421b577a384362a0eea85f5c3b40226e}{mca\_coll\_sm\_component}.\hyperlink{structmca__coll__sm__component__t_aab7fada8a94bcd04c30101214ea719fb}{sm\_control\_size} * \(\backslash\)
       (parent\_rank))))[(child\_rank)] = (value)
\end{DoxyCode}


Macro for children to tell parent that the data is ready in their segment. 

Used for fan in operations. \hypertarget{coll__sm_8h_a4ac4738c5f7d75d3034001e547d9b8b2}{\index{coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}!C\+H\+I\+L\+D\+\_\+\+W\+A\+I\+T\+\_\+\+F\+O\+R\+\_\+\+N\+O\+T\+I\+F\+Y@{C\+H\+I\+L\+D\+\_\+\+W\+A\+I\+T\+\_\+\+F\+O\+R\+\_\+\+N\+O\+T\+I\+F\+Y}}
\index{C\+H\+I\+L\+D\+\_\+\+W\+A\+I\+T\+\_\+\+F\+O\+R\+\_\+\+N\+O\+T\+I\+F\+Y@{C\+H\+I\+L\+D\+\_\+\+W\+A\+I\+T\+\_\+\+F\+O\+R\+\_\+\+N\+O\+T\+I\+F\+Y}!coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}}
\subsubsection[{C\+H\+I\+L\+D\+\_\+\+W\+A\+I\+T\+\_\+\+F\+O\+R\+\_\+\+N\+O\+T\+I\+F\+Y}]{\setlength{\rightskip}{0pt plus 5cm}\#define C\+H\+I\+L\+D\+\_\+\+W\+A\+I\+T\+\_\+\+F\+O\+R\+\_\+\+N\+O\+T\+I\+F\+Y(
\begin{DoxyParamCaption}
\item[{}]{rank, }
\item[{}]{index, }
\item[{}]{value, }
\item[{}]{label}
\end{DoxyParamCaption}
)}}\label{coll__sm_8h_a4ac4738c5f7d75d3034001e547d9b8b2}
{\bfseries Value\+:}
\begin{DoxyCode}
\textcolor{keywordflow}{do} \{ \(\backslash\)
        uint32\_t \textcolor{keyword}{volatile} *ptr = ((uint32\_t*) \(\backslash\)
                                  (((\textcolor{keywordtype}{char}*) index->mcbmi\_control) + \(\backslash\)
                                   ((rank) * \hyperlink{coll__sm_8h_a421b577a384362a0eea85f5c3b40226e}{mca\_coll\_sm\_component}.
      \hyperlink{structmca__coll__sm__component__t_aab7fada8a94bcd04c30101214ea719fb}{sm\_control\_size}))); \(\backslash\)
        SPIN\_CONDITION(0 != *ptr, label); \(\backslash\)
        (value) = *ptr; \(\backslash\)
        *ptr = 0; \(\backslash\)
    \} \textcolor{keywordflow}{while} (0)
\end{DoxyCode}


Macro for childen to wait for parent notification (use real rank). 

Save the value passed and then reset it when done. Used in fan out operations. \hypertarget{coll__sm_8h_a719c68a2b408a9ea71c97cfa844c5795}{\index{coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}!C\+O\+P\+Y\+\_\+\+F\+R\+A\+G\+M\+E\+N\+T\+\_\+\+B\+E\+T\+W\+E\+E\+N@{C\+O\+P\+Y\+\_\+\+F\+R\+A\+G\+M\+E\+N\+T\+\_\+\+B\+E\+T\+W\+E\+E\+N}}
\index{C\+O\+P\+Y\+\_\+\+F\+R\+A\+G\+M\+E\+N\+T\+\_\+\+B\+E\+T\+W\+E\+E\+N@{C\+O\+P\+Y\+\_\+\+F\+R\+A\+G\+M\+E\+N\+T\+\_\+\+B\+E\+T\+W\+E\+E\+N}!coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}}
\subsubsection[{C\+O\+P\+Y\+\_\+\+F\+R\+A\+G\+M\+E\+N\+T\+\_\+\+B\+E\+T\+W\+E\+E\+N}]{\setlength{\rightskip}{0pt plus 5cm}\#define C\+O\+P\+Y\+\_\+\+F\+R\+A\+G\+M\+E\+N\+T\+\_\+\+B\+E\+T\+W\+E\+E\+N(
\begin{DoxyParamCaption}
\item[{}]{src\+\_\+rank, }
\item[{}]{dest\+\_\+rank, }
\item[{}]{index, }
\item[{}]{len}
\end{DoxyParamCaption}
)}}\label{coll__sm_8h_a719c68a2b408a9ea71c97cfa844c5795}
{\bfseries Value\+:}
\begin{DoxyCode}
memcpy(((index)->mcbmi\_data + \(\backslash\)
            ((dest\_rank) * \hyperlink{coll__sm_8h_a421b577a384362a0eea85f5c3b40226e}{mca\_coll\_sm\_component}.
      \hyperlink{structmca__coll__sm__component__t_aa34c5ac044a3a3746bed689b169cbfcd}{sm\_fragment\_size})), \(\backslash\)
           ((index)->mcbmi\_data + \(\backslash\)
            ((src\_rank) * \(\backslash\)
             \hyperlink{coll__sm_8h_a421b577a384362a0eea85f5c3b40226e}{mca\_coll\_sm\_component}.\hyperlink{structmca__coll__sm__component__t_aa34c5ac044a3a3746bed689b169cbfcd}{sm\_fragment\_size})), \(\backslash\)
           (len))
\end{DoxyCode}


Macro to memcpy a fragment between one shared segment and another. 

\hypertarget{coll__sm_8h_a4c4af612fb166db29c8fa1df608f9e93}{\index{coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}!C\+O\+P\+Y\+\_\+\+F\+R\+A\+G\+M\+E\+N\+T\+\_\+\+I\+N@{C\+O\+P\+Y\+\_\+\+F\+R\+A\+G\+M\+E\+N\+T\+\_\+\+I\+N}}
\index{C\+O\+P\+Y\+\_\+\+F\+R\+A\+G\+M\+E\+N\+T\+\_\+\+I\+N@{C\+O\+P\+Y\+\_\+\+F\+R\+A\+G\+M\+E\+N\+T\+\_\+\+I\+N}!coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}}
\subsubsection[{C\+O\+P\+Y\+\_\+\+F\+R\+A\+G\+M\+E\+N\+T\+\_\+\+I\+N}]{\setlength{\rightskip}{0pt plus 5cm}\#define C\+O\+P\+Y\+\_\+\+F\+R\+A\+G\+M\+E\+N\+T\+\_\+\+I\+N(
\begin{DoxyParamCaption}
\item[{}]{convertor, }
\item[{}]{index, }
\item[{}]{rank, }
\item[{}]{iov, }
\item[{}]{max\+\_\+data}
\end{DoxyParamCaption}
)}}\label{coll__sm_8h_a4c4af612fb166db29c8fa1df608f9e93}
{\bfseries Value\+:}
\begin{DoxyCode}
(iov).iov\_base = \(\backslash\)
        (index)->mcbmi\_data + \(\backslash\)
        ((rank) * \hyperlink{coll__sm_8h_a421b577a384362a0eea85f5c3b40226e}{mca\_coll\_sm\_component}.\hyperlink{structmca__coll__sm__component__t_aa34c5ac044a3a3746bed689b169cbfcd}{sm\_fragment\_size}); \(\backslash\)
    (iov).iov\_len = (max\_data); \(\backslash\)
    opal\_convertor\_pack(&(convertor), &(iov), &\hyperlink{coll__sm_8h_a6038218fc738d4b0ad9bcf6e8db49d6d}{mca\_coll\_sm\_one}, \(\backslash\)
                        &(max\_data) )
\end{DoxyCode}


Macro to copy a single segment in from a user buffer to a shared segment. 



Referenced by mca\+\_\+coll\+\_\+sm\+\_\+bcast\+\_\+intra().

\hypertarget{coll__sm_8h_a722bde1c2d944ab73eaaa5f4127ff258}{\index{coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}!C\+O\+P\+Y\+\_\+\+F\+R\+A\+G\+M\+E\+N\+T\+\_\+\+O\+U\+T@{C\+O\+P\+Y\+\_\+\+F\+R\+A\+G\+M\+E\+N\+T\+\_\+\+O\+U\+T}}
\index{C\+O\+P\+Y\+\_\+\+F\+R\+A\+G\+M\+E\+N\+T\+\_\+\+O\+U\+T@{C\+O\+P\+Y\+\_\+\+F\+R\+A\+G\+M\+E\+N\+T\+\_\+\+O\+U\+T}!coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}}
\subsubsection[{C\+O\+P\+Y\+\_\+\+F\+R\+A\+G\+M\+E\+N\+T\+\_\+\+O\+U\+T}]{\setlength{\rightskip}{0pt plus 5cm}\#define C\+O\+P\+Y\+\_\+\+F\+R\+A\+G\+M\+E\+N\+T\+\_\+\+O\+U\+T(
\begin{DoxyParamCaption}
\item[{}]{convertor, }
\item[{}]{src\+\_\+rank, }
\item[{}]{index, }
\item[{}]{iov, }
\item[{}]{max\+\_\+data}
\end{DoxyParamCaption}
)}}\label{coll__sm_8h_a722bde1c2d944ab73eaaa5f4127ff258}
{\bfseries Value\+:}
\begin{DoxyCode}
(iov).iov\_base = (((\textcolor{keywordtype}{char}*) (index)->mcbmi\_data) + \(\backslash\)
                       ((src\_rank) * (\hyperlink{coll__sm_8h_a421b577a384362a0eea85f5c3b40226e}{mca\_coll\_sm\_component}.
      \hyperlink{structmca__coll__sm__component__t_aa34c5ac044a3a3746bed689b169cbfcd}{sm\_fragment\_size}))); \(\backslash\)
    (iov).iov\_len = (max\_data); \(\backslash\)
    opal\_convertor\_unpack(&(convertor), &(iov), &\hyperlink{coll__sm_8h_a6038218fc738d4b0ad9bcf6e8db49d6d}{mca\_coll\_sm\_one}, \(\backslash\)
                          &(max\_data) )
\end{DoxyCode}


Macro to copy a single segment out from a shared segment to a user buffer. 

\hypertarget{coll__sm_8h_a9842da7dd70b301a51aa96f63eb0134d}{\index{coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}!F\+L\+A\+G\+\_\+\+R\+E\+T\+A\+I\+N@{F\+L\+A\+G\+\_\+\+R\+E\+T\+A\+I\+N}}
\index{F\+L\+A\+G\+\_\+\+R\+E\+T\+A\+I\+N@{F\+L\+A\+G\+\_\+\+R\+E\+T\+A\+I\+N}!coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}}
\subsubsection[{F\+L\+A\+G\+\_\+\+R\+E\+T\+A\+I\+N}]{\setlength{\rightskip}{0pt plus 5cm}\#define F\+L\+A\+G\+\_\+\+R\+E\+T\+A\+I\+N(
\begin{DoxyParamCaption}
\item[{}]{flag, }
\item[{}]{num\+\_\+procs, }
\item[{}]{op\+\_\+count}
\end{DoxyParamCaption}
)}}\label{coll__sm_8h_a9842da7dd70b301a51aa96f63eb0134d}
{\bfseries Value\+:}
\begin{DoxyCode}
(flag)->mcsiuf\_num\_procs\_using = (num\_procs); \(\backslash\)
    (flag)->mcsiuf\_operation\_count = (op\_count)
\end{DoxyCode}


Macro to set an in-\/use flag with relevant data to claim it. 



Referenced by mca\+\_\+coll\+\_\+sm\+\_\+bcast\+\_\+intra().

\hypertarget{coll__sm_8h_a01f574f01a6ac1668c362b03ad578e57}{\index{coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}!F\+L\+A\+G\+\_\+\+S\+E\+T\+U\+P@{F\+L\+A\+G\+\_\+\+S\+E\+T\+U\+P}}
\index{F\+L\+A\+G\+\_\+\+S\+E\+T\+U\+P@{F\+L\+A\+G\+\_\+\+S\+E\+T\+U\+P}!coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}}
\subsubsection[{F\+L\+A\+G\+\_\+\+S\+E\+T\+U\+P}]{\setlength{\rightskip}{0pt plus 5cm}\#define F\+L\+A\+G\+\_\+\+S\+E\+T\+U\+P(
\begin{DoxyParamCaption}
\item[{}]{flag\+\_\+num, }
\item[{}]{flag, }
\item[{}]{data}
\end{DoxyParamCaption}
)}}\label{coll__sm_8h_a01f574f01a6ac1668c362b03ad578e57}
{\bfseries Value\+:}
\begin{DoxyCode}
(flag) = (\hyperlink{structmca__coll__sm__in__use__flag__t}{mca\_coll\_sm\_in\_use\_flag\_t}*) \(\backslash\)
        (((\textcolor{keywordtype}{char} *) (data)->mcb\_in\_use\_flags) + \(\backslash\)
        ((flag\_num) * \hyperlink{coll__sm_8h_a421b577a384362a0eea85f5c3b40226e}{mca\_coll\_sm\_component}.\hyperlink{structmca__coll__sm__component__t_aab7fada8a94bcd04c30101214ea719fb}{sm\_control\_size}))
\end{DoxyCode}


Macro to setup flag usage. 



Referenced by mca\+\_\+coll\+\_\+sm\+\_\+bcast\+\_\+intra().

\hypertarget{coll__sm_8h_a390afa244b47414184608a640b999ffc}{\index{coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}!P\+A\+R\+E\+N\+T\+\_\+\+N\+O\+T\+I\+F\+Y\+\_\+\+C\+H\+I\+L\+D\+R\+E\+N@{P\+A\+R\+E\+N\+T\+\_\+\+N\+O\+T\+I\+F\+Y\+\_\+\+C\+H\+I\+L\+D\+R\+E\+N}}
\index{P\+A\+R\+E\+N\+T\+\_\+\+N\+O\+T\+I\+F\+Y\+\_\+\+C\+H\+I\+L\+D\+R\+E\+N@{P\+A\+R\+E\+N\+T\+\_\+\+N\+O\+T\+I\+F\+Y\+\_\+\+C\+H\+I\+L\+D\+R\+E\+N}!coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}}
\subsubsection[{P\+A\+R\+E\+N\+T\+\_\+\+N\+O\+T\+I\+F\+Y\+\_\+\+C\+H\+I\+L\+D\+R\+E\+N}]{\setlength{\rightskip}{0pt plus 5cm}\#define P\+A\+R\+E\+N\+T\+\_\+\+N\+O\+T\+I\+F\+Y\+\_\+\+C\+H\+I\+L\+D\+R\+E\+N(
\begin{DoxyParamCaption}
\item[{}]{children, }
\item[{}]{num\+\_\+children, }
\item[{}]{index, }
\item[{}]{value}
\end{DoxyParamCaption}
)}}\label{coll__sm_8h_a390afa244b47414184608a640b999ffc}
{\bfseries Value\+:}
\begin{DoxyCode}
\textcolor{keywordflow}{do} \{ \(\backslash\)
        for (i = 0; i < (num\_children); ++i) \{ \(\backslash\)
            *((\textcolor{keywordtype}{size\_t}*) \(\backslash\)
              (((\textcolor{keywordtype}{char}*) index->mcbmi\_control) + \(\backslash\)
               (\hyperlink{coll__sm_8h_a421b577a384362a0eea85f5c3b40226e}{mca\_coll\_sm\_component}.\hyperlink{structmca__coll__sm__component__t_aab7fada8a94bcd04c30101214ea719fb}{sm\_control\_size} * \(\backslash\)
                (((children)[i]->mcstn\_id + root) % size)))) = (value); \(\backslash\)
        \} \(\backslash\)
    \} \textcolor{keywordflow}{while} (0)
\end{DoxyCode}


Macro to tell children that a segment is ready (normalize the child's I\+D based on the shift used to calculate the \char`\"{}me\char`\"{} node in the tree). 

Used in fan out opertations. 

Referenced by mca\+\_\+coll\+\_\+sm\+\_\+bcast\+\_\+intra().

\hypertarget{coll__sm_8h_a969a7a3c1c7f521352d3e2ab9543fd2b}{\index{coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}!P\+A\+R\+E\+N\+T\+\_\+\+W\+A\+I\+T\+\_\+\+F\+O\+R\+\_\+\+N\+O\+T\+I\+F\+Y\+\_\+\+S\+P\+E\+C\+I\+F\+I\+C@{P\+A\+R\+E\+N\+T\+\_\+\+W\+A\+I\+T\+\_\+\+F\+O\+R\+\_\+\+N\+O\+T\+I\+F\+Y\+\_\+\+S\+P\+E\+C\+I\+F\+I\+C}}
\index{P\+A\+R\+E\+N\+T\+\_\+\+W\+A\+I\+T\+\_\+\+F\+O\+R\+\_\+\+N\+O\+T\+I\+F\+Y\+\_\+\+S\+P\+E\+C\+I\+F\+I\+C@{P\+A\+R\+E\+N\+T\+\_\+\+W\+A\+I\+T\+\_\+\+F\+O\+R\+\_\+\+N\+O\+T\+I\+F\+Y\+\_\+\+S\+P\+E\+C\+I\+F\+I\+C}!coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}}
\subsubsection[{P\+A\+R\+E\+N\+T\+\_\+\+W\+A\+I\+T\+\_\+\+F\+O\+R\+\_\+\+N\+O\+T\+I\+F\+Y\+\_\+\+S\+P\+E\+C\+I\+F\+I\+C}]{\setlength{\rightskip}{0pt plus 5cm}\#define P\+A\+R\+E\+N\+T\+\_\+\+W\+A\+I\+T\+\_\+\+F\+O\+R\+\_\+\+N\+O\+T\+I\+F\+Y\+\_\+\+S\+P\+E\+C\+I\+F\+I\+C(
\begin{DoxyParamCaption}
\item[{}]{child\+\_\+rank, }
\item[{}]{parent\+\_\+rank, }
\item[{}]{index, }
\item[{}]{value, }
\item[{}]{label}
\end{DoxyParamCaption}
)}}\label{coll__sm_8h_a969a7a3c1c7f521352d3e2ab9543fd2b}
{\bfseries Value\+:}
\begin{DoxyCode}
\textcolor{keywordflow}{do} \{ \(\backslash\)
        size\_t \textcolor{keyword}{volatile} *ptr = ((\textcolor{keywordtype}{size\_t} \textcolor{keyword}{volatile} *) \(\backslash\)
                                (((\textcolor{keywordtype}{char}*) index->mcbmi\_control) + \(\backslash\)
                                 (\hyperlink{coll__sm_8h_a421b577a384362a0eea85f5c3b40226e}{mca\_coll\_sm\_component}.
      \hyperlink{structmca__coll__sm__component__t_aab7fada8a94bcd04c30101214ea719fb}{sm\_control\_size} * \(\backslash\)
                                  (parent\_rank)))) + child\_rank; \(\backslash\)
        SPIN\_CONDITION(0 != *ptr, label); \(\backslash\)
        (value) = *ptr; \(\backslash\)
        *ptr = 0; \(\backslash\)
    \} \textcolor{keywordflow}{while} (0)
\end{DoxyCode}


Macro for parent to wait for a specific child to tell it that the data is in the child's segment. 

Save the value when done. Used for fan in operations. \hypertarget{coll__sm_8h_af6cfa6e9e73177372180dd1ba9ff275e}{\index{coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}!S\+P\+I\+N\+\_\+\+C\+O\+N\+D\+I\+T\+I\+O\+N@{S\+P\+I\+N\+\_\+\+C\+O\+N\+D\+I\+T\+I\+O\+N}}
\index{S\+P\+I\+N\+\_\+\+C\+O\+N\+D\+I\+T\+I\+O\+N@{S\+P\+I\+N\+\_\+\+C\+O\+N\+D\+I\+T\+I\+O\+N}!coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}}
\subsubsection[{S\+P\+I\+N\+\_\+\+C\+O\+N\+D\+I\+T\+I\+O\+N}]{\setlength{\rightskip}{0pt plus 5cm}\#define S\+P\+I\+N\+\_\+\+C\+O\+N\+D\+I\+T\+I\+O\+N(
\begin{DoxyParamCaption}
\item[{}]{cond, }
\item[{}]{exit\+\_\+label}
\end{DoxyParamCaption}
)}}\label{coll__sm_8h_af6cfa6e9e73177372180dd1ba9ff275e}
{\bfseries Value\+:}
\begin{DoxyCode}
\textcolor{keywordflow}{do} \{ \textcolor{keywordtype}{int} i; \(\backslash\)
       if (cond) goto exit\_label; \(\backslash\)
       for (i = 0; i < SPIN\_CONDITION\_MAX; ++i) \{ \(\backslash\)
           if (cond) \{ \textcolor{keywordflow}{goto} exit\_label; \} \(\backslash\)
       \} \hyperlink{opal__progress_8h_a89fcac5ab9895b0823687d1f56d883a4}{\(\backslash\)}
\hyperlink{opal__progress_8h_a89fcac5ab9895b0823687d1f56d883a4}{       opal\_progress}(); \(\backslash\)
  \} \textcolor{keywordflow}{while} (1); \(\backslash\)
  exit\_label:
\end{DoxyCode}


\subsection{Typedef Documentation}
\hypertarget{coll__sm_8h_a5940d89918a25ea2506f973629aa885e}{\index{coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}!mca\+\_\+coll\+\_\+sm\+\_\+comm\+\_\+t@{mca\+\_\+coll\+\_\+sm\+\_\+comm\+\_\+t}}
\index{mca\+\_\+coll\+\_\+sm\+\_\+comm\+\_\+t@{mca\+\_\+coll\+\_\+sm\+\_\+comm\+\_\+t}!coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}}
\subsubsection[{mca\+\_\+coll\+\_\+sm\+\_\+comm\+\_\+t}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf mca\+\_\+coll\+\_\+sm\+\_\+comm\+\_\+t}  {\bf mca\+\_\+coll\+\_\+sm\+\_\+comm\+\_\+t}}}\label{coll__sm_8h_a5940d89918a25ea2506f973629aa885e}


Structure for the sm coll module to hang off the communicator. 

Contains communicator-\/specific information, including pointers into the per-\/communicator shmem data data segment for this comm's sm collective operations area. \hypertarget{coll__sm_8h_a60f0c763b13de10e76b9af1a0edb285b}{\index{coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}!mca\+\_\+coll\+\_\+sm\+\_\+component\+\_\+t@{mca\+\_\+coll\+\_\+sm\+\_\+component\+\_\+t}}
\index{mca\+\_\+coll\+\_\+sm\+\_\+component\+\_\+t@{mca\+\_\+coll\+\_\+sm\+\_\+component\+\_\+t}!coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}}
\subsubsection[{mca\+\_\+coll\+\_\+sm\+\_\+component\+\_\+t}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf mca\+\_\+coll\+\_\+sm\+\_\+component\+\_\+t}  {\bf mca\+\_\+coll\+\_\+sm\+\_\+component\+\_\+t}}}\label{coll__sm_8h_a60f0c763b13de10e76b9af1a0edb285b}


Structure to hold the sm coll component. 

First it holds the base coll component, and then holds a bunch of sm-\/coll-\/component-\/specific stuff (e.\+g., current M\+C\+A param values). \hypertarget{coll__sm_8h_ab4acffb35b08ab6779c0fa52899c7863}{\index{coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}!mca\+\_\+coll\+\_\+sm\+\_\+data\+\_\+index\+\_\+t@{mca\+\_\+coll\+\_\+sm\+\_\+data\+\_\+index\+\_\+t}}
\index{mca\+\_\+coll\+\_\+sm\+\_\+data\+\_\+index\+\_\+t@{mca\+\_\+coll\+\_\+sm\+\_\+data\+\_\+index\+\_\+t}!coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}}
\subsubsection[{mca\+\_\+coll\+\_\+sm\+\_\+data\+\_\+index\+\_\+t}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf mca\+\_\+coll\+\_\+sm\+\_\+data\+\_\+index\+\_\+t}  {\bf mca\+\_\+coll\+\_\+sm\+\_\+data\+\_\+index\+\_\+t}}}\label{coll__sm_8h_ab4acffb35b08ab6779c0fa52899c7863}


Structure containing pointers to various arrays of data in the per-\/communicator shmem data segment (one of these indexes a single segment in the per-\/communicator shmem data segment). 

Nothing is hard-\/coded because all the array lengths and displacements of the pointers all depend on how many processes are in the communicator. \hypertarget{coll__sm_8h_a2d57db72b7731f032b8ff581c2f53c04}{\index{coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}!mca\+\_\+coll\+\_\+sm\+\_\+in\+\_\+use\+\_\+flag\+\_\+t@{mca\+\_\+coll\+\_\+sm\+\_\+in\+\_\+use\+\_\+flag\+\_\+t}}
\index{mca\+\_\+coll\+\_\+sm\+\_\+in\+\_\+use\+\_\+flag\+\_\+t@{mca\+\_\+coll\+\_\+sm\+\_\+in\+\_\+use\+\_\+flag\+\_\+t}!coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}}
\subsubsection[{mca\+\_\+coll\+\_\+sm\+\_\+in\+\_\+use\+\_\+flag\+\_\+t}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf mca\+\_\+coll\+\_\+sm\+\_\+in\+\_\+use\+\_\+flag\+\_\+t}  {\bf mca\+\_\+coll\+\_\+sm\+\_\+in\+\_\+use\+\_\+flag\+\_\+t}}}\label{coll__sm_8h_a2d57db72b7731f032b8ff581c2f53c04}


Simple structure comprising the \char`\"{}in use\char`\"{} flags. 

Contains two members\+: the number of processes that are currently using this set of segments and the operation number of the current operation. 

\subsection{Function Documentation}
\hypertarget{coll__sm_8h_a987b8740f8fd7d9e82e33189125fa470}{\index{coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}!mca\+\_\+coll\+\_\+sm\+\_\+allreduce\+\_\+intra@{mca\+\_\+coll\+\_\+sm\+\_\+allreduce\+\_\+intra}}
\index{mca\+\_\+coll\+\_\+sm\+\_\+allreduce\+\_\+intra@{mca\+\_\+coll\+\_\+sm\+\_\+allreduce\+\_\+intra}!coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}}
\subsubsection[{mca\+\_\+coll\+\_\+sm\+\_\+allreduce\+\_\+intra}]{\setlength{\rightskip}{0pt plus 5cm}int mca\+\_\+coll\+\_\+sm\+\_\+allreduce\+\_\+intra (
\begin{DoxyParamCaption}
\item[{void $\ast$}]{sbuf, }
\item[{void $\ast$}]{rbuf, }
\item[{int}]{count, }
\item[{struct {\bf ompi\+\_\+datatype\+\_\+t} $\ast$}]{dtype, }
\item[{struct {\bf ompi\+\_\+op\+\_\+t} $\ast$}]{op, }
\item[{struct {\bf ompi\+\_\+communicator\+\_\+t} $\ast$}]{comm, }
\item[{{\bf mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t} $\ast$}]{module}
\end{DoxyParamCaption}
)}}\label{coll__sm_8h_a987b8740f8fd7d9e82e33189125fa470}


Shared memory allreduce. 

For the moment, all we're doing is a reduce to root==0 and then a broadcast. It is possible that we'll do something better someday. 

References mca\+\_\+coll\+\_\+sm\+\_\+bcast\+\_\+intra(), and mca\+\_\+coll\+\_\+sm\+\_\+reduce\+\_\+intra().

\hypertarget{coll__sm_8h_a3b9624c11ecd4f439f9712ac6361ce4c}{\index{coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}!mca\+\_\+coll\+\_\+sm\+\_\+barrier\+\_\+intra@{mca\+\_\+coll\+\_\+sm\+\_\+barrier\+\_\+intra}}
\index{mca\+\_\+coll\+\_\+sm\+\_\+barrier\+\_\+intra@{mca\+\_\+coll\+\_\+sm\+\_\+barrier\+\_\+intra}!coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}}
\subsubsection[{mca\+\_\+coll\+\_\+sm\+\_\+barrier\+\_\+intra}]{\setlength{\rightskip}{0pt plus 5cm}int mca\+\_\+coll\+\_\+sm\+\_\+barrier\+\_\+intra (
\begin{DoxyParamCaption}
\item[{struct {\bf ompi\+\_\+communicator\+\_\+t} $\ast$}]{comm, }
\item[{{\bf mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t} $\ast$}]{module}
\end{DoxyParamCaption}
)}}\label{coll__sm_8h_a3b9624c11ecd4f439f9712ac6361ce4c}


Shared memory barrier. 

Tree-\/based algorithm for a barrier\+: a fan in to rank 0 followed by a fan out using the barrier segments in the shared memory area.

There are 2 sets of barrier buffers -- since there can only be, at most, 2 outstanding barriers at any time, there is no need for more than this. The generalized in-\/use flags, control, and data segments are not used.

The general algorithm is for a given process to wait for its N children to fan in by monitoring a uint32\+\_\+t in its barrier \char`\"{}in\char`\"{} buffer. When this value reaches N (i.\+e., each of the children have atomically incremented the value), then the process atomically increases the uint32\+\_\+t in its parent's \char`\"{}in\char`\"{} buffer. Then the process waits for the parent to set a \char`\"{}1\char`\"{} in the process' \char`\"{}out\char`\"{} buffer. Once this happens, the process writes a \char`\"{}1\char`\"{} in each of its children's \char`\"{}out\char`\"{} buffers, and returns.

There's corner cases, of course, such as the root that has no parent, and the leaves that have no children. But that's the general idea. 

References mca\+\_\+coll\+\_\+sm\+\_\+component, mca\+\_\+coll\+\_\+sm\+\_\+comm\+\_\+t\+::mcb\+\_\+barrier\+\_\+control\+\_\+children, mca\+\_\+coll\+\_\+sm\+\_\+comm\+\_\+t\+::mcb\+\_\+barrier\+\_\+control\+\_\+me, mca\+\_\+coll\+\_\+sm\+\_\+comm\+\_\+t\+::mcb\+\_\+barrier\+\_\+control\+\_\+parent, mca\+\_\+coll\+\_\+sm\+\_\+comm\+\_\+t\+::mcb\+\_\+barrier\+\_\+count, mca\+\_\+coll\+\_\+sm\+\_\+comm\+\_\+t\+::mcb\+\_\+tree, mca\+\_\+coll\+\_\+sm\+\_\+tree\+\_\+node\+\_\+t\+::mcstn\+\_\+num\+\_\+children, opal\+\_\+atomic\+\_\+add, and mca\+\_\+coll\+\_\+sm\+\_\+component\+\_\+t\+::sm\+\_\+control\+\_\+size.

\hypertarget{coll__sm_8h_aa59d0c45ecd6db1e5b0a918ff47f8b92}{\index{coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}!mca\+\_\+coll\+\_\+sm\+\_\+bcast\+\_\+intra@{mca\+\_\+coll\+\_\+sm\+\_\+bcast\+\_\+intra}}
\index{mca\+\_\+coll\+\_\+sm\+\_\+bcast\+\_\+intra@{mca\+\_\+coll\+\_\+sm\+\_\+bcast\+\_\+intra}!coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}}
\subsubsection[{mca\+\_\+coll\+\_\+sm\+\_\+bcast\+\_\+intra}]{\setlength{\rightskip}{0pt plus 5cm}int mca\+\_\+coll\+\_\+sm\+\_\+bcast\+\_\+intra (
\begin{DoxyParamCaption}
\item[{void $\ast$}]{buff, }
\item[{int}]{count, }
\item[{struct {\bf ompi\+\_\+datatype\+\_\+t} $\ast$}]{datatype, }
\item[{int}]{root, }
\item[{struct {\bf ompi\+\_\+communicator\+\_\+t} $\ast$}]{comm, }
\item[{{\bf mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t} $\ast$}]{module}
\end{DoxyParamCaption}
)}}\label{coll__sm_8h_aa59d0c45ecd6db1e5b0a918ff47f8b92}


Shared memory broadcast. 

For the root, the general algorithm is to wait for a set of segments to become available. Once it is, the root claims the set by writing the current operation number and the number of processes using the set to the flag. The root then loops over the set of segments; for each segment, it copies a fragment of the user's buffer into the shared data segment and then writes the data size into its childrens' control buffers. The process is repeated until all fragments have been written.

For non-\/roots, for each set of buffers, they wait until the current operation number appears in the in-\/use flag (i.\+e., written by the root). Then for each segment, they wait for a nonzero to appear into their control buffers. If they have children, they copy the data from their parent's shared data segment into their shared data segment, and write the data size into each of their childrens' control buffers. They then copy the data from their shared \mbox{[}local\mbox{]} data segment into the user's output buffer. The process is repeated until all fragments have been received. If they do not have children, they copy the data directly from the parent's shared data segment into the user's output buffer. 

References C\+O\+P\+Y\+\_\+\+F\+R\+A\+G\+M\+E\+N\+T\+\_\+\+I\+N, F\+L\+A\+G\+\_\+\+R\+E\+T\+A\+I\+N, F\+L\+A\+G\+\_\+\+S\+E\+T\+U\+P, F\+L\+A\+G\+\_\+\+W\+A\+I\+T\+\_\+\+F\+O\+R\+\_\+\+I\+D\+L\+E, mca\+\_\+coll\+\_\+sm\+\_\+component, mca\+\_\+coll\+\_\+sm\+\_\+comm\+\_\+t\+::mcb\+\_\+data\+\_\+index, mca\+\_\+coll\+\_\+sm\+\_\+comm\+\_\+t\+::mcb\+\_\+operation\+\_\+count, mca\+\_\+coll\+\_\+sm\+\_\+comm\+\_\+t\+::mcb\+\_\+tree, mca\+\_\+coll\+\_\+sm\+\_\+tree\+\_\+node\+\_\+t\+::mcstn\+\_\+children, mca\+\_\+coll\+\_\+sm\+\_\+tree\+\_\+node\+\_\+t\+::mcstn\+\_\+num\+\_\+children, mca\+\_\+coll\+\_\+sm\+\_\+tree\+\_\+node\+\_\+t\+::mcstn\+\_\+parent, O\+B\+J\+\_\+\+C\+O\+N\+S\+T\+R\+U\+C\+T, opal\+\_\+atomic\+\_\+wmb(), P\+A\+R\+E\+N\+T\+\_\+\+N\+O\+T\+I\+F\+Y\+\_\+\+C\+H\+I\+L\+D\+R\+E\+N, mca\+\_\+coll\+\_\+sm\+\_\+component\+\_\+t\+::sm\+\_\+comm\+\_\+num\+\_\+in\+\_\+use\+\_\+flags, mca\+\_\+coll\+\_\+sm\+\_\+component\+\_\+t\+::sm\+\_\+fragment\+\_\+size, mca\+\_\+coll\+\_\+sm\+\_\+component\+\_\+t\+::sm\+\_\+segs\+\_\+per\+\_\+inuse\+\_\+flag, and ompi\+\_\+datatype\+\_\+t\+::super.



Referenced by mca\+\_\+coll\+\_\+sm\+\_\+allreduce\+\_\+intra().

\hypertarget{coll__sm_8h_a5d8fc02715fe2cd2476ac5a1bdb8d55d}{\index{coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}!mca\+\_\+coll\+\_\+sm\+\_\+reduce\+\_\+intra@{mca\+\_\+coll\+\_\+sm\+\_\+reduce\+\_\+intra}}
\index{mca\+\_\+coll\+\_\+sm\+\_\+reduce\+\_\+intra@{mca\+\_\+coll\+\_\+sm\+\_\+reduce\+\_\+intra}!coll\+\_\+sm.\+h@{coll\+\_\+sm.\+h}}
\subsubsection[{mca\+\_\+coll\+\_\+sm\+\_\+reduce\+\_\+intra}]{\setlength{\rightskip}{0pt plus 5cm}int mca\+\_\+coll\+\_\+sm\+\_\+reduce\+\_\+intra (
\begin{DoxyParamCaption}
\item[{void $\ast$}]{sbuf, }
\item[{void $\ast$}]{rbuf, }
\item[{int}]{count, }
\item[{struct {\bf ompi\+\_\+datatype\+\_\+t} $\ast$}]{dtype, }
\item[{struct {\bf ompi\+\_\+op\+\_\+t} $\ast$}]{op, }
\item[{int}]{root, }
\item[{struct {\bf ompi\+\_\+communicator\+\_\+t} $\ast$}]{comm, }
\item[{{\bf mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t} $\ast$}]{module}
\end{DoxyParamCaption}
)}}\label{coll__sm_8h_a5d8fc02715fe2cd2476ac5a1bdb8d55d}


Shared memory reduction. 

Simply farms out to the associative or non-\/associative functions. 

References mca\+\_\+coll\+\_\+sm\+\_\+component, ompi\+\_\+op\+\_\+is\+\_\+float\+\_\+assoc(), ompi\+\_\+op\+\_\+is\+\_\+intrinsic(), and mca\+\_\+coll\+\_\+sm\+\_\+component\+\_\+t\+::sm\+\_\+control\+\_\+size.



Referenced by mca\+\_\+coll\+\_\+sm\+\_\+allreduce\+\_\+intra().

