\hypertarget{profiler_8h}{}\doxysection{utils/profiler.h File Reference}
\label{profiler_8h}\index{utils/profiler.h@{utils/profiler.h}}


Profiler related codes to be used to benchmark things.  


{\ttfamily \#include $<$chrono$>$}\newline
{\ttfamily \#include $<$future$>$}\newline
{\ttfamily \#include $<$iosfwd$>$}\newline
{\ttfamily \#include $<$list$>$}\newline
{\ttfamily \#include $<$mutex$>$}\newline
{\ttfamily \#include $<$set$>$}\newline
{\ttfamily \#include $<$string$>$}\newline
{\ttfamily \#include $<$unordered\+\_\+map$>$}\newline
{\ttfamily \#include $<$unordered\+\_\+set$>$}\newline
{\ttfamily \#include $<$vector$>$}\newline
Include dependency graph for profiler.\+h\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{profiler_8h__incl}
\end{center}
\end{figure}
This graph shows which files directly or indirectly include this file\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{profiler_8h__dep__incl}
\end{center}
\end{figure}
\doxysubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{structnntrainer_1_1profile_1_1ProfileEventData}{nntrainer\+::profile\+::\+Profile\+Event\+Data}}
\begin{DoxyCompactList}\small\item\em Data for each profile event. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classnntrainer_1_1profile_1_1ProfileListener}{nntrainer\+::profile\+::\+Profile\+Listener}}
\begin{DoxyCompactList}\small\item\em Generic profile listener class to attach to a profiler, this can be inherited to create a custom profile listener. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classnntrainer_1_1profile_1_1GenericProfileListener}{nntrainer\+::profile\+::\+Generic\+Profile\+Listener}}
\begin{DoxyCompactList}\small\item\em Generic \mbox{\hyperlink{classnntrainer_1_1profile_1_1Profiler}{Profiler}} Listener. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classnntrainer_1_1profile_1_1Profiler}{nntrainer\+::profile\+::\+Profiler}}
\begin{DoxyCompactList}\small\item\em \mbox{\hyperlink{classnntrainer_1_1profile_1_1Profiler}{Profiler}} object. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Namespaces}
\begin{DoxyCompactItemize}
\item 
 \mbox{\hyperlink{namespacenntrainer}{nntrainer}}
\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{profiler_8h_adb858152ea7bbd1170ca28e5be0a2f9a}\label{profiler_8h_adb858152ea7bbd1170ca28e5be0a2f9a}} 
\#define {\bfseries P\+R\+O\+F\+I\+L\+E\+\_\+\+T\+I\+M\+E\+\_\+\+S\+T\+A\+RT}(event\+\_\+key)
\item 
\mbox{\Hypertarget{profiler_8h_aa5bf500ffe26736e28666fdafed3a5e7}\label{profiler_8h_aa5bf500ffe26736e28666fdafed3a5e7}} 
\#define {\bfseries P\+R\+O\+F\+I\+L\+E\+\_\+\+T\+I\+M\+E\+\_\+\+E\+ND}(event\+\_\+key)
\item 
\mbox{\Hypertarget{profiler_8h_a3da87c5b3263db6ad2c819968714dff6}\label{profiler_8h_a3da87c5b3263db6ad2c819968714dff6}} 
\#define {\bfseries P\+R\+O\+F\+I\+L\+E\+\_\+\+T\+I\+M\+E\+\_\+\+R\+E\+G\+I\+S\+T\+E\+R\+\_\+\+E\+V\+E\+NT}(event\+\_\+key,  event\+\_\+str)
\item 
\mbox{\Hypertarget{profiler_8h_a02efc2be9d66d84df3aa8eb373aaf59b}\label{profiler_8h_a02efc2be9d66d84df3aa8eb373aaf59b}} 
\#define {\bfseries P\+R\+O\+F\+I\+L\+E\+\_\+\+M\+E\+M\+\_\+\+A\+L\+L\+OC}(ptr,  size,  str)
\item 
\mbox{\Hypertarget{profiler_8h_ae387e06c1ff40ed02ba6be5d9924f75c}\label{profiler_8h_ae387e06c1ff40ed02ba6be5d9924f75c}} 
\#define {\bfseries P\+R\+O\+F\+I\+L\+E\+\_\+\+M\+E\+M\+\_\+\+D\+E\+A\+L\+L\+OC}(ptr)
\item 
\mbox{\Hypertarget{profiler_8h_ab519de732c19bb73f2483b824f756177}\label{profiler_8h_ab519de732c19bb73f2483b824f756177}} 
\#define {\bfseries P\+R\+O\+F\+I\+L\+E\+\_\+\+C\+A\+C\+H\+E\+\_\+\+A\+L\+L\+OC}(ptr,  size,  str,  policy,  swap)
\item 
\mbox{\Hypertarget{profiler_8h_a3c45a4f3fe092cad819d6f30abcbd9da}\label{profiler_8h_a3c45a4f3fe092cad819d6f30abcbd9da}} 
\#define {\bfseries P\+R\+O\+F\+I\+L\+E\+\_\+\+C\+A\+C\+H\+E\+\_\+\+D\+E\+A\+L\+L\+OC}(ptr,  policy,  swap)
\item 
\mbox{\Hypertarget{profiler_8h_a58ef8cac09c4598d3ccbd4b482783930}\label{profiler_8h_a58ef8cac09c4598d3ccbd4b482783930}} 
\#define {\bfseries P\+R\+O\+F\+I\+L\+E\+\_\+\+B\+E\+G\+IN}(listener)
\item 
\mbox{\Hypertarget{profiler_8h_a34c1d358f4a9bf2296b399b2a86692fa}\label{profiler_8h_a34c1d358f4a9bf2296b399b2a86692fa}} 
\#define {\bfseries P\+R\+O\+F\+I\+L\+E\+\_\+\+E\+ND}(listener)
\item 
\mbox{\Hypertarget{profiler_8h_a25f084c59440abf623b1347aca6d4794}\label{profiler_8h_a25f084c59440abf623b1347aca6d4794}} 
\#define {\bfseries P\+R\+O\+F\+I\+L\+E\+\_\+\+M\+E\+M\+\_\+\+A\+N\+N\+O\+T\+A\+TE}(str)
\end{DoxyCompactItemize}
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{profiler_8h_a4a3c239df20c1c2c25379bbf561a9964}\label{profiler_8h_a4a3c239df20c1c2c25379bbf561a9964}} 
using {\bfseries timepoint} = std\+::chrono\+::time\+\_\+point$<$ std\+::chrono\+::steady\+\_\+clock $>$
\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{profiler_8h_ab880858d07664616cc3b65b1a094c99f}\label{profiler_8h_ab880858d07664616cc3b65b1a094c99f}} 
enum {\bfseries P\+R\+O\+F\+I\+L\+E\+\_\+\+E\+V\+E\+NT} \{ \newline
{\bfseries E\+V\+E\+N\+T\+\_\+\+T\+I\+M\+E\+\_\+\+S\+T\+A\+RT} = 0, 
{\bfseries E\+V\+E\+N\+T\+\_\+\+T\+I\+M\+E\+\_\+\+E\+ND} = 1, 
{\bfseries E\+V\+E\+N\+T\+\_\+\+M\+E\+M\+\_\+\+A\+L\+L\+OC} = 2, 
{\bfseries E\+V\+E\+N\+T\+\_\+\+M\+E\+M\+\_\+\+D\+E\+A\+L\+L\+OC} = 3, 
\newline
{\bfseries E\+V\+E\+N\+T\+\_\+\+M\+E\+M\+\_\+\+A\+N\+N\+O\+T\+A\+TE} = 4
 \}
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{profiler_8h_a2e63f6f47c3490d3750eea17092c4ad4}\label{profiler_8h_a2e63f6f47c3490d3750eea17092c4ad4}} 
{\footnotesize template$<$typename T , typename std\+::enable\+\_\+if\+\_\+t$<$ std\+::is\+\_\+base\+\_\+of$<$ Profile\+Listener, T $>$\+::value, T $>$ $\ast$  = nullptr$>$ }\\std\+::ostream \& \mbox{\hyperlink{profiler_8h_a2e63f6f47c3490d3750eea17092c4ad4}{nntrainer\+::profile\+::operator$<$$<$}} (std\+::ostream \&out, T \&l)
\begin{DoxyCompactList}\small\item\em Overriding output stream for layers and it\textquotesingle{}s derived class. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Profiler related codes to be used to benchmark things. 

Copyright (C) 2020 Jihoon Lee \href{mailto:jhoon.it.lee@samsung.com}{\texttt{ jhoon.\+it.\+lee@samsung.\+com}}

\begin{DoxyDate}{Date}
09 December 2020 
\end{DoxyDate}
\begin{DoxySeeAlso}{See also}
\href{https://github.com/nnstreamer/nntrainer}{\texttt{ https\+://github.\+com/nnstreamer/nntrainer}} 
\end{DoxySeeAlso}
\begin{DoxyAuthor}{Author}
Jihoon Lee \href{mailto:jhoon.it.lee@samsung.com}{\texttt{ jhoon.\+it.\+lee@samsung.\+com}} 
\end{DoxyAuthor}
\begin{DoxyRefDesc}{Bug}
\item[\mbox{\hyperlink{bug__bug000243}{Bug}}]No known bugs except for N\+YI items\end{DoxyRefDesc}
