\hypertarget{classnntrainer_1_1TaskAsync}{}\doxysection{nntrainer\+::Task\+Async$<$ T $>$ Class Template Reference}
\label{classnntrainer_1_1TaskAsync}\index{nntrainer::TaskAsync$<$ T $>$@{nntrainer::TaskAsync$<$ T $>$}}


Async task class.  




{\ttfamily \#include $<$task.\+h$>$}



Inheritance diagram for nntrainer\+::Task\+Async$<$ T $>$\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=226pt]{classnntrainer_1_1TaskAsync__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for nntrainer\+::Task\+Async$<$ T $>$\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=226pt]{classnntrainer_1_1TaskAsync__coll__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classnntrainer_1_1TaskAsync_a19665774651078dd91210845c2194fd7}\label{classnntrainer_1_1TaskAsync_a19665774651078dd91210845c2194fd7}} 
enum {\bfseries Priority} \{ {\bfseries H\+I\+GH}, 
{\bfseries M\+ID}, 
{\bfseries L\+OW}
 \}
\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{classnntrainer_1_1TaskAsync_ac37499c3b65e2562a917c2008157091d}{Task\+Async}} (\mbox{\hyperlink{classnntrainer_1_1Task_a7c5e468f05bb723a3b8c6316053ce624}{Work}} work, void $\ast$user\+\_\+data)
\begin{DoxyCompactList}\small\item\em \mbox{\hyperlink{classnntrainer_1_1TaskAsync}{Task\+Async}} constructor. \end{DoxyCompactList}\item 
virtual \mbox{\hyperlink{classnntrainer_1_1TaskAsync_ab52bce625e501cb9fb0eec633eda1259}{$\sim$\+Task\+Async}} ()=default
\begin{DoxyCompactList}\small\item\em \mbox{\hyperlink{classnntrainer_1_1TaskAsync}{Task\+Async}} destructor. \end{DoxyCompactList}\item 
virtual const \mbox{\hyperlink{classnntrainer_1_1Task_a9389d115a1f7c46520b7dd1de3060862}{Task\+::\+Type}} \mbox{\hyperlink{classnntrainer_1_1TaskAsync_a0b59a1e1fb217951712742e6f0cb661c}{get\+Type}} (void) override
\begin{DoxyCompactList}\small\item\em Get type of task. \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{classnntrainer_1_1TaskAsync_a0096da34a2d150552a793d354062ab33}{set\+Timeout}} (int64\+\_\+t time)
\begin{DoxyCompactList}\small\item\em Set timeout. \end{DoxyCompactList}\item 
virtual int64\+\_\+t \mbox{\hyperlink{classnntrainer_1_1TaskAsync_a6460105d73887f769df20f895a280a1b}{get\+Timeout}} (void) const
\begin{DoxyCompactList}\small\item\em Get timeout. \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{classnntrainer_1_1TaskAsync_a810476a65e6abcabf1255c89dd0ad53b}{set\+Priority}} (Priority pri)
\begin{DoxyCompactList}\small\item\em Set priority. \end{DoxyCompactList}\item 
virtual Priority \mbox{\hyperlink{classnntrainer_1_1TaskAsync_a2f2822a6720713e113311ff23d9b18cd}{get\+Priority}} ()
\begin{DoxyCompactList}\small\item\em Get priority. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
\subsubsection*{template$<$typename T = std\+::chrono\+::milliseconds$>$\newline
class nntrainer\+::\+Task\+Async$<$ T $>$}

Async task class. 

Definition at line 120 of file task.\+h.



\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{classnntrainer_1_1TaskAsync_ac37499c3b65e2562a917c2008157091d}\label{classnntrainer_1_1TaskAsync_ac37499c3b65e2562a917c2008157091d}} 
\index{nntrainer::TaskAsync$<$ T $>$@{nntrainer::TaskAsync$<$ T $>$}!TaskAsync@{TaskAsync}}
\index{TaskAsync@{TaskAsync}!nntrainer::TaskAsync$<$ T $>$@{nntrainer::TaskAsync$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{TaskAsync()}{TaskAsync()}}
{\footnotesize\ttfamily template$<$typename T  = std\+::chrono\+::milliseconds$>$ \\
\mbox{\hyperlink{classnntrainer_1_1TaskAsync}{nntrainer\+::\+Task\+Async}}$<$ T $>$\+::\mbox{\hyperlink{classnntrainer_1_1TaskAsync}{Task\+Async}} (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classnntrainer_1_1Task_a7c5e468f05bb723a3b8c6316053ce624}{Work}}}]{work,  }\item[{void $\ast$}]{user\+\_\+data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [explicit]}}



\mbox{\hyperlink{classnntrainer_1_1TaskAsync}{Task\+Async}} constructor. 



Definition at line 132 of file task.\+h.

\mbox{\Hypertarget{classnntrainer_1_1TaskAsync_ab52bce625e501cb9fb0eec633eda1259}\label{classnntrainer_1_1TaskAsync_ab52bce625e501cb9fb0eec633eda1259}} 
\index{nntrainer::TaskAsync$<$ T $>$@{nntrainer::TaskAsync$<$ T $>$}!````~TaskAsync@{$\sim$TaskAsync}}
\index{````~TaskAsync@{$\sim$TaskAsync}!nntrainer::TaskAsync$<$ T $>$@{nntrainer::TaskAsync$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{$\sim$TaskAsync()}{~TaskAsync()}}
{\footnotesize\ttfamily template$<$typename T  = std\+::chrono\+::milliseconds$>$ \\
virtual \mbox{\hyperlink{classnntrainer_1_1TaskAsync}{nntrainer\+::\+Task\+Async}}$<$ T $>$\+::$\sim$\mbox{\hyperlink{classnntrainer_1_1TaskAsync}{Task\+Async}} (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}, {\ttfamily [default]}}



\mbox{\hyperlink{classnntrainer_1_1TaskAsync}{Task\+Async}} destructor. 



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classnntrainer_1_1TaskAsync_a2f2822a6720713e113311ff23d9b18cd}\label{classnntrainer_1_1TaskAsync_a2f2822a6720713e113311ff23d9b18cd}} 
\index{nntrainer::TaskAsync$<$ T $>$@{nntrainer::TaskAsync$<$ T $>$}!getPriority@{getPriority}}
\index{getPriority@{getPriority}!nntrainer::TaskAsync$<$ T $>$@{nntrainer::TaskAsync$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{getPriority()}{getPriority()}}
{\footnotesize\ttfamily template$<$typename T  = std\+::chrono\+::milliseconds$>$ \\
virtual Priority \mbox{\hyperlink{classnntrainer_1_1TaskAsync}{nntrainer\+::\+Task\+Async}}$<$ T $>$\+::get\+Priority (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Get priority. 

\begin{DoxyReturn}{Returns}
priority of task 
\end{DoxyReturn}


Definition at line 176 of file task.\+h.

\mbox{\Hypertarget{classnntrainer_1_1TaskAsync_a6460105d73887f769df20f895a280a1b}\label{classnntrainer_1_1TaskAsync_a6460105d73887f769df20f895a280a1b}} 
\index{nntrainer::TaskAsync$<$ T $>$@{nntrainer::TaskAsync$<$ T $>$}!getTimeout@{getTimeout}}
\index{getTimeout@{getTimeout}!nntrainer::TaskAsync$<$ T $>$@{nntrainer::TaskAsync$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{getTimeout()}{getTimeout()}}
{\footnotesize\ttfamily template$<$typename T  = std\+::chrono\+::milliseconds$>$ \\
virtual int64\+\_\+t \mbox{\hyperlink{classnntrainer_1_1TaskAsync}{nntrainer\+::\+Task\+Async}}$<$ T $>$\+::get\+Timeout (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Get timeout. 


\begin{DoxyParams}{Parameters}
{\em time} & timeout in T \\
\hline
\end{DoxyParams}


Definition at line 162 of file task.\+h.

\mbox{\Hypertarget{classnntrainer_1_1TaskAsync_a0b59a1e1fb217951712742e6f0cb661c}\label{classnntrainer_1_1TaskAsync_a0b59a1e1fb217951712742e6f0cb661c}} 
\index{nntrainer::TaskAsync$<$ T $>$@{nntrainer::TaskAsync$<$ T $>$}!getType@{getType}}
\index{getType@{getType}!nntrainer::TaskAsync$<$ T $>$@{nntrainer::TaskAsync$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{getType()}{getType()}}
{\footnotesize\ttfamily template$<$typename T  = std\+::chrono\+::milliseconds$>$ \\
virtual const \mbox{\hyperlink{classnntrainer_1_1Task_a9389d115a1f7c46520b7dd1de3060862}{Task\+::\+Type}} \mbox{\hyperlink{classnntrainer_1_1TaskAsync}{nntrainer\+::\+Task\+Async}}$<$ T $>$\+::get\+Type (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [override]}, {\ttfamily [virtual]}}



Get type of task. 

\begin{DoxyReturn}{Returns}
type of task \mbox{\hyperlink{classnntrainer_1_1Task_a9389d115a1f7c46520b7dd1de3060862}{Task\+::\+Type}} 
\end{DoxyReturn}


Reimplemented from \mbox{\hyperlink{classnntrainer_1_1Task_a0a5d6b0abff12bc09a1c6b30ac7e9dff}{nntrainer\+::\+Task}}.



Definition at line 148 of file task.\+h.

\mbox{\Hypertarget{classnntrainer_1_1TaskAsync_a810476a65e6abcabf1255c89dd0ad53b}\label{classnntrainer_1_1TaskAsync_a810476a65e6abcabf1255c89dd0ad53b}} 
\index{nntrainer::TaskAsync$<$ T $>$@{nntrainer::TaskAsync$<$ T $>$}!setPriority@{setPriority}}
\index{setPriority@{setPriority}!nntrainer::TaskAsync$<$ T $>$@{nntrainer::TaskAsync$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{setPriority()}{setPriority()}}
{\footnotesize\ttfamily template$<$typename T  = std\+::chrono\+::milliseconds$>$ \\
virtual void \mbox{\hyperlink{classnntrainer_1_1TaskAsync}{nntrainer\+::\+Task\+Async}}$<$ T $>$\+::set\+Priority (\begin{DoxyParamCaption}\item[{Priority}]{pri }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Set priority. 


\begin{DoxyParams}{Parameters}
{\em pri} & priority to be set \\
\hline
\end{DoxyParams}


Definition at line 169 of file task.\+h.

\mbox{\Hypertarget{classnntrainer_1_1TaskAsync_a0096da34a2d150552a793d354062ab33}\label{classnntrainer_1_1TaskAsync_a0096da34a2d150552a793d354062ab33}} 
\index{nntrainer::TaskAsync$<$ T $>$@{nntrainer::TaskAsync$<$ T $>$}!setTimeout@{setTimeout}}
\index{setTimeout@{setTimeout}!nntrainer::TaskAsync$<$ T $>$@{nntrainer::TaskAsync$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{setTimeout()}{setTimeout()}}
{\footnotesize\ttfamily template$<$typename T  = std\+::chrono\+::milliseconds$>$ \\
virtual void \mbox{\hyperlink{classnntrainer_1_1TaskAsync}{nntrainer\+::\+Task\+Async}}$<$ T $>$\+::set\+Timeout (\begin{DoxyParamCaption}\item[{int64\+\_\+t}]{time }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Set timeout. 


\begin{DoxyParams}{Parameters}
{\em time} & timeout in T \\
\hline
\end{DoxyParams}


Definition at line 155 of file task.\+h.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
tensor/\mbox{\hyperlink{task_8h}{task.\+h}}\end{DoxyCompactItemize}
