\hypertarget{classnntrainer_1_1ParallelBatch}{}\doxysection{nntrainer\+::Parallel\+Batch Class Reference}
\label{classnntrainer_1_1ParallelBatch}\index{nntrainer::ParallelBatch@{nntrainer::ParallelBatch}}


\mbox{\hyperlink{classnntrainer_1_1ParallelBatch}{Parallel\+Batch}} class to parallelize along batch direction.  




{\ttfamily \#include $<$nntr\+\_\+threads.\+h$>$}

\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{classnntrainer_1_1ParallelBatch_a399a120b24f435d61bfd5adac3076559}{Parallel\+Batch}} (unsigned int batch)
\begin{DoxyCompactList}\small\item\em Construct a new \mbox{\hyperlink{classnntrainer_1_1ParallelBatch}{Parallel\+Batch}} object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{classnntrainer_1_1ParallelBatch_a7856092301fce06ab4550b233c1b3099}{Parallel\+Batch}} (threaded\+\_\+cb threaded\+\_\+cb\+\_\+, unsigned int batch, void $\ast$user\+\_\+data\+\_\+)
\begin{DoxyCompactList}\small\item\em Construct a new \mbox{\hyperlink{classnntrainer_1_1ParallelBatch}{Parallel\+Batch}} object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{classnntrainer_1_1ParallelBatch_a18de7e87deb771b147999d5da820e957}{$\sim$\+Parallel\+Batch}} ()
\begin{DoxyCompactList}\small\item\em Destroy the \mbox{\hyperlink{classnntrainer_1_1ParallelBatch}{Parallel\+Batch}} object. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classnntrainer_1_1ParallelBatch_ae0a3b180f9cb6ee28d72ad8a9ad9b1a2}{run}} ()
\begin{DoxyCompactList}\small\item\em Run the workders. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classnntrainer_1_1ParallelBatch_a77540bce30552080061ea80165b72eae}{set\+Callback}} (threaded\+\_\+cb t\+\_\+cb, void $\ast$user\+\_\+data)
\begin{DoxyCompactList}\small\item\em set the thread callback function \end{DoxyCompactList}\item 
unsigned int \mbox{\hyperlink{classnntrainer_1_1ParallelBatch_a841c36f9fa1d5c7e9be38b5c8fd85666}{get\+Num\+Workers}} ()
\begin{DoxyCompactList}\small\item\em return the number of workders \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
\mbox{\hyperlink{classnntrainer_1_1ParallelBatch}{Parallel\+Batch}} class to parallelize along batch direction. 



Definition at line 34 of file nntr\+\_\+threads.\+h.



\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{classnntrainer_1_1ParallelBatch_a399a120b24f435d61bfd5adac3076559}\label{classnntrainer_1_1ParallelBatch_a399a120b24f435d61bfd5adac3076559}} 
\index{nntrainer::ParallelBatch@{nntrainer::ParallelBatch}!ParallelBatch@{ParallelBatch}}
\index{ParallelBatch@{ParallelBatch}!nntrainer::ParallelBatch@{nntrainer::ParallelBatch}}
\doxysubsubsection{\texorpdfstring{ParallelBatch()}{ParallelBatch()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nntrainer\+::\+Parallel\+Batch\+::\+Parallel\+Batch (\begin{DoxyParamCaption}\item[{unsigned int}]{batch }\end{DoxyParamCaption})}



Construct a new \mbox{\hyperlink{classnntrainer_1_1ParallelBatch}{Parallel\+Batch}} object. 


\begin{DoxyParams}{Parameters}
{\em unsigned} & int total number of batch \\
\hline
\end{DoxyParams}


Definition at line 18 of file nntr\+\_\+threads.\+cpp.

\mbox{\Hypertarget{classnntrainer_1_1ParallelBatch_a7856092301fce06ab4550b233c1b3099}\label{classnntrainer_1_1ParallelBatch_a7856092301fce06ab4550b233c1b3099}} 
\index{nntrainer::ParallelBatch@{nntrainer::ParallelBatch}!ParallelBatch@{ParallelBatch}}
\index{ParallelBatch@{ParallelBatch}!nntrainer::ParallelBatch@{nntrainer::ParallelBatch}}
\doxysubsubsection{\texorpdfstring{ParallelBatch()}{ParallelBatch()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily nntrainer\+::\+Parallel\+Batch\+::\+Parallel\+Batch (\begin{DoxyParamCaption}\item[{threaded\+\_\+cb}]{threaded\+\_\+cb\+\_\+,  }\item[{unsigned int}]{batch,  }\item[{void $\ast$}]{user\+\_\+data\+\_\+ }\end{DoxyParamCaption})}



Construct a new \mbox{\hyperlink{classnntrainer_1_1ParallelBatch}{Parallel\+Batch}} object. 


\begin{DoxyParams}{Parameters}
{\em threaded\+\_\+cb} & the function run in thread \\
\hline
{\em unsigned} & int total number of batch \\
\hline
{\em void$\ast$} & user data for the threaded callback function \\
\hline
\end{DoxyParams}


Definition at line 24 of file nntr\+\_\+threads.\+cpp.

\mbox{\Hypertarget{classnntrainer_1_1ParallelBatch_a18de7e87deb771b147999d5da820e957}\label{classnntrainer_1_1ParallelBatch_a18de7e87deb771b147999d5da820e957}} 
\index{nntrainer::ParallelBatch@{nntrainer::ParallelBatch}!````~ParallelBatch@{$\sim$ParallelBatch}}
\index{````~ParallelBatch@{$\sim$ParallelBatch}!nntrainer::ParallelBatch@{nntrainer::ParallelBatch}}
\doxysubsubsection{\texorpdfstring{$\sim$ParallelBatch()}{~ParallelBatch()}}
{\footnotesize\ttfamily nntrainer\+::\+Parallel\+Batch\+::$\sim$\+Parallel\+Batch (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Destroy the \mbox{\hyperlink{classnntrainer_1_1ParallelBatch}{Parallel\+Batch}} object. 



Definition at line 31 of file nntr\+\_\+threads.\+cpp.



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classnntrainer_1_1ParallelBatch_a841c36f9fa1d5c7e9be38b5c8fd85666}\label{classnntrainer_1_1ParallelBatch_a841c36f9fa1d5c7e9be38b5c8fd85666}} 
\index{nntrainer::ParallelBatch@{nntrainer::ParallelBatch}!getNumWorkers@{getNumWorkers}}
\index{getNumWorkers@{getNumWorkers}!nntrainer::ParallelBatch@{nntrainer::ParallelBatch}}
\doxysubsubsection{\texorpdfstring{getNumWorkers()}{getNumWorkers()}}
{\footnotesize\ttfamily unsigned int nntrainer\+::\+Parallel\+Batch\+::get\+Num\+Workers (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



return the number of workders 

\begin{DoxyReturn}{Returns}
unsigned int the number of workers 
\end{DoxyReturn}


Definition at line 77 of file nntr\+\_\+threads.\+h.

\mbox{\Hypertarget{classnntrainer_1_1ParallelBatch_ae0a3b180f9cb6ee28d72ad8a9ad9b1a2}\label{classnntrainer_1_1ParallelBatch_ae0a3b180f9cb6ee28d72ad8a9ad9b1a2}} 
\index{nntrainer::ParallelBatch@{nntrainer::ParallelBatch}!run@{run}}
\index{run@{run}!nntrainer::ParallelBatch@{nntrainer::ParallelBatch}}
\doxysubsubsection{\texorpdfstring{run()}{run()}}
{\footnotesize\ttfamily void nntrainer\+::\+Parallel\+Batch\+::run (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Run the workders. 



Definition at line 33 of file nntr\+\_\+threads.\+cpp.

\mbox{\Hypertarget{classnntrainer_1_1ParallelBatch_a77540bce30552080061ea80165b72eae}\label{classnntrainer_1_1ParallelBatch_a77540bce30552080061ea80165b72eae}} 
\index{nntrainer::ParallelBatch@{nntrainer::ParallelBatch}!setCallback@{setCallback}}
\index{setCallback@{setCallback}!nntrainer::ParallelBatch@{nntrainer::ParallelBatch}}
\doxysubsubsection{\texorpdfstring{setCallback()}{setCallback()}}
{\footnotesize\ttfamily void nntrainer\+::\+Parallel\+Batch\+::set\+Callback (\begin{DoxyParamCaption}\item[{threaded\+\_\+cb}]{t\+\_\+cb,  }\item[{void $\ast$}]{user\+\_\+data }\end{DoxyParamCaption})}



set the thread callback function 


\begin{DoxyParams}{Parameters}
{\em Threadedcb} & the function run in thread \\
\hline
{\em void$\ast$} & user data for the threaded callback function \\
\hline
\end{DoxyParams}


Definition at line 56 of file nntr\+\_\+threads.\+cpp.



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
utils/\mbox{\hyperlink{nntr__threads_8h}{nntr\+\_\+threads.\+h}}\item 
utils/\mbox{\hyperlink{nntr__threads_8cpp}{nntr\+\_\+threads.\+cpp}}\end{DoxyCompactItemize}
