\hypertarget{namespacemom__cpu__clock}{}\section{mom\+\_\+cpu\+\_\+clock Module Reference}
\label{namespacemom__cpu__clock}\index{mom\+\_\+cpu\+\_\+clock@{mom\+\_\+cpu\+\_\+clock}}


\subsection{Detailed Description}
Wraps the M\+PP cpu clock functions. \subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
integer function, public \hyperlink{namespacemom__cpu__clock_a7fda795074ed5ec5b00a26e7531c14f3}{cpu\+\_\+clock\+\_\+id} (name, synchro\+\_\+flag, grain)
\begin{DoxyCompactList}\small\item\em cpu\+\_\+clock\+\_\+id returns the integer handle for a named C\+PU clock. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{namespacemom__cpu__clock_a7fda795074ed5ec5b00a26e7531c14f3}\label{namespacemom__cpu__clock_a7fda795074ed5ec5b00a26e7531c14f3}} 
\index{mom\+\_\+cpu\+\_\+clock@{mom\+\_\+cpu\+\_\+clock}!cpu\+\_\+clock\+\_\+id@{cpu\+\_\+clock\+\_\+id}}
\index{cpu\+\_\+clock\+\_\+id@{cpu\+\_\+clock\+\_\+id}!mom\+\_\+cpu\+\_\+clock@{mom\+\_\+cpu\+\_\+clock}}
\subsubsection{\texorpdfstring{cpu\+\_\+clock\+\_\+id()}{cpu\_clock\_id()}}
{\footnotesize\ttfamily integer function, public mom\+\_\+cpu\+\_\+clock\+::cpu\+\_\+clock\+\_\+id (\begin{DoxyParamCaption}\item[{character(len=$\ast$), intent(in)}]{name,  }\item[{integer, intent(in), optional}]{synchro\+\_\+flag,  }\item[{integer, intent(in), optional}]{grain }\end{DoxyParamCaption})}



cpu\+\_\+clock\+\_\+id returns the integer handle for a named C\+PU clock. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em name} & The unique name of the C\+PU clock\\
\hline
\mbox{\tt in}  & {\em synchro\+\_\+flag} & An integer flag that controls whether the P\+Es are synchronized before the cpu clocks start counting. Synchronization occurs before the start of a clock if this is odd, while additional (expensive) statistics can set for other values. If absent, the default is taken from the settings for F\+MS.\\
\hline
\mbox{\tt in}  & {\em grain} & The timing granularity for this clock, usually set to the values of C\+L\+O\+C\+K\+\_\+\+C\+O\+M\+P\+O\+N\+E\+NT, C\+L\+O\+C\+K\+\_\+\+R\+O\+U\+T\+I\+NE, C\+L\+O\+C\+K\+\_\+\+L\+O\+OP, etc.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The integer C\+PU clock handle. 
\end{DoxyReturn}


Definition at line 23 of file M\+O\+M\+\_\+cpu\+\_\+clock.\+F90.


\begin{DoxyCode}
23   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: name\textcolor{comment}{  !< The unique name of the CPU clock}
24   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional} :: synchro\_flag\textcolor{comment}{ !< An integer flag that controls whether the PEs}
25 \textcolor{comment}{                                       !! are synchronized before the cpu clocks start counting.}
26 \textcolor{comment}{                                       !! Synchronization occurs before the start of a clock if this}
27 \textcolor{comment}{                                       !! is odd, while additional (expensive) statistics can set}
28 \textcolor{comment}{                                       !! for other values. If absent, the default is taken from the}
29 \textcolor{comment}{                                       !! settings for FMS.}
30   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional} :: grain\textcolor{comment}{ !< The timing granularity for this clock, usually set to}
31 \textcolor{comment}{                                       !! the values of CLOCK\_COMPONENT, CLOCK\_ROUTINE, CLOCK\_LOOP, etc.}
32   \textcolor{keywordtype}{integer}                       :: cpu\_clock\_id\textcolor{comment}{ !< The integer CPU clock handle.}
33 
34   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(synchro\_flag)) \textcolor{keywordflow}{then}
35     cpu\_clock\_id = mpp\_clock\_id(name, flags=synchro\_flag, grain=grain)
36   \textcolor{keywordflow}{else}
37     cpu\_clock\_id = mpp\_clock\_id(name, flags=clock\_flag\_default, grain=grain)
38 \textcolor{keywordflow}{  endif}
39 
\end{DoxyCode}
