\hypertarget{classnntrainer_1_1profile_1_1GenericProfileListener}{}\doxysection{nntrainer\+::profile\+::Generic\+Profile\+Listener Class Reference}
\label{classnntrainer_1_1profile_1_1GenericProfileListener}\index{nntrainer::profile::GenericProfileListener@{nntrainer::profile::GenericProfileListener}}


Generic \mbox{\hyperlink{classnntrainer_1_1profile_1_1Profiler}{Profiler}} Listener.  




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



Inheritance diagram for nntrainer\+::profile\+::Generic\+Profile\+Listener\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=210pt]{classnntrainer_1_1profile_1_1GenericProfileListener__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for nntrainer\+::profile\+::Generic\+Profile\+Listener\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=210pt]{classnntrainer_1_1profile_1_1GenericProfileListener__coll__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{classnntrainer_1_1profile_1_1GenericProfileListener_abf46f97c5d67800ba0787883d602fa96}{Generic\+Profile\+Listener}} (int warmups\+\_\+=0)
\begin{DoxyCompactList}\small\item\em Construct a new Generic\+Profile Listener object. \end{DoxyCompactList}\item 
virtual \mbox{\hyperlink{classnntrainer_1_1profile_1_1GenericProfileListener_a04d565ddbb649aa1b105272fb6f6e3d7}{$\sim$\+Generic\+Profile\+Listener}} ()=default
\begin{DoxyCompactList}\small\item\em Destroy the Generic Profile Listener object. \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{classnntrainer_1_1profile_1_1GenericProfileListener_a9a40862db6296312535d58b2cc5ba1a8}{notify}} (P\+R\+O\+F\+I\+L\+E\+\_\+\+E\+V\+E\+NT event, const std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{structnntrainer_1_1profile_1_1ProfileEventData}{Profile\+Event\+Data}} $>$ data) override
\begin{DoxyCompactList}\small\item\em A callback function to be called from a profiler. \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{classnntrainer_1_1profile_1_1GenericProfileListener_acc6723e5c824045f30e21f3f55ae87df}{reset}} (const int time\+\_\+item, const std\+::string \&str) override
\item 
virtual const std\+::chrono\+::microseconds \mbox{\hyperlink{classnntrainer_1_1profile_1_1GenericProfileListener_a252b9fd90c69e3ccf3f47f4a3f908cde}{result}} (const int event) override
\begin{DoxyCompactList}\small\item\em get the latest result of a event \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{classnntrainer_1_1profile_1_1GenericProfileListener_a3a4da9abcef9415635310cfce487d5e1}{report}} (std\+::ostream \&out) const override
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Generic \mbox{\hyperlink{classnntrainer_1_1profile_1_1Profiler}{Profiler}} Listener. 



Definition at line 202 of file profiler.\+h.



\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{classnntrainer_1_1profile_1_1GenericProfileListener_abf46f97c5d67800ba0787883d602fa96}\label{classnntrainer_1_1profile_1_1GenericProfileListener_abf46f97c5d67800ba0787883d602fa96}} 
\index{nntrainer::profile::GenericProfileListener@{nntrainer::profile::GenericProfileListener}!GenericProfileListener@{GenericProfileListener}}
\index{GenericProfileListener@{GenericProfileListener}!nntrainer::profile::GenericProfileListener@{nntrainer::profile::GenericProfileListener}}
\doxysubsubsection{\texorpdfstring{GenericProfileListener()}{GenericProfileListener()}}
{\footnotesize\ttfamily nntrainer\+::profile\+::\+Generic\+Profile\+Listener\+::\+Generic\+Profile\+Listener (\begin{DoxyParamCaption}\item[{int}]{warmups\+\_\+ = {\ttfamily 0} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [explicit]}}



Construct a new Generic\+Profile Listener object. 


\begin{DoxyParams}{Parameters}
{\em warmups\+\_\+} & ignore first {\itshape warmups\+\_\+} records when making time report \\
\hline
\end{DoxyParams}


Definition at line 209 of file profiler.\+h.

\mbox{\Hypertarget{classnntrainer_1_1profile_1_1GenericProfileListener_a04d565ddbb649aa1b105272fb6f6e3d7}\label{classnntrainer_1_1profile_1_1GenericProfileListener_a04d565ddbb649aa1b105272fb6f6e3d7}} 
\index{nntrainer::profile::GenericProfileListener@{nntrainer::profile::GenericProfileListener}!````~GenericProfileListener@{$\sim$GenericProfileListener}}
\index{````~GenericProfileListener@{$\sim$GenericProfileListener}!nntrainer::profile::GenericProfileListener@{nntrainer::profile::GenericProfileListener}}
\doxysubsubsection{\texorpdfstring{$\sim$GenericProfileListener()}{~GenericProfileListener()}}
{\footnotesize\ttfamily virtual nntrainer\+::profile\+::\+Generic\+Profile\+Listener\+::$\sim$\+Generic\+Profile\+Listener (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}, {\ttfamily [default]}}



Destroy the Generic Profile Listener object. 



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classnntrainer_1_1profile_1_1GenericProfileListener_a9a40862db6296312535d58b2cc5ba1a8}\label{classnntrainer_1_1profile_1_1GenericProfileListener_a9a40862db6296312535d58b2cc5ba1a8}} 
\index{nntrainer::profile::GenericProfileListener@{nntrainer::profile::GenericProfileListener}!notify@{notify}}
\index{notify@{notify}!nntrainer::profile::GenericProfileListener@{nntrainer::profile::GenericProfileListener}}
\doxysubsubsection{\texorpdfstring{notify()}{notify()}}
{\footnotesize\ttfamily void nntrainer\+::profile\+::\+Generic\+Profile\+Listener\+::notify (\begin{DoxyParamCaption}\item[{P\+R\+O\+F\+I\+L\+E\+\_\+\+E\+V\+E\+NT}]{event,  }\item[{const std\+::shared\+\_\+ptr$<$ \mbox{\hyperlink{structnntrainer_1_1profile_1_1ProfileEventData}{Profile\+Event\+Data}} $>$}]{data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}



A callback function to be called from a profiler. 


\begin{DoxyParams}{Parameters}
{\em event} & event type \\
\hline
{\em data} & event data \\
\hline
\end{DoxyParams}


Implements \mbox{\hyperlink{classnntrainer_1_1profile_1_1ProfileListener_a66a4a0fc3ad571d9e22a74b333491d83}{nntrainer\+::profile\+::\+Profile\+Listener}}.



Definition at line 74 of file profiler.\+cpp.

\mbox{\Hypertarget{classnntrainer_1_1profile_1_1GenericProfileListener_a3a4da9abcef9415635310cfce487d5e1}\label{classnntrainer_1_1profile_1_1GenericProfileListener_a3a4da9abcef9415635310cfce487d5e1}} 
\index{nntrainer::profile::GenericProfileListener@{nntrainer::profile::GenericProfileListener}!report@{report}}
\index{report@{report}!nntrainer::profile::GenericProfileListener@{nntrainer::profile::GenericProfileListener}}
\doxysubsubsection{\texorpdfstring{report()}{report()}}
{\footnotesize\ttfamily void nntrainer\+::profile\+::\+Generic\+Profile\+Listener\+::report (\begin{DoxyParamCaption}\item[{std\+::ostream \&}]{out }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}





creating header

calculate metrics while skipping warmups

creating header

Implements \mbox{\hyperlink{classnntrainer_1_1profile_1_1ProfileListener_a67ba452abc15d797679adecce2995e8a}{nntrainer\+::profile\+::\+Profile\+Listener}}.



Definition at line 118 of file profiler.\+cpp.

\mbox{\Hypertarget{classnntrainer_1_1profile_1_1GenericProfileListener_acc6723e5c824045f30e21f3f55ae87df}\label{classnntrainer_1_1profile_1_1GenericProfileListener_acc6723e5c824045f30e21f3f55ae87df}} 
\index{nntrainer::profile::GenericProfileListener@{nntrainer::profile::GenericProfileListener}!reset@{reset}}
\index{reset@{reset}!nntrainer::profile::GenericProfileListener@{nntrainer::profile::GenericProfileListener}}
\doxysubsubsection{\texorpdfstring{reset()}{reset()}}
{\footnotesize\ttfamily void nntrainer\+::profile\+::\+Generic\+Profile\+Listener\+::reset (\begin{DoxyParamCaption}\item[{const int}]{time\+\_\+item,  }\item[{const std\+::string \&}]{str }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}







Implements \mbox{\hyperlink{classnntrainer_1_1profile_1_1ProfileListener_a475d380c455d781457eb7e3952c20e20}{nntrainer\+::profile\+::\+Profile\+Listener}}.



Definition at line 96 of file profiler.\+cpp.

\mbox{\Hypertarget{classnntrainer_1_1profile_1_1GenericProfileListener_a252b9fd90c69e3ccf3f47f4a3f908cde}\label{classnntrainer_1_1profile_1_1GenericProfileListener_a252b9fd90c69e3ccf3f47f4a3f908cde}} 
\index{nntrainer::profile::GenericProfileListener@{nntrainer::profile::GenericProfileListener}!result@{result}}
\index{result@{result}!nntrainer::profile::GenericProfileListener@{nntrainer::profile::GenericProfileListener}}
\doxysubsubsection{\texorpdfstring{result()}{result()}}
{\footnotesize\ttfamily const std\+::chrono\+::microseconds nntrainer\+::profile\+::\+Generic\+Profile\+Listener\+::result (\begin{DoxyParamCaption}\item[{const int}]{event }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}



get the latest result of a event 


\begin{DoxyParams}{Parameters}
{\em time\+\_\+item} & time item to query the result \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
const std\+::chrono\+::microseconds 
\end{DoxyReturn}


Implements \mbox{\hyperlink{classnntrainer_1_1profile_1_1ProfileListener_a02c29300a7cd5d72ec1d8bda5e1f06a2}{nntrainer\+::profile\+::\+Profile\+Listener}}.



Definition at line 105 of file profiler.\+cpp.



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
utils/\mbox{\hyperlink{profiler_8h}{profiler.\+h}}\item 
utils/\mbox{\hyperlink{profiler_8cpp}{profiler.\+cpp}}\end{DoxyCompactItemize}
