\hypertarget{class_s_c_i_run_1_1_reducer}{\section{Reducer$<$ T $>$ Class Template Reference}
\label{class_s_c_i_run_1_1_reducer}\index{Reducer$<$ T $>$@{Reducer$<$ T $>$}}
}


{\ttfamily \#include $<$Reducer.\-h$>$}

Inheritance diagram for Reducer$<$ T $>$\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{class_s_c_i_run_1_1_reducer}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
typedef T($\ast$ \hyperlink{class_s_c_i_run_1_1_reducer_a3abb654769ef87c61f39721a5e806f2c}{Reduction\-Op} )(const T \&, const T \&)
\begin{DoxyCompactList}\small\item\em The function that performs the reduction. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_s_c_i_run_1_1_reducer_a5b07725e2720e5395d5c0ba3365106f2}{Reducer} (const char $\ast$\hyperlink{_boost_graph_example_tests_8cc_a8ad72759d07f18eaf8f6690e5dfb747c}{name}, \hyperlink{class_s_c_i_run_1_1_reducer_a3abb654769ef87c61f39721a5e806f2c}{Reduction\-Op})
\item 
virtual \hyperlink{class_s_c_i_run_1_1_reducer_a33f11c891bf3cf0989bb58059237fa10}{$\sim$\-Reducer} ()
\begin{DoxyCompactList}\small\item\em Destroy the \hyperlink{class_s_c_i_run_1_1_reducer}{Reducer} and free associated memory. \end{DoxyCompactList}\item 
T \hyperlink{class_s_c_i_run_1_1_reducer_a331bdd00295c8556a5e7b023869b2540}{reduce} (int myrank, int num\-Threads, const T \&value)
\end{DoxyCompactItemize}


\subsection{Member Typedef Documentation}
\hypertarget{class_s_c_i_run_1_1_reducer_a3abb654769ef87c61f39721a5e806f2c}{\index{S\-C\-I\-Run\-::\-Reducer@{S\-C\-I\-Run\-::\-Reducer}!Reduction\-Op@{Reduction\-Op}}
\index{Reduction\-Op@{Reduction\-Op}!SCIRun::Reducer@{S\-C\-I\-Run\-::\-Reducer}}
\subsubsection[{Reduction\-Op}]{\setlength{\rightskip}{0pt plus 5cm}typedef T($\ast$ Reduction\-Op)(const T \&, const T \&)}}\label{class_s_c_i_run_1_1_reducer_a3abb654769ef87c61f39721a5e806f2c}


The function that performs the reduction. 



\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_s_c_i_run_1_1_reducer_a5b07725e2720e5395d5c0ba3365106f2}{\index{S\-C\-I\-Run\-::\-Reducer@{S\-C\-I\-Run\-::\-Reducer}!Reducer@{Reducer}}
\index{Reducer@{Reducer}!SCIRun::Reducer@{S\-C\-I\-Run\-::\-Reducer}}
\subsubsection[{Reducer}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Reducer} (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{name, }
\item[{{\bf Reduction\-Op}}]{}
\end{DoxyParamCaption}
)}}\label{class_s_c_i_run_1_1_reducer_a5b07725e2720e5395d5c0ba3365106f2}
Create a {\bfseries  \hyperlink{class_s_c_i_run_1_1_reducer}{Reducer}. At each operation, a barrier wait is performed, and the operation will be performed to compute the global balue. {\itshape name} should be a static string which describes the primitive for debugging purposes. op is a function which will compute a reduced value from a pair of values. op should be associative and commutative, even up to floating point errors. }\hypertarget{class_s_c_i_run_1_1_reducer_a33f11c891bf3cf0989bb58059237fa10}{\index{S\-C\-I\-Run\-::\-Reducer@{S\-C\-I\-Run\-::\-Reducer}!$\sim$\-Reducer@{$\sim$\-Reducer}}
\index{$\sim$\-Reducer@{$\sim$\-Reducer}!SCIRun::Reducer@{S\-C\-I\-Run\-::\-Reducer}}
\subsubsection[{$\sim$\-Reducer}]{\setlength{\rightskip}{0pt plus 5cm}$\sim${\bf Reducer} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}}\label{class_s_c_i_run_1_1_reducer_a33f11c891bf3cf0989bb58059237fa10}


Destroy the \hyperlink{class_s_c_i_run_1_1_reducer}{Reducer} and free associated memory. 



\subsection{Member Function Documentation}
\hypertarget{class_s_c_i_run_1_1_reducer_a331bdd00295c8556a5e7b023869b2540}{\index{S\-C\-I\-Run\-::\-Reducer@{S\-C\-I\-Run\-::\-Reducer}!reduce@{reduce}}
\index{reduce@{reduce}!SCIRun::Reducer@{S\-C\-I\-Run\-::\-Reducer}}
\subsubsection[{reduce}]{\setlength{\rightskip}{0pt plus 5cm}T reduce (
\begin{DoxyParamCaption}
\item[{int}]{myrank, }
\item[{int}]{num\-Threads, }
\item[{const T \&}]{value}
\end{DoxyParamCaption}
)}}\label{class_s_c_i_run_1_1_reducer_a331bdd00295c8556a5e7b023869b2540}
Performs a global reduction over all of the threads. As soon as each thread has called reduce with their local value, each thread will return the same global reduced value. 

The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
Core/\-Thread/\-Legacy/\hyperlink{_reducer_8h}{Reducer.\-h}\end{DoxyCompactItemize}
