\hypertarget{namespacedc__clock}{}\section{dc\+\_\+clock Module Reference}
\label{namespacedc__clock}\index{dc\+\_\+clock@{dc\+\_\+clock}}
\subsection*{Data Types}
\begin{DoxyCompactItemize}
\item 
type \hyperlink{structdc__clock_1_1clock}{clock}
\item 
interface \hyperlink{interfacedc__clock_1_1close}{close}
\item 
interface \hyperlink{interfacedc__clock_1_1create}{create}
\item 
interface \hyperlink{interfacedc__clock_1_1dcclockclose}{dcclockclose}
\item 
interface \hyperlink{interfacedc__clock_1_1dcclockcreate}{dcclockcreate}
\item 
interface \hyperlink{interfacedc__clock_1_1dcclockevalsec}{dcclockevalsec}
\item 
interface \hyperlink{interfacedc__clock_1_1dcclockget}{dcclockget}
\item 
interface \hyperlink{interfacedc__clock_1_1dcclockpredict}{dcclockpredict}
\item 
interface \hyperlink{interfacedc__clock_1_1dcclockputline}{dcclockputline}
\item 
interface \hyperlink{interfacedc__clock_1_1dcclockresult}{dcclockresult}
\item 
interface \hyperlink{interfacedc__clock_1_1dcclocksetname}{dcclocksetname}
\item 
interface \hyperlink{interfacedc__clock_1_1dcclockstart}{dcclockstart}
\item 
interface \hyperlink{interfacedc__clock_1_1dcclockstop}{dcclockstop}
\item 
interface \hyperlink{interfacedc__clock_1_1dcclocktochar}{dcclocktochar}
\item 
interface \hyperlink{interfacedc__clock_1_1evalsec}{evalsec}
\item 
interface \hyperlink{interfacedc__clock_1_1get}{get}
\item 
interface \hyperlink{interfacedc__clock_1_1operator_07_09_08}{operator(+)}
\item 
interface \hyperlink{interfacedc__clock_1_1operator_07-_08}{operator(-\/)}
\item 
interface \hyperlink{interfacedc__clock_1_1predict}{predict}
\item 
interface \hyperlink{interfacedc__clock_1_1putline}{putline}
\item 
interface \hyperlink{interfacedc__clock_1_1result}{result}
\item 
interface \hyperlink{interfacedc__clock_1_1set__name}{set\+\_\+name}
\item 
interface \hyperlink{interfacedc__clock_1_1start}{start}
\item 
interface \hyperlink{interfacedc__clock_1_1stop}{stop}
\item 
interface \hyperlink{interfacedc__clock_1_1tochar}{tochar}
\end{DoxyCompactItemize}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{namespacedc__clock_a07a8f98e376ed61d3163f567ffda6959}{dcclockcreate0} (clk, name)
\item 
subroutine \hyperlink{namespacedc__clock_a57f4efe72b32447000034bbe8326871f}{dcclockclose0} (clk)
\item 
subroutine \hyperlink{namespacedc__clock_aafd8984f9e7c2f0153867e43f8df9f82}{dcclockstart0} (clk, err)
\item 
subroutine \hyperlink{namespacedc__clock_a60f2a9438e84c38d0783279e38e62e14}{dcclockstop0} (clk, err)
\item 
subroutine \hyperlink{namespacedc__clock_a76f8a30e34496c3a8ee008a55c7a2015}{dcclockgetr} (clk, sec, err)
\item 
subroutine \hyperlink{namespacedc__clock_a2b25de3afef99974f15103122dd43db7}{dcclockgetd} (clk, sec, err)
\item 
real(dp) function \hyperlink{namespacedc__clock_ae7e6304adc3352b2eaada6516b6ac531}{dcclockevalsecd} (clk)
\item 
character(string) function \hyperlink{namespacedc__clock_ac94f9e94810fe6613f6eabdbed50f906}{dcclocktochar0} (clk)
\item 
subroutine \hyperlink{namespacedc__clock_a829d23e333adb1fcb0717072216226dc}{dcclockputline0} (clk, unit, indent, err)
\item 
subroutine \hyperlink{namespacedc__clock_a7cd2f4ecf695d8a7243a74cc62b7d93e}{dcclockresult0} (clks, unit, total\+\_\+auto, clk\+\_\+total, total\+\_\+name, err)
\item 
character(token) function \hyperlink{namespacedc__clock_afa39cad42a3d42e1373bfec39a1211f9}{result\+\_\+value\+\_\+form} (value)
\item 
character(token) function \hyperlink{namespacedc__clock_a34945d1c02e19d9e77643f263c4afc4f}{fit\+\_\+unit\+\_\+value} (sec, diff)
\item 
character(token) function \hyperlink{namespacedc__clock_a1cdd8cc0cc556d4981290a2943de71ec}{printf\+\_\+g5\+\_\+2} (value)
\item 
type(\hyperlink{structdc__clock_1_1clock}{clock}) function \hyperlink{namespacedc__clock_a0b0480ee9724e766f1c6e05c4a40a40f}{dcclockadd} (clk1, clk2)
\item 
type(\hyperlink{structdc__clock_1_1clock}{clock}) function \hyperlink{namespacedc__clock_aab57a5168d80ff1a0f4c4da0490e5eeb}{dcclocksubtract} (clk1, clk2)
\item 
subroutine \hyperlink{namespacedc__clock_aa6ebe4695ac2137a6d169297879fb0dd}{dcclocksetname0} (clk, name, err)
\item 
subroutine \hyperlink{namespacedc__clock_ac5b2cb462d1de6b4e165731785683bfc}{dcclockpredict0} (clk, progress, unit, err)
\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
character($\ast$), parameter \hyperlink{namespacedc__clock_a297abf1194fb391e92a61db069caa623}{version} = \textquotesingle{}\$Name\+: \$\textquotesingle{} // \textquotesingle{}\$Id\+: dc\+\_\+clock.\+F90,v 1.\+1 2009-\/03-\/20 09\+:09\+:53 morikawa Exp \$\textquotesingle{}
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{namespacedc__clock_a0b0480ee9724e766f1c6e05c4a40a40f}\label{namespacedc__clock_a0b0480ee9724e766f1c6e05c4a40a40f}} 
\index{dc\+\_\+clock@{dc\+\_\+clock}!dcclockadd@{dcclockadd}}
\index{dcclockadd@{dcclockadd}!dc\+\_\+clock@{dc\+\_\+clock}}
\subsubsection{\texorpdfstring{dcclockadd()}{dcclockadd()}}
{\footnotesize\ttfamily type(\hyperlink{structdc__clock_1_1clock}{clock}) function dc\+\_\+clock\+::dcclockadd (\begin{DoxyParamCaption}\item[{type(\hyperlink{structdc__clock_1_1clock}{clock}), intent(in)}]{clk1,  }\item[{type(\hyperlink{structdc__clock_1_1clock}{clock}), intent(in)}]{clk2 }\end{DoxyParamCaption})}



Definition at line 751 of file dc\+\_\+clock.\+f90.


\begin{DoxyCode}
751     \textcolor{comment}{!}
752     \textcolor{comment}{!=== CLOCK 変数を足し合わせる}
753     \textcolor{comment}{!}
754     \textcolor{comment}{! CLOCK 変数 <b>clk1</b> と <b>clk2</b> を足し合わせます.}
755     \textcolor{comment}{! 与えられた 2 つの CLOCK  変数の CPU 時間を合計し,}
756     \textcolor{comment}{! CLOCK 変数として返します. 計測内容の名称は <b>clk1</b> と <b>clk2</b>}
757     \textcolor{comment}{! の名称を '+' で組み合わせたものとなります.}
758     \textcolor{comment}{!}
759     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1cprintf}{cprintf}
760     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date}{dc\_date}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(+), \textcolor{keyword}{operator}(<)
761     \textcolor{keywordtype}{implicit none}
762     \textcolor{keywordtype}{type}(clock), \textcolor{keywordtype}{intent(in)}:: clk1
763     \textcolor{keywordtype}{type}(clock), \textcolor{keywordtype}{intent(in)}:: clk2
764     \textcolor{keywordtype}{type}(clock):: clk\_total
765   \textcolor{keywordflow}{continue}
766     \textcolor{keywordflow}{if} (.not. clk1 % initialized .or. .not. clk2 % initialized) \textcolor{keywordflow}{then}
767       clk\_total % initialized = .false.
768       \textcolor{keywordflow}{return}
769 \textcolor{keywordflow}{    end if}
770     clk\_total % name = \hyperlink{interfacedc__string_1_1cprintf}{cprintf}(\textcolor{stringliteral}{'%c+%c'}, &
771       & c1=trim(clk1 % name), c2=trim(clk2 % name))
772     clk\_total % start\_time = - 1.0
773     clk\_total % initialized = .true.
774     clk\_total % elapsed\_time = 0.0
775     \textcolor{keywordflow}{if} (clk1 % start\_date < clk2 % start\_date) \textcolor{keywordflow}{then}
776       clk\_total % start\_date = clk1 % start\_date
777     \textcolor{keywordflow}{else}
778       clk\_total % start\_date = clk2 % start\_date
779 \textcolor{keywordflow}{    end if}
780     clk\_total % elapsed\_time = &
781       & clk1 % elapsed\_time + clk2 % elapsed\_time
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__clock_a57f4efe72b32447000034bbe8326871f}\label{namespacedc__clock_a57f4efe72b32447000034bbe8326871f}} 
\index{dc\+\_\+clock@{dc\+\_\+clock}!dcclockclose0@{dcclockclose0}}
\index{dcclockclose0@{dcclockclose0}!dc\+\_\+clock@{dc\+\_\+clock}}
\subsubsection{\texorpdfstring{dcclockclose0()}{dcclockclose0()}}
{\footnotesize\ttfamily subroutine dc\+\_\+clock\+::dcclockclose0 (\begin{DoxyParamCaption}\item[{type(\hyperlink{structdc__clock_1_1clock}{clock}), intent(inout)}]{clk }\end{DoxyParamCaption})}



Definition at line 245 of file dc\+\_\+clock.\+f90.



References dc\+\_\+trace\+::beginsub(), and dc\+\_\+trace\+::endsub().


\begin{DoxyCode}
245     \textcolor{comment}{!}
246     \textcolor{comment}{!=== CLOCK の終了サブルーチン}
247     \textcolor{comment}{!}
248     \textcolor{comment}{! CLOCK 型の変数をクローズします.}
249     \textcolor{comment}{!}
250     \textcolor{keywordtype}{implicit none}
251     \textcolor{keywordtype}{type}(clock), \textcolor{keywordtype}{intent(inout)}:: clk
252     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'DCClockClose'}
253   \textcolor{keywordflow}{continue}
254     \textcolor{keyword}{call }beginsub(subname)
255     \textcolor{keywordflow}{if} (clk % initialized) \textcolor{keywordflow}{then}
256       clk % initialized = .false.
257       clk % name = \textcolor{stringliteral}{''}
258 \textcolor{keywordflow}{    end if}
259     \textcolor{keyword}{call }endsub(subname)
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{namespacedc__clock_a57f4efe72b32447000034bbe8326871f_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacedc__clock_a07a8f98e376ed61d3163f567ffda6959}\label{namespacedc__clock_a07a8f98e376ed61d3163f567ffda6959}} 
\index{dc\+\_\+clock@{dc\+\_\+clock}!dcclockcreate0@{dcclockcreate0}}
\index{dcclockcreate0@{dcclockcreate0}!dc\+\_\+clock@{dc\+\_\+clock}}
\subsubsection{\texorpdfstring{dcclockcreate0()}{dcclockcreate0()}}
{\footnotesize\ttfamily subroutine dc\+\_\+clock\+::dcclockcreate0 (\begin{DoxyParamCaption}\item[{type(\hyperlink{structdc__clock_1_1clock}{clock}), intent(out)}]{clk,  }\item[{character($\ast$), intent(in)}]{name }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 216 of file dc\+\_\+clock.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+trace\+::dbgmessage(), dc\+\_\+trace\+::endsub(), and version.


\begin{DoxyCode}
216     \textcolor{comment}{!}
217     \textcolor{comment}{!=== CLOCK の初期化用サブルーチン}
218     \textcolor{comment}{!}
219     \textcolor{comment}{! CLOCK 型の変数を利用する際にはまずこのサブルーチンによって}
220     \textcolor{comment}{! 初期化を行ってください. *name* には計測内容を与えてください.}
221     \textcolor{comment}{!}
222     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
223     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date}{dc\_date}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1dcdatetimecreate}{dcdatetimecreate}
224     \textcolor{keywordtype}{implicit none}
225     \textcolor{keywordtype}{type}(clock), \textcolor{keywordtype}{intent(out)}:: clk
226     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: name
227     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'DCClockCreate'}
228   \textcolor{keywordflow}{continue}
229     \textcolor{keyword}{call }beginsub(subname, \textcolor{stringliteral}{'name=%c'}, c1=trim(name), version=version)
230     \textcolor{keywordflow}{if} (clk % initialized) \textcolor{keywordflow}{then}
231       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'This argument (type CLOCK) is already initialized.'})
232       \textcolor{keyword}{call }dbgmessage(\textcolor{stringliteral}{'already initialized'})
233       \textcolor{keywordflow}{goto} 999
234 \textcolor{keywordflow}{    end if}
235     clk % name = name
236     clk % elapsed\_time = 0.0
237     clk % start\_time = - 1.0
238     clk % initialized = .true.
239     \textcolor{keyword}{call }\hyperlink{interfacedc__date__generic_1_1dcdatetimecreate}{dcdatetimecreate}(clk % start\_date)
240     \textcolor{keyword}{call }dbgmessage(\textcolor{stringliteral}{'normal initialized'})
241 999 \textcolor{keywordflow}{continue}
242     \textcolor{keyword}{call }endsub(subname)
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{namespacedc__clock_a07a8f98e376ed61d3163f567ffda6959_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacedc__clock_ae7e6304adc3352b2eaada6516b6ac531}\label{namespacedc__clock_ae7e6304adc3352b2eaada6516b6ac531}} 
\index{dc\+\_\+clock@{dc\+\_\+clock}!dcclockevalsecd@{dcclockevalsecd}}
\index{dcclockevalsecd@{dcclockevalsecd}!dc\+\_\+clock@{dc\+\_\+clock}}
\subsubsection{\texorpdfstring{dcclockevalsecd()}{dcclockevalsecd()}}
{\footnotesize\ttfamily real(dp) function dc\+\_\+clock\+::dcclockevalsecd (\begin{DoxyParamCaption}\item[{type(\hyperlink{structdc__clock_1_1clock}{clock}), intent(in)}]{clk }\end{DoxyParamCaption})}



Definition at line 425 of file dc\+\_\+clock.\+f90.



References dcclockgetd(), and dc\+\_\+types\+::dp.


\begin{DoxyCode}
425     \textcolor{comment}{!}
426     \textcolor{comment}{!=== CPU 時間 (単位: 秒) の取得}
427     \textcolor{comment}{!}
428     \textcolor{comment}{! CPU 時間 (単位: 秒) を返します.}
429     \textcolor{comment}{!}
430     \textcolor{comment}{! 第一引数 *clk* に対して DCClockCreate }
431     \textcolor{comment}{! による初期化が行われていない場合, -1.0 が返ります.}
432     \textcolor{comment}{!}
433     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
434     \textcolor{keywordtype}{implicit none}
435     \textcolor{keywordtype}{type}(clock), \textcolor{keywordtype}{intent(in)}:: clk
436     \textcolor{keywordtype}{real(DP)}:: result
437     \textcolor{keywordtype}{logical}:: err
438   \textcolor{keywordflow}{continue}
439     \textcolor{keyword}{call }dcclockgetd(clk, result, err)
440     \textcolor{keywordflow}{if} (err) result = -1.0\_dp
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{namespacedc__clock_ae7e6304adc3352b2eaada6516b6ac531_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacedc__clock_a2b25de3afef99974f15103122dd43db7}\label{namespacedc__clock_a2b25de3afef99974f15103122dd43db7}} 
\index{dc\+\_\+clock@{dc\+\_\+clock}!dcclockgetd@{dcclockgetd}}
\index{dcclockgetd@{dcclockgetd}!dc\+\_\+clock@{dc\+\_\+clock}}
\subsubsection{\texorpdfstring{dcclockgetd()}{dcclockgetd()}}
{\footnotesize\ttfamily subroutine dc\+\_\+clock\+::dcclockgetd (\begin{DoxyParamCaption}\item[{type(\hyperlink{structdc__clock_1_1clock}{clock}), intent(in)}]{clk,  }\item[{real(dp), intent(out)}]{sec,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 385 of file dc\+\_\+clock.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+trace\+::dbgmessage(), dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), and dc\+\_\+error\+::storeerror().



Referenced by dcclockevalsecd().


\begin{DoxyCode}
385     \textcolor{comment}{!}
386     \textcolor{comment}{!=== CPU 時間 (単位: 秒) の取得}
387     \textcolor{comment}{!}
388     \textcolor{comment}{! CPU 時間 (単位: 秒) を *sec* に取得します.}
389     \textcolor{comment}{!}
390     \textcolor{comment}{! 第一引数 *clk* に対して DCClockCreate による初期化が行われていない場合,}
391     \textcolor{comment}{! エラーを発生させます.}
392     \textcolor{comment}{! 第二引数 *err* を与える場合には *err* に .true. が返り,}
393     \textcolor{comment}{! プログラムは続行されます.}
394     \textcolor{comment}{!}
395     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
396     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1cprintf}{cprintf}
397     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
398     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date}{dc\_date}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}
399     \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, 
      \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
400     \textcolor{keywordtype}{implicit none}
401     \textcolor{keywordtype}{type}(clock), \textcolor{keywordtype}{intent(in)}:: clk
402     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(out)}:: sec
403     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
404     \textcolor{keywordtype}{character(STRING)}:: cause\_c
405     \textcolor{keywordtype}{integer}:: stat
406     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'DCClockGetD'}
407   \textcolor{keywordflow}{continue}
408     \textcolor{keyword}{call }beginsub(subname)
409     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
410     cause\_c = \textcolor{stringliteral}{'CLOCK'}
411     \textcolor{keywordflow}{if} (.not. clk % initialized) \textcolor{keywordflow}{then}
412       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'Call Create before Get in dc\_clock.'})
413       \textcolor{keyword}{call }dbgmessage(\textcolor{stringliteral}{'Ignored because input argument was not initialized.'})
414       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
415       \textcolor{keywordflow}{goto} 999
416 \textcolor{keywordflow}{    end if}
417     sec = clk % elapsed\_time
418     \textcolor{keyword}{call }dbgmessage(\textcolor{stringliteral}{'name=%c, return sec=<%f>'}, &
419       & c1=trim(clk % name), d=(/sec/))
420 999 \textcolor{keywordflow}{continue}
421     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, err, cause\_c)
422     \textcolor{keyword}{call }endsub(subname)
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{namespacedc__clock_a2b25de3afef99974f15103122dd43db7_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{namespacedc__clock_a2b25de3afef99974f15103122dd43db7_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacedc__clock_a76f8a30e34496c3a8ee008a55c7a2015}\label{namespacedc__clock_a76f8a30e34496c3a8ee008a55c7a2015}} 
\index{dc\+\_\+clock@{dc\+\_\+clock}!dcclockgetr@{dcclockgetr}}
\index{dcclockgetr@{dcclockgetr}!dc\+\_\+clock@{dc\+\_\+clock}}
\subsubsection{\texorpdfstring{dcclockgetr()}{dcclockgetr()}}
{\footnotesize\ttfamily subroutine dc\+\_\+clock\+::dcclockgetr (\begin{DoxyParamCaption}\item[{type(\hyperlink{structdc__clock_1_1clock}{clock}), intent(in)}]{clk,  }\item[{real, intent(out)}]{sec,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 346 of file dc\+\_\+clock.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+trace\+::dbgmessage(), dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), and dc\+\_\+error\+::storeerror().


\begin{DoxyCode}
346     \textcolor{comment}{!}
347     \textcolor{comment}{!=== CPU 時間 (単位: 秒) の取得}
348     \textcolor{comment}{!}
349     \textcolor{comment}{! CPU 時間 (単位: 秒) を *sec* に取得します.}
350     \textcolor{comment}{!}
351     \textcolor{comment}{! 第一引数 *clk* に対して DCClockCreate による初期化が行われていない場合,}
352     \textcolor{comment}{! エラーを発生させます. *err* を与える場合には *err* に .true. が返り,}
353     \textcolor{comment}{! プログラムは続行されます.}
354     \textcolor{comment}{!}
355     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
356     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
357     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date}{dc\_date}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}
358     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1cprintf}{cprintf}
359     \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, 
      \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
360     \textcolor{keywordtype}{implicit none}
361     \textcolor{keywordtype}{type}(clock), \textcolor{keywordtype}{intent(in)}:: clk
362     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(out)}:: sec
363     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
364     \textcolor{keywordtype}{character(STRING)}:: cause\_c
365     \textcolor{keywordtype}{integer}:: stat
366     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'DCClockGetR'}
367   \textcolor{keywordflow}{continue}
368     \textcolor{keyword}{call }beginsub(subname)
369     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
370     cause\_c = \textcolor{stringliteral}{'CLOCK'}
371     \textcolor{keywordflow}{if} (.not. clk % initialized) \textcolor{keywordflow}{then}
372       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'Call Create before Get in dc\_clock.'})
373       \textcolor{keyword}{call }dbgmessage(\textcolor{stringliteral}{'Ignored because input argument was not initialized.'})
374       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
375       \textcolor{keywordflow}{goto} 999
376 \textcolor{keywordflow}{    end if}
377     sec = clk % elapsed\_time
378     \textcolor{keyword}{call }dbgmessage(\textcolor{stringliteral}{'name=%c, return sec=<%r>'}, &
379       & c1=trim(clk % name), r=(/sec/))
380 999 \textcolor{keywordflow}{continue}
381     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, err, cause\_c)
382     \textcolor{keyword}{call }endsub(subname)
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{namespacedc__clock_a76f8a30e34496c3a8ee008a55c7a2015_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacedc__clock_ac5b2cb462d1de6b4e165731785683bfc}\label{namespacedc__clock_ac5b2cb462d1de6b4e165731785683bfc}} 
\index{dc\+\_\+clock@{dc\+\_\+clock}!dcclockpredict0@{dcclockpredict0}}
\index{dcclockpredict0@{dcclockpredict0}!dc\+\_\+clock@{dc\+\_\+clock}}
\subsubsection{\texorpdfstring{dcclockpredict0()}{dcclockpredict0()}}
{\footnotesize\ttfamily subroutine dc\+\_\+clock\+::dcclockpredict0 (\begin{DoxyParamCaption}\item[{type(\hyperlink{structdc__clock_1_1clock}{clock}), intent(in)}]{clk,  }\item[{real, intent(in)}]{progress,  }\item[{integer, intent(in), optional}]{unit,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 855 of file dc\+\_\+clock.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+trace\+::dbgmessage(), dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), fit\+\_\+unit\+\_\+value(), printf\+\_\+g5\+\_\+2(), result\+\_\+value\+\_\+form(), dc\+\_\+types\+::stdout, and dc\+\_\+error\+::storeerror().


\begin{DoxyCode}
855     \textcolor{comment}{!}
856     \textcolor{comment}{!=== プログラムが終了するまでの予測 CPU 時間, および日時を表示}
857     \textcolor{comment}{!}
858     \textcolor{comment}{! CLOCK 変数 *clk* と *progress* から, プログラムが}
859     \textcolor{comment}{! 終了するまでの予測 CPU 時間, および日時を以下のように表示します.}
860     \textcolor{comment}{!}
861     \textcolor{comment}{!     ########## PREDICTION OF CALCULATION ###########}
862     \textcolor{comment}{!     Start Date             2007-03-08T16:49:25+09:00}
863     \textcolor{comment}{!     Current Date           2007-03-08T16:49:27+09:00}
864     \textcolor{comment}{!     Progress     66.67%  [****************         ]}
865     \textcolor{comment}{!     Remaining CPU TIME      0.100000E+01}
866     \textcolor{comment}{!     Completion Date        2007-03-08T16:49:28+09:00}
867     \textcolor{comment}{!}
868     \textcolor{comment}{! 第2引数である *progress* には 0 〜 1 までの値を与えてください.}
869     \textcolor{comment}{! プログラムの開始時を 0, 終了時を 1 とします. (例えば,}
870     \textcolor{comment}{! プログラムが半分進んだ時には 0.5 を与えます).}
871     \textcolor{comment}{!}
872     \textcolor{comment}{! ここで行う「予測」とは, これまでの経過時間および}
873     \textcolor{comment}{! 終了したプログラムの分量から単純なアルゴリズムで割り出している}
874     \textcolor{comment}{! ものなので, 正確な予測値を返すわけではありません.}
875     \textcolor{comment}{! あくまで目安として利用してください.}
876     \textcolor{comment}{!}
877     \textcolor{comment}{! 引数 *unit* には出力先の装置番号を}
878     \textcolor{comment}{! 与えてください. *unit* を与えない場合, 標準出力へ表示されます.}
879     \textcolor{comment}{!}
880     \textcolor{comment}{! 第一引数 *clk* に対して DCClockCreate による初期化が行われていない場合,}
881     \textcolor{comment}{! エラーを発生させます. *err* を与える場合には *err* に .true. が返り,}
882     \textcolor{comment}{! プログラムは続行されます.}
883     \textcolor{comment}{!}
884     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_a5d5ccca8cc2b447f2a0546da0a22efdc}{stdout}, \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
885     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
886     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__string_1_1cprintf}{cprintf}, \hyperlink{interfacedc__string_1_1printf}{printf}
887     \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, 
      \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
888     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}, \hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}
889     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date}{dc\_date}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(+), \hyperlink{interfacedc__date__generic_1_1dcdatetimecreate}{dcdatetimecreate}, 
      \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, &
890       & \hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}
891     \textcolor{keywordtype}{implicit none}
892     \textcolor{keywordtype}{type}(clock), \textcolor{keywordtype}{intent(in)}:: clk
893     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: progress
894     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: unit
895     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
896     \textcolor{keywordtype}{character(STRING)}:: cause\_c
897     \textcolor{keywordtype}{integer}:: stat, out\_unit
898     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}):: remain\_diff
899     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__datetime}{dc\_datetime}):: comp\_date, cur\_date
900     \textcolor{keywordtype}{character(7)}:: prog\_percent
901     \textcolor{keywordtype}{character(25)}:: prog\_bar
902     \textcolor{keywordtype}{integer}:: prog\_bar\_ptr
903     \textcolor{keywordtype}{real}:: prog\_valid
904     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'DCClockPredict'}
905   \textcolor{keywordflow}{continue}
906     \textcolor{keyword}{call }beginsub(subname)
907     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
908     cause\_c = \textcolor{stringliteral}{'CLOCK'}
909     \textcolor{keywordflow}{if} (.not. clk % initialized) \textcolor{keywordflow}{then}
910       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'Call Create before Predict in dc\_clock.'})
911       \textcolor{keyword}{call }dbgmessage(\textcolor{stringliteral}{'Ignored because input argument was not initialized.'})
912       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
913       \textcolor{keywordflow}{goto} 999
914 \textcolor{keywordflow}{    end if}
915     \textcolor{keywordflow}{if} (progress <= 0.0) \textcolor{keywordflow}{then}
916       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'Specify 0.0 -- 1.0 value to "progress"'})
917       \textcolor{keywordflow}{return}
918     \textcolor{keywordflow}{elseif} (progress > 1.0) \textcolor{keywordflow}{then}
919       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'Over 1.0 value to "progress" was modified to 1.0'})
920       prog\_valid = 1.0
921     \textcolor{keywordflow}{else}
922       prog\_valid = progress
923 \textcolor{keywordflow}{    end if}
924     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(unit)) \textcolor{keywordflow}{then}
925       out\_unit = unit
926     \textcolor{keywordflow}{else}
927       out\_unit = \hyperlink{namespacedc__types_a5d5ccca8cc2b447f2a0546da0a22efdc}{stdout}
928 \textcolor{keywordflow}{    end if}
929     \textcolor{keyword}{call }\hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}( remain\_diff, &
930       & sec = \textcolor{keywordtype}{real(nint(EvalSec(clk) / prog\_valid * (1.0 - prog\_valid)), DP)} )
931     \textcolor{keyword}{call }\hyperlink{interfacedc__date__generic_1_1dcdatetimecreate}{dcdatetimecreate}(cur\_date)
932     comp\_date = cur\_date + remain\_diff
933     prog\_percent = \textcolor{stringliteral}{''}
934     prog\_percent = adjustr(trim(printf\_g5\_2(\textcolor{keywordtype}{real}(prog\_valid * 100, \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}))) // \textcolor{stringliteral}{'%'})
935     prog\_bar = \textcolor{stringliteral}{''}
936     prog\_bar\_ptr = \hyperlink{interfacedc__scaledsec_1_1int}{int}(prog\_valid * 25)
937     \textcolor{keywordflow}{if} (prog\_bar\_ptr > 0) prog\_bar(1:prog\_bar\_ptr) = \textcolor{stringliteral}{'*************************'}
938     \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1printf}{printf}(out\_unit, \textcolor{stringliteral}{''})
939     \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1printf}{printf}(out\_unit, &
940       & \textcolor{stringliteral}{' ########## PREDICTION OF CALCULATION ###########'})
941     \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1printf}{printf}(out\_unit, &
942       & \textcolor{stringliteral}{' Start Date             %c'}, c1=trim(\hyperlink{interfacedc__string_1_1tochar}{tochar}(clk % start\_date)))
943     \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1printf}{printf}(out\_unit, &
944       & \textcolor{stringliteral}{' Current Date           %c'}, c1=trim(\hyperlink{interfacedc__string_1_1tochar}{tochar}(cur\_date)))
945     \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1printf}{printf}(out\_unit, &
946       & \textcolor{stringliteral}{' Progress     %c [%c]'}, c1=prog\_percent, c2=prog\_bar)
947     \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1printf}{printf}(out\_unit, &
948       & \textcolor{stringliteral}{' Remaining CPU TIME   %c %c'}, &
949       & c1=trim(result\_value\_form(\hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}(remain\_diff))), &
950       & c2=trim(fit\_unit\_value(0.0\_dp, remain\_diff)))
951     \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1printf}{printf}(out\_unit, &
952       & \textcolor{stringliteral}{' Completion Date        %c'}, c1=trim(\hyperlink{interfacedc__string_1_1tochar}{tochar}(comp\_date)))
953 999 \textcolor{keywordflow}{continue}
954     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, err, cause\_c)
955     \textcolor{keyword}{call }endsub(subname)
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{namespacedc__clock_ac5b2cb462d1de6b4e165731785683bfc_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacedc__clock_a829d23e333adb1fcb0717072216226dc}\label{namespacedc__clock_a829d23e333adb1fcb0717072216226dc}} 
\index{dc\+\_\+clock@{dc\+\_\+clock}!dcclockputline0@{dcclockputline0}}
\index{dcclockputline0@{dcclockputline0}!dc\+\_\+clock@{dc\+\_\+clock}}
\subsubsection{\texorpdfstring{dcclockputline0()}{dcclockputline0()}}
{\footnotesize\ttfamily subroutine dc\+\_\+clock\+::dcclockputline0 (\begin{DoxyParamCaption}\item[{type(\hyperlink{structdc__clock_1_1clock}{clock}), intent(in)}]{clk,  }\item[{integer, intent(in), optional}]{unit,  }\item[{character($\ast$), intent(in), optional}]{indent,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 468 of file dc\+\_\+clock.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+trace\+::dbgmessage(), dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), fit\+\_\+unit\+\_\+value(), dc\+\_\+types\+::stdout, and dc\+\_\+error\+::storeerror().


\begin{DoxyCode}
468     \textcolor{comment}{!}
469     \textcolor{comment}{!=== 構造型 CLOCK 変数の情報を表示}
470     \textcolor{comment}{!}
471     \textcolor{comment}{! 構造型 CLOCK 変数に関する情報を表示します. *unit* には出力先の装置番号を}
472     \textcolor{comment}{! 与えてください. *unit* を与えない場合, 標準出力へ表示されます.}
473     \textcolor{comment}{!}
474     \textcolor{comment}{! 第一引数 *clk* に対して DCClockCreate による初期化が行われていない場合,}
475     \textcolor{comment}{! エラーを発生させます. *err* を与える場合には *err* に .true. が返り,}
476     \textcolor{comment}{! プログラムは続行されます.}
477     \textcolor{comment}{!}
478     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_a5d5ccca8cc2b447f2a0546da0a22efdc}{stdout}
479     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
480     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1printf}{printf}, \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__string_1_1cprintf}{cprintf}
481     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date}{dc\_date}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, \hyperlink{interfacedc__date__generic_1_1evalday}{evalday}, \hyperlink{interfacedc__string_1_1tochar}{tochar}
482     \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, 
      \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
483     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
484     \textcolor{keywordtype}{implicit none}
485     \textcolor{keywordtype}{type}(clock), \textcolor{keywordtype}{intent(in)}:: clk
486     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: unit
487     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: indent
488                               \textcolor{comment}{! 表示されるメッセージの字下げ.}
489                               \textcolor{comment}{!}
490                               \textcolor{comment}{! Indent of displayed messages.}
491     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
492     \textcolor{keywordtype}{integer}:: out\_unit
493     \textcolor{keywordtype}{character(STRING)}:: cause\_c
494     \textcolor{keywordtype}{integer}:: stat
495     \textcolor{keywordtype}{integer}:: indent\_len
496     \textcolor{keywordtype}{character(STRING)}:: indent\_str
497     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'DCClockPutLine'}
498   \textcolor{keywordflow}{continue}
499     \textcolor{keyword}{call }beginsub(subname)
500     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
501     cause\_c = \textcolor{stringliteral}{'CLOCK'}
502     \textcolor{keywordflow}{if} (.not. clk % initialized) \textcolor{keywordflow}{then}
503       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'Call Create before PutLine in dc\_clock.'})
504       \textcolor{keyword}{call }dbgmessage(\textcolor{stringliteral}{'Ignored because input argument was not initialized.'})
505       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
506       \textcolor{keywordflow}{goto} 999
507 \textcolor{keywordflow}{    end if}
508     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(unit)) \textcolor{keywordflow}{then}
509       out\_unit = unit
510     \textcolor{keywordflow}{else}
511       out\_unit = stdout
512 \textcolor{keywordflow}{    end if}
513     indent\_len = 0
514     indent\_str = \textcolor{stringliteral}{''}
515     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(indent)) \textcolor{keywordflow}{then}
516       \textcolor{keywordflow}{if} (len(indent) /= 0) \textcolor{keywordflow}{then}
517         indent\_len = len(indent)
518         indent\_str(1:indent\_len) = indent
519 \textcolor{keywordflow}{      end if}
520 \textcolor{keywordflow}{    end if}
521     \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1printf}{printf}(out\_unit, &
522       & indent\_str(1:indent\_len) // &
523       & \textcolor{stringliteral}{'#<CLOCK:: @name=%c @clocking=%y @elapsed\_time=%f sec. %c @start\_date=%c>'}, &
524       & c1=trim(clk % name), l=(/clk % start\_time > 0.0\_dp/), &
525       & d=(/clk % elapsed\_time/), &
526       & c2=trim(fit\_unit\_value(clk % elapsed\_time)), &
527       & c3=trim(\hyperlink{interfacedc__string_1_1tochar}{tochar}(clk % start\_date)))
528     \textcolor{keyword}{call }dbgmessage(\textcolor{stringliteral}{'name=%c, output to device number %d'}, &
529       & c1=trim(clk % name), i=(/out\_unit/))
530 999 \textcolor{keywordflow}{continue}
531     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, err, cause\_c)
532     \textcolor{keyword}{call }endsub(subname)
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{namespacedc__clock_a829d23e333adb1fcb0717072216226dc_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacedc__clock_a7cd2f4ecf695d8a7243a74cc62b7d93e}\label{namespacedc__clock_a7cd2f4ecf695d8a7243a74cc62b7d93e}} 
\index{dc\+\_\+clock@{dc\+\_\+clock}!dcclockresult0@{dcclockresult0}}
\index{dcclockresult0@{dcclockresult0}!dc\+\_\+clock@{dc\+\_\+clock}}
\subsubsection{\texorpdfstring{dcclockresult0()}{dcclockresult0()}}
{\footnotesize\ttfamily subroutine dc\+\_\+clock\+::dcclockresult0 (\begin{DoxyParamCaption}\item[{type(\hyperlink{structdc__clock_1_1clock}{clock}), dimension(\+:), intent(in)}]{clks,  }\item[{integer, intent(in), optional}]{unit,  }\item[{logical, intent(in), optional}]{total\+\_\+auto,  }\item[{type(\hyperlink{structdc__clock_1_1clock}{clock}), intent(in), optional}]{clk\+\_\+total,  }\item[{character($\ast$), intent(in), optional}]{total\+\_\+name,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 535 of file dc\+\_\+clock.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+trace\+::dbgmessage(), dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), fit\+\_\+unit\+\_\+value(), result\+\_\+value\+\_\+form(), dc\+\_\+types\+::stdout, dc\+\_\+error\+::storeerror(), and dc\+\_\+types\+::string.


\begin{DoxyCode}
535     \textcolor{comment}{!}
536     \textcolor{comment}{!=== CPU 時間の総計を表示}
537     \textcolor{comment}{!}
538     \textcolor{comment}{! CPU 時間の総計を表示します. *clks* へ, CLOCK 変数の配列を}
539     \textcolor{comment}{! 与えてください. プログラムの最後で呼び出されることを}
540     \textcolor{comment}{! 想定しています. *unit* には出力先の装置番号を}
541     \textcolor{comment}{! 与えてください. *unit* を与えない場合, 標準出力へ表示されます.}
542     \textcolor{comment}{!}
543     \textcolor{comment}{! 引数 *total\_auto* に .true. を与えると, *clks* を全て足し合わせた}
544     \textcolor{comment}{! 合計値を自動的に表示します. 下記の引数 *clk\_total* が与えられている}
545     \textcolor{comment}{! 場合は *clk\_total* が優先されます.}
546     \textcolor{comment}{!}
547     \textcolor{comment}{! 引数 *clk\_total* に CLOCK 変数を与えると, この変数を合計値と}
548     \textcolor{comment}{! して表示します.}
549     \textcolor{comment}{!}
550     \textcolor{comment}{! 引数 *total\_name* に文字型変数を与えると, 総計メッセージの}
551     \textcolor{comment}{! 冒頭にこの文字列を出力します.}
552     \textcolor{comment}{!}
553     \textcolor{comment}{! 第一引数 *clk* に対して DCClockCreate による初期化が行われていない場合,}
554     \textcolor{comment}{! エラーを発生させます. *err* を与える場合には *err* に .true. が返り,}
555     \textcolor{comment}{! プログラムは続行されます.}
556     \textcolor{comment}{!}
557     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_a5d5ccca8cc2b447f2a0546da0a22efdc}{stdout}, \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
558     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
559     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1printf}{printf}, \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__string_1_1cprintf}{cprintf}
560     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date}{dc\_date}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}
561     \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, 
      \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
562     \textcolor{keywordtype}{implicit none}
563     \textcolor{keywordtype}{type}(clock), \textcolor{keywordtype}{intent(in)}:: clks(:)
564     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: unit
565     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: total\_auto
566     \textcolor{keywordtype}{type}(clock), \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: clk\_total
567     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
568     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: total\_name
569     \textcolor{keywordtype}{integer}:: out\_unit, i, clks\_size, ra
570     \textcolor{keywordtype}{character(20)}:: clk\_name
571     \textcolor{keywordtype}{character(STRING)}:: cause\_c
572     \textcolor{keywordtype}{character(STRING)}:: total\_name\_work
573     \textcolor{keywordtype}{type}(clock):: clk\_auto\_total
574     \textcolor{keywordtype}{logical}:: total\_print\_complete
575     \textcolor{keywordtype}{real(DP)}:: elapsed\_time\_val\_cor
576     \textcolor{keywordtype}{integer}:: stat
577     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: total\_time\_mes = \textcolor{stringliteral}{'       TOTAL TIME = '}
578     \textcolor{keywordtype}{integer}:: myrank\_mpi, nprocs\_mpi
579     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'DCClockResult'}
580   \textcolor{keywordflow}{continue}
581     \textcolor{keyword}{call }beginsub(subname)
582     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
583     cause\_c = \textcolor{stringliteral}{'CLOCK'}
584     clks\_size = \textcolor{keyword}{size}(clks)
585     \textcolor{keywordflow}{do} i = 1, clks\_size
586       \textcolor{keywordflow}{if} (.not. clks(i) % initialized) \textcolor{keywordflow}{then}
587         \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'Call Create before Result in dc\_clock.'})
588         \textcolor{keyword}{call }dbgmessage(\textcolor{stringliteral}{'Ignored because input argument was not initialized.'})
589         stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
590         \textcolor{keywordflow}{goto} 999
591 \textcolor{keywordflow}{      end if}
592 \textcolor{keywordflow}{    end do}
593     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(unit)) \textcolor{keywordflow}{then}
594       out\_unit = unit
595     \textcolor{keywordflow}{else}
596       out\_unit = \hyperlink{namespacedc__types_a5d5ccca8cc2b447f2a0546da0a22efdc}{stdout}
597 \textcolor{keywordflow}{    end if}
598     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(total\_name)) \textcolor{keywordflow}{then}
599       total\_name\_work = \textcolor{stringliteral}{' ('} // trim(total\_name) // \textcolor{stringliteral}{')'}
600     \textcolor{keywordflow}{else}
601       total\_name\_work = \textcolor{stringliteral}{''}
602 \textcolor{keywordflow}{    end if}
603     myrank\_mpi = -1
604     nprocs\_mpi = 1
605     \textcolor{keywordflow}{do} ra = 0, nprocs\_mpi - 1
606       \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1printf}{printf}(out\_unit, \textcolor{stringliteral}{''})
607       \textcolor{keywordflow}{if} ( myrank\_mpi < 0 ) \textcolor{keywordflow}{then}
608         \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1printf}{printf}(out\_unit, &
609           & \textcolor{stringliteral}{' ############## CPU TIME SUMMARY%c################'}, &
610           & c1=trim(total\_name\_work) // \textcolor{stringliteral}{' '})
611       \textcolor{keywordflow}{else}
612         \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1printf}{printf}(out\_unit, &
613           & \textcolor{stringliteral}{' ####### CPU TIME SUMMARY%c#### [rank=%06d] ####'}, &
614           & c1=trim(total\_name\_work) // \textcolor{stringliteral}{' '}, &
615           & i = (/myrank\_mpi/) )
616 \textcolor{keywordflow}{      end if}
617       \textcolor{keywordflow}{do} i = 1, clks\_size
618         clk\_name = clks(i) % name
619         elapsed\_time\_val\_cor = clks(i) % elapsed\_time
620         \textcolor{keywordflow}{if} (elapsed\_time\_val\_cor < 0.0\_dp) elapsed\_time\_val\_cor = 0.0\_dp
621         \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1printf}{printf}(out\_unit, &
622           & \textcolor{stringliteral}{' %c%c  %c'}, c1=clk\_name, &
623           & c2=trim(result\_value\_form(elapsed\_time\_val\_cor)), &
624           & c3=trim(fit\_unit\_value(clks(i) % elapsed\_time)))
625 \textcolor{keywordflow}{      end do}
626       total\_print\_complete = .false.
627       \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(clk\_total)) \textcolor{keywordflow}{then}
628         \textcolor{keywordflow}{if} (clk\_total % initialized) \textcolor{keywordflow}{then}
629           \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1printf}{printf}(out\_unit, &
630             & \textcolor{stringliteral}{' ------------------------------------------------'})
631           elapsed\_time\_val\_cor = clk\_total % elapsed\_time
632           \textcolor{keywordflow}{if} (elapsed\_time\_val\_cor < 0.0\_dp) elapsed\_time\_val\_cor = 0.0\_dp
633           \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1printf}{printf}(out\_unit, &
634             & \textcolor{stringliteral}{' %c%c  %c'}, c1=total\_time\_mes, &
635             & c2=trim(result\_value\_form(elapsed\_time\_val\_cor)), &
636             & c3=trim(fit\_unit\_value(clk\_total % elapsed\_time)))
637           total\_print\_complete = .true.
638 \textcolor{keywordflow}{        end if}
639 \textcolor{keywordflow}{      end if}
640       \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(total\_auto) .and. .not. total\_print\_complete) \textcolor{keywordflow}{then}
641         \textcolor{keywordflow}{if} (total\_auto) \textcolor{keywordflow}{then}
642           clk\_auto\_total = clks(1)
643           \textcolor{keywordflow}{if} (clks\_size > 1) \textcolor{keywordflow}{then}
644             \textcolor{keywordflow}{do} i = 2, clks\_size
645               clk\_auto\_total = clk\_auto\_total + clks(i)
646 \textcolor{keywordflow}{            end do}
647 \textcolor{keywordflow}{          end if}
648           \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1printf}{printf}(out\_unit, &
649             & \textcolor{stringliteral}{' ------------------------------------------------'})
650           elapsed\_time\_val\_cor = clk\_auto\_total % elapsed\_time
651           \textcolor{keywordflow}{if} (elapsed\_time\_val\_cor < 0.0\_dp) elapsed\_time\_val\_cor = 0.0\_dp
652           \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1printf}{printf}(out\_unit, &
653             & \textcolor{stringliteral}{' %c%c  %c'}, c1=total\_time\_mes, &
654             & c2=trim(result\_value\_form(elapsed\_time\_val\_cor)), &
655             & c3=trim(fit\_unit\_value(clk\_auto\_total % elapsed\_time)))
656 \textcolor{keywordflow}{        end if}
657 \textcolor{keywordflow}{      end if}
658       \textcolor{keyword}{call }dbgmessage(\textcolor{stringliteral}{'total results, output to device number %d'}, &
659         & i=(/out\_unit/))
660 \textcolor{keywordflow}{    end do}
661 999 \textcolor{keywordflow}{continue}
662     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, err, cause\_c)
663     \textcolor{keyword}{call }endsub(subname)
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{namespacedc__clock_a7cd2f4ecf695d8a7243a74cc62b7d93e_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacedc__clock_aa6ebe4695ac2137a6d169297879fb0dd}\label{namespacedc__clock_aa6ebe4695ac2137a6d169297879fb0dd}} 
\index{dc\+\_\+clock@{dc\+\_\+clock}!dcclocksetname0@{dcclocksetname0}}
\index{dcclocksetname0@{dcclocksetname0}!dc\+\_\+clock@{dc\+\_\+clock}}
\subsubsection{\texorpdfstring{dcclocksetname0()}{dcclocksetname0()}}
{\footnotesize\ttfamily subroutine dc\+\_\+clock\+::dcclocksetname0 (\begin{DoxyParamCaption}\item[{type(\hyperlink{structdc__clock_1_1clock}{clock}), intent(inout)}]{clk,  }\item[{character($\ast$), intent(in)}]{name,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 818 of file dc\+\_\+clock.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+trace\+::dbgmessage(), dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+trace\+::endsub(), and dc\+\_\+error\+::storeerror().


\begin{DoxyCode}
818     \textcolor{comment}{!}
819     \textcolor{comment}{!=== 測定内容の名称を変更する.}
820     \textcolor{comment}{!}
821     \textcolor{comment}{! CLOCK 変数 *clk* の計測内容の名称を変更します.}
822     \textcolor{comment}{! この名称は Create の *name* 引数で指定されたものです.}
823     \textcolor{comment}{!}
824     \textcolor{comment}{! 第一引数 *clk* に対して DCClockCreate による初期化が行われていない場合,}
825     \textcolor{comment}{! エラーを発生させます. *err* を与える場合には *err* に .true. が返り,}
826     \textcolor{comment}{! プログラムは続行されます.}
827     \textcolor{comment}{!}
828     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
829     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}, \hyperlink{interfacedc__string_1_1cprintf}{cprintf}
830     \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, 
      \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
831     \textcolor{keywordtype}{implicit none}
832     \textcolor{keywordtype}{type}(clock), \textcolor{keywordtype}{intent(inout)}:: clk
833     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: name
834     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
835     \textcolor{keywordtype}{character(STRING)}:: cause\_c
836     \textcolor{keywordtype}{integer}:: stat
837     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'DCClockSetName'}
838   \textcolor{keywordflow}{continue}
839     \textcolor{keyword}{call }beginsub(subname)
840     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
841     cause\_c = \textcolor{stringliteral}{'CLOCK'}
842     \textcolor{keywordflow}{if} (.not. clk % initialized) \textcolor{keywordflow}{then}
843       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'Call Create before Set\_Name in dc\_clock.'})
844       \textcolor{keyword}{call }dbgmessage(\textcolor{stringliteral}{'Ignored because input argument was not initialized.'})
845       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
846       \textcolor{keywordflow}{goto} 999
847 \textcolor{keywordflow}{    end if}
848     clk % name = name
849     \textcolor{keyword}{call }dbgmessage(\textcolor{stringliteral}{'set new name "%c"'}, c1=trim(clk % name))
850 999 \textcolor{keywordflow}{continue}
851     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, err, cause\_c)
852     \textcolor{keyword}{call }endsub(subname)
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{namespacedc__clock_aa6ebe4695ac2137a6d169297879fb0dd_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacedc__clock_aafd8984f9e7c2f0153867e43f8df9f82}\label{namespacedc__clock_aafd8984f9e7c2f0153867e43f8df9f82}} 
\index{dc\+\_\+clock@{dc\+\_\+clock}!dcclockstart0@{dcclockstart0}}
\index{dcclockstart0@{dcclockstart0}!dc\+\_\+clock@{dc\+\_\+clock}}
\subsubsection{\texorpdfstring{dcclockstart0()}{dcclockstart0()}}
{\footnotesize\ttfamily subroutine dc\+\_\+clock\+::dcclockstart0 (\begin{DoxyParamCaption}\item[{type(\hyperlink{structdc__clock_1_1clock}{clock}), intent(inout)}]{clk,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 262 of file dc\+\_\+clock.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+trace\+::dbgmessage(), dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), and dc\+\_\+error\+::storeerror().


\begin{DoxyCode}
262     \textcolor{comment}{!}
263     \textcolor{comment}{!=== 計測の開始}
264     \textcolor{comment}{!}
265     \textcolor{comment}{! このサブルーチンを呼んだ時点で計測を開始します.}
266     \textcolor{comment}{!}
267     \textcolor{comment}{! 第一引数 *clk* に対して DCClockCreate による初期化が行われていない場合,}
268     \textcolor{comment}{! エラーを発生させます. *err* を与える場合には *err* に .true. が返り,}
269     \textcolor{comment}{! プログラムは続行されます.}
270     \textcolor{comment}{!}
271     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
272     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}
273     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
274     \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, 
      \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
275     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date}{dc\_date}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}
276     \textcolor{keywordtype}{implicit none}
277     \textcolor{keywordtype}{type}(clock), \textcolor{keywordtype}{intent(inout)}:: clk
278     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
279     \textcolor{keywordtype}{character(STRING)}:: cause\_c
280     \textcolor{keywordtype}{integer}:: stat
281     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'DCClockStart'}
282   \textcolor{keywordflow}{continue}
283     \textcolor{keyword}{call }beginsub(subname)
284     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
285     cause\_c = \textcolor{stringliteral}{'CLOCK'}
286     \textcolor{keywordflow}{if} (.not. clk % initialized) \textcolor{keywordflow}{then}
287       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'Call Create before Start in dc\_clock.'})
288       \textcolor{keyword}{call }dbgmessage(\textcolor{stringliteral}{'Ignored because input argument was not initialized.'})
289       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
290       \textcolor{keywordflow}{goto} 999
291 \textcolor{keywordflow}{    end if}
292     \textcolor{keyword}{call }cpu\_time(clk % start\_time) \textcolor{comment}{! (out)}
293     \textcolor{keyword}{call }dbgmessage(\textcolor{stringliteral}{'name=%c, cpu\_time=%f'}, &
294       & c1=trim(clk % name), d=(/clk % start\_time/) )
295 999 \textcolor{keywordflow}{continue}
296     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, err, cause\_c)
297     \textcolor{keyword}{call }endsub(subname)
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{namespacedc__clock_aafd8984f9e7c2f0153867e43f8df9f82_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacedc__clock_a60f2a9438e84c38d0783279e38e62e14}\label{namespacedc__clock_a60f2a9438e84c38d0783279e38e62e14}} 
\index{dc\+\_\+clock@{dc\+\_\+clock}!dcclockstop0@{dcclockstop0}}
\index{dcclockstop0@{dcclockstop0}!dc\+\_\+clock@{dc\+\_\+clock}}
\subsubsection{\texorpdfstring{dcclockstop0()}{dcclockstop0()}}
{\footnotesize\ttfamily subroutine dc\+\_\+clock\+::dcclockstop0 (\begin{DoxyParamCaption}\item[{type(\hyperlink{structdc__clock_1_1clock}{clock}), intent(inout)}]{clk,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 300 of file dc\+\_\+clock.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+trace\+::dbgmessage(), dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), and dc\+\_\+error\+::storeerror().


\begin{DoxyCode}
300     \textcolor{comment}{!}
301     \textcolor{comment}{!=== 計測の一時停止}
302     \textcolor{comment}{!}
303     \textcolor{comment}{! このサブルーチンを呼んだ時点で計測を一時停止します.}
304     \textcolor{comment}{!}
305     \textcolor{comment}{! 第一引数 *clk* に対して DCClockCreate による初期化が行われていない場合,}
306     \textcolor{comment}{! エラーを発生させます. *err* を与える場合には *err* に .true. が返り,}
307     \textcolor{comment}{! プログラムは続行されます.}
308     \textcolor{comment}{!}
309     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
310     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1tochar}{tochar}
311     \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, 
      \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
312     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date}{dc\_date}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}, \textcolor{keyword}{operator}(+), \textcolor{keyword}{operator}(-)
313     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}
314     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
315     \textcolor{keywordtype}{implicit none}
316     \textcolor{keywordtype}{type}(clock), \textcolor{keywordtype}{intent(inout)}:: clk
317     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
318     \textcolor{keywordtype}{character(STRING)}:: cause\_c
319     \textcolor{keywordtype}{real}:: stop\_time
320     \textcolor{keywordtype}{integer}:: stat
321     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'DCClockStop'}
322   \textcolor{keywordflow}{continue}
323     \textcolor{keyword}{call }beginsub(subname)
324     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
325     cause\_c = \textcolor{stringliteral}{'CLOCK'}
326     \textcolor{keywordflow}{if} (.not. clk % initialized) \textcolor{keywordflow}{then}
327       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'Call Create before Stop in dc\_clock.'})
328       \textcolor{keyword}{call }dbgmessage(\textcolor{stringliteral}{'Ignored because input argument was not initialized.'})
329       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
330       \textcolor{keywordflow}{goto} 999
331     \textcolor{keywordflow}{elseif} (clk % start\_time < 0.0\_dp) \textcolor{keywordflow}{then}
332       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'Call Start before Stop in dc\_clock.'})
333       \textcolor{keyword}{call }dbgmessage(\textcolor{stringliteral}{'Ignored because input argument was not started.'})
334       \textcolor{keywordflow}{goto} 999
335 \textcolor{keywordflow}{    end if}
336     \textcolor{keyword}{call }cpu\_time(stop\_time)
337     clk % elapsed\_time = clk % elapsed\_time + stop\_time - clk % start\_time
338     clk % start\_time = - 1.0
339     \textcolor{keyword}{call }dbgmessage(\textcolor{stringliteral}{'name=%c, cpu\_time=%r, elapsed\_time=%f'}, &
340       & c1=trim(clk % name), r=(/stop\_time/), d=(/clk % elapsed\_time/))
341 999 \textcolor{keywordflow}{continue}
342     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}(stat, subname, err, cause\_c)
343     \textcolor{keyword}{call }endsub(subname)
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{namespacedc__clock_a60f2a9438e84c38d0783279e38e62e14_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacedc__clock_aab57a5168d80ff1a0f4c4da0490e5eeb}\label{namespacedc__clock_aab57a5168d80ff1a0f4c4da0490e5eeb}} 
\index{dc\+\_\+clock@{dc\+\_\+clock}!dcclocksubtract@{dcclocksubtract}}
\index{dcclocksubtract@{dcclocksubtract}!dc\+\_\+clock@{dc\+\_\+clock}}
\subsubsection{\texorpdfstring{dcclocksubtract()}{dcclocksubtract()}}
{\footnotesize\ttfamily type(\hyperlink{structdc__clock_1_1clock}{clock}) function dc\+\_\+clock\+::dcclocksubtract (\begin{DoxyParamCaption}\item[{type(\hyperlink{structdc__clock_1_1clock}{clock}), intent(in)}]{clk1,  }\item[{type(\hyperlink{structdc__clock_1_1clock}{clock}), intent(in)}]{clk2 }\end{DoxyParamCaption})}



Definition at line 784 of file dc\+\_\+clock.\+f90.


\begin{DoxyCode}
784     \textcolor{comment}{!}
785     \textcolor{comment}{!=== CLOCK 変数を足し合わせる}
786     \textcolor{comment}{!}
787     \textcolor{comment}{! CLOCK 変数 <b>clk1</b> から <b>clk2</b> を引きます. }
788     \textcolor{comment}{! 1 つ目の CLOCK 変数の CPU 時間と}
789     \textcolor{comment}{! 2 つ目の CLOCK 変数の CPU 時間との差を}
790     \textcolor{comment}{! CLOCK 変数として返します. 計測内容の名称は <b>clk1</b> と <b>clk2</b>}
791     \textcolor{comment}{! の名称を '-' で組み合わせたものとなります.}
792     \textcolor{comment}{!}
793     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1cprintf}{cprintf}
794     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date}{dc\_date}\textcolor{keywordtype}{, only}: \textcolor{keyword}{operator}(-), \textcolor{keyword}{operator}(<)
795     \textcolor{keywordtype}{implicit none}
796     \textcolor{keywordtype}{type}(clock), \textcolor{keywordtype}{intent(in)}:: clk1
797     \textcolor{keywordtype}{type}(clock), \textcolor{keywordtype}{intent(in)}:: clk2
798     \textcolor{keywordtype}{type}(clock):: clk\_total
799   \textcolor{keywordflow}{continue}
800     \textcolor{keywordflow}{if} (.not. clk1 % initialized .or. .not. clk2 % initialized) \textcolor{keywordflow}{then}
801       clk\_total % initialized = .false.
802       \textcolor{keywordflow}{return}
803 \textcolor{keywordflow}{    end if}
804     clk\_total % name = \hyperlink{interfacedc__string_1_1cprintf}{cprintf}(\textcolor{stringliteral}{'%c-%c'}, &
805       & c1=trim(clk1 % name), c2=trim(clk2 % name))
806     clk\_total % start\_time = - 1.0
807     clk\_total % initialized = .true.
808     clk\_total % elapsed\_time = 0.0
809     \textcolor{keywordflow}{if} (clk1 % start\_date < clk2 % start\_date) \textcolor{keywordflow}{then}
810       clk\_total % start\_date = clk1 % start\_date
811     \textcolor{keywordflow}{else}
812       clk\_total % start\_date = clk2 % start\_date
813 \textcolor{keywordflow}{    end if}
814     clk\_total % elapsed\_time = &
815       & clk1 % elapsed\_time - clk2 % elapsed\_time
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__clock_ac94f9e94810fe6613f6eabdbed50f906}\label{namespacedc__clock_ac94f9e94810fe6613f6eabdbed50f906}} 
\index{dc\+\_\+clock@{dc\+\_\+clock}!dcclocktochar0@{dcclocktochar0}}
\index{dcclocktochar0@{dcclocktochar0}!dc\+\_\+clock@{dc\+\_\+clock}}
\subsubsection{\texorpdfstring{dcclocktochar0()}{dcclocktochar0()}}
{\footnotesize\ttfamily character(string) function dc\+\_\+clock\+::dcclocktochar0 (\begin{DoxyParamCaption}\item[{type(\hyperlink{structdc__clock_1_1clock}{clock}), intent(in)}]{clk }\end{DoxyParamCaption})}



Definition at line 443 of file dc\+\_\+clock.\+f90.



References fit\+\_\+unit\+\_\+value(), and result\+\_\+value\+\_\+form().


\begin{DoxyCode}
443     \textcolor{comment}{!}
444     \textcolor{comment}{!=== CPU 時間を適当に整形して文字型変数に変換}
445     \textcolor{comment}{!}
446     \textcolor{comment}{! CPU 時間に関して適当に整形を行い, 文字型変数に変換して返します.}
447     \textcolor{comment}{!}
448     \textcolor{comment}{! 第一引数 *clk* に対して DCClockCreate}
449     \textcolor{comment}{! による初期化が行われていない場合, 空文字が返ります.}
450     \textcolor{comment}{!}
451     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1cprintf}{cprintf}
452     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date}{dc\_date}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}
453     \textcolor{keywordtype}{implicit none}
454     \textcolor{keywordtype}{type}(clock), \textcolor{keywordtype}{intent(in)}:: clk
455     \textcolor{keywordtype}{character(STRING)}:: result
456     \textcolor{keywordtype}{character(20)}:: clk\_name
457   \textcolor{keywordflow}{continue}
458     clk\_name = clk % name
459     \textcolor{keywordflow}{if} (clk % initialized) \textcolor{keywordflow}{then}
460       result = \hyperlink{interfacedc__string_1_1cprintf}{cprintf}(\textcolor{stringliteral}{' %c%c  %c'}, c1 = clk\_name, &
461         & c2=trim(result\_value\_form(clk % elapsed\_time)), &
462         & c3=trim(fit\_unit\_value(clk % elapsed\_time)))
463     \textcolor{keywordflow}{else}
464       result = \textcolor{stringliteral}{''}
465 \textcolor{keywordflow}{    end if}
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{namespacedc__clock_ac94f9e94810fe6613f6eabdbed50f906_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacedc__clock_a34945d1c02e19d9e77643f263c4afc4f}\label{namespacedc__clock_a34945d1c02e19d9e77643f263c4afc4f}} 
\index{dc\+\_\+clock@{dc\+\_\+clock}!fit\+\_\+unit\+\_\+value@{fit\+\_\+unit\+\_\+value}}
\index{fit\+\_\+unit\+\_\+value@{fit\+\_\+unit\+\_\+value}!dc\+\_\+clock@{dc\+\_\+clock}}
\subsubsection{\texorpdfstring{fit\+\_\+unit\+\_\+value()}{fit\_unit\_value()}}
{\footnotesize\ttfamily character(token) function dc\+\_\+clock\+::fit\+\_\+unit\+\_\+value (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{sec,  }\item[{type(dc\+\_\+difftime), intent(in), optional}]{diff }\end{DoxyParamCaption})}



Definition at line 680 of file dc\+\_\+clock.\+f90.



References dc\+\_\+types\+::dp, printf\+\_\+g5\+\_\+2(), and dc\+\_\+types\+::token.



Referenced by dcclockpredict0(), dcclockputline0(), dcclockresult0(), and dcclocktochar0().


\begin{DoxyCode}
680     \textcolor{comment}{!}
681     \textcolor{comment}{! 引数 sec に与えられた数値を秒と扱い, }
682     \textcolor{comment}{! 以下のフォーマットに整形して文字型として返します.}
683     \textcolor{comment}{!}
684     \textcolor{comment}{!     (23.18 days)}
685     \textcolor{comment}{!}
686     \textcolor{comment}{! 単位は days, hrs., minutes から適当に}
687     \textcolor{comment}{! 選ばれます. (値が 1 以上の値となるように選ばれます).}
688     \textcolor{comment}{! 1 分以内の場合は空文字を返します.}
689     \textcolor{comment}{!}
690     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
691     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date__types}{dc\_date\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}
692     \textcolor{keywordtype}{use }\hyperlink{namespacedc__date}{dc\_date}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}, \hyperlink{interfacedc__date__generic_1_1evalday}{evalday}, 
      \hyperlink{interfacedc__date__generic_1_1evalhour}{evalhour}, \hyperlink{interfacedc__date__generic_1_1evalmin}{evalmin}, \hyperlink{interfacedc__date__generic_1_1evalsec}{evalsec}
693     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
694     \textcolor{keywordtype}{implicit none}
695     \textcolor{keywordtype}{character(TOKEN)}:: result
696     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: sec
697     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}), \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: diff
698     \textcolor{keywordtype}{type}(\hyperlink{structdc__date__types_1_1dc__difftime}{dc\_difftime}):: diffw
699     \textcolor{keywordtype}{character(TOKEN)}:: unit
700     \textcolor{keywordtype}{real(DP)}:: value
701     \textcolor{keywordtype}{character(TOKEN)}:: cval
702   \textcolor{keywordflow}{continue}
703     \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(diff) ) \textcolor{keywordflow}{then}
704       diffw = diff
705     \textcolor{keywordflow}{else}
706       \textcolor{keyword}{call }\hyperlink{interfacedc__date__generic_1_1dcdifftimecreate}{dcdifftimecreate}( diffw, sec = sec )
707 \textcolor{keywordflow}{    end if}
708     \textcolor{keywordflow}{if} (\hyperlink{interfacedc__date__generic_1_1evalday}{evalday}(diffw) > 1.0\_dp) \textcolor{keywordflow}{then}
709       unit = \textcolor{stringliteral}{' days'}
710       \textcolor{keywordtype}{value} = \hyperlink{interfacedc__date__generic_1_1evalday}{evalday}(diffw)
711     \textcolor{keywordflow}{elseif} (\hyperlink{interfacedc__date__generic_1_1evalhour}{evalhour}(diffw) > 1.0\_dp) \textcolor{keywordflow}{then}
712       unit = \textcolor{stringliteral}{' hrs.'}
713       \textcolor{keywordtype}{value} = \hyperlink{interfacedc__date__generic_1_1evalhour}{evalhour}(diffw)
714     \textcolor{keywordflow}{elseif} (\hyperlink{interfacedc__date__generic_1_1evalmin}{evalmin}(diffw) > 1.0\_dp) \textcolor{keywordflow}{then}
715       unit = \textcolor{stringliteral}{' minutes'}
716       \textcolor{keywordtype}{value} = \hyperlink{interfacedc__date__generic_1_1evalmin}{evalmin}(diffw)
717     \textcolor{keywordflow}{else}
718       result = \textcolor{stringliteral}{''}
719       \textcolor{keywordflow}{return}
720 \textcolor{keywordflow}{    end if}
721     cval = printf\_g5\_2(\textcolor{keywordtype}{value})
722     result = \textcolor{stringliteral}{'('} // trim(adjustl(cval)) // trim(unit) // \textcolor{stringliteral}{')'}
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=317pt]{namespacedc__clock_a34945d1c02e19d9e77643f263c4afc4f_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=337pt]{namespacedc__clock_a34945d1c02e19d9e77643f263c4afc4f_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacedc__clock_a1cdd8cc0cc556d4981290a2943de71ec}\label{namespacedc__clock_a1cdd8cc0cc556d4981290a2943de71ec}} 
\index{dc\+\_\+clock@{dc\+\_\+clock}!printf\+\_\+g5\+\_\+2@{printf\+\_\+g5\+\_\+2}}
\index{printf\+\_\+g5\+\_\+2@{printf\+\_\+g5\+\_\+2}!dc\+\_\+clock@{dc\+\_\+clock}}
\subsubsection{\texorpdfstring{printf\+\_\+g5\+\_\+2()}{printf\_g5\_2()}}
{\footnotesize\ttfamily character(token) function dc\+\_\+clock\+::printf\+\_\+g5\+\_\+2 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{value }\end{DoxyParamCaption})}



Definition at line 725 of file dc\+\_\+clock.\+f90.



References dc\+\_\+types\+::dp, dc\+\_\+types\+::string, and dc\+\_\+types\+::token.



Referenced by dcclockpredict0(), and fit\+\_\+unit\+\_\+value().


\begin{DoxyCode}
725     \textcolor{comment}{!}
726     \textcolor{comment}{! 引数 value に与えられた数値データを}
727     \textcolor{comment}{! 以下のフォーマットに整形して文字型として返します.}
728     \textcolor{comment}{!}
729     \textcolor{comment}{!     23.18}
730     \textcolor{comment}{!      0.23}
731     \textcolor{comment}{!}
732     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}, \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
733     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1cprintf}{cprintf}
734     \textcolor{keywordtype}{implicit none}
735     \textcolor{keywordtype}{character(TOKEN)}:: result
736     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: value
737     \textcolor{keywordtype}{character(TOKEN)}:: int\_part, dem\_part
738     \textcolor{keywordtype}{integer}:: dem\_int
739   \textcolor{keywordflow}{continue}
740     \textcolor{keyword}{write}(int\_part, \textcolor{stringliteral}{"(i20)"}) \hyperlink{interfacedc__scaledsec_1_1int}{int}(\textcolor{keywordtype}{value})
741     dem\_int = nint((\textcolor{keywordtype}{value} - \hyperlink{interfacedc__scaledsec_1_1int}{int}(\textcolor{keywordtype}{value})) * 100)
742     \textcolor{keywordflow}{if} (dem\_int < 0) dem\_int = - dem\_int
743     \textcolor{keywordflow}{if} (dem\_int == 100) \textcolor{keywordflow}{then}
744       dem\_int = 0
745       \textcolor{keyword}{write}(int\_part, \textcolor{stringliteral}{"(i20)"}) \hyperlink{interfacedc__scaledsec_1_1int}{int}(\textcolor{keywordtype}{value}) + 1
746 \textcolor{keywordflow}{    end if}
747     dem\_part = \hyperlink{interfacedc__string_1_1cprintf}{cprintf}(\textcolor{stringliteral}{'%02d'}, i=(/dem\_int/))
748     result = trim(adjustl(int\_part)) // \textcolor{stringliteral}{'.'} // trim(dem\_part)
\end{DoxyCode}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{namespacedc__clock_a1cdd8cc0cc556d4981290a2943de71ec_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacedc__clock_afa39cad42a3d42e1373bfec39a1211f9}\label{namespacedc__clock_afa39cad42a3d42e1373bfec39a1211f9}} 
\index{dc\+\_\+clock@{dc\+\_\+clock}!result\+\_\+value\+\_\+form@{result\+\_\+value\+\_\+form}}
\index{result\+\_\+value\+\_\+form@{result\+\_\+value\+\_\+form}!dc\+\_\+clock@{dc\+\_\+clock}}
\subsubsection{\texorpdfstring{result\+\_\+value\+\_\+form()}{result\_value\_form()}}
{\footnotesize\ttfamily character(token) function dc\+\_\+clock\+::result\+\_\+value\+\_\+form (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{value }\end{DoxyParamCaption})}



Definition at line 666 of file dc\+\_\+clock.\+f90.



References dc\+\_\+types\+::dp, and dc\+\_\+types\+::token.



Referenced by dcclockpredict0(), dcclockresult0(), and dcclocktochar0().


\begin{DoxyCode}
666     \textcolor{comment}{!}
667     \textcolor{comment}{! 引数 value として与えられた倍精度実数型のデータを,}
668     \textcolor{comment}{! 以下のフォーマットに整形して文字型として返します.}
669     \textcolor{comment}{!}
670     \textcolor{comment}{!     0.183400E+02}
671     \textcolor{comment}{!}
672     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
673     \textcolor{keywordtype}{implicit none}
674     \textcolor{keywordtype}{character(TOKEN)}:: result
675     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: value
676   \textcolor{keywordflow}{continue}
677     \textcolor{keyword}{write}(result, \textcolor{stringliteral}{"(e15.6)"}) \textcolor{keywordtype}{value}
\end{DoxyCode}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{namespacedc__clock_afa39cad42a3d42e1373bfec39a1211f9_icgraph}
\end{center}
\end{figure}


\subsection{Variable Documentation}
\mbox{\Hypertarget{namespacedc__clock_a297abf1194fb391e92a61db069caa623}\label{namespacedc__clock_a297abf1194fb391e92a61db069caa623}} 
\index{dc\+\_\+clock@{dc\+\_\+clock}!version@{version}}
\index{version@{version}!dc\+\_\+clock@{dc\+\_\+clock}}
\subsubsection{\texorpdfstring{version}{version}}
{\footnotesize\ttfamily character($\ast$), parameter dc\+\_\+clock\+::version = \textquotesingle{}\$Name\+: \$\textquotesingle{} // \textquotesingle{}\$Id\+: dc\+\_\+clock.\+F90,v 1.\+1 2009-\/03-\/20 09\+:09\+:53 morikawa Exp \$\textquotesingle{}\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 211 of file dc\+\_\+clock.\+f90.



Referenced by dcclockcreate0().


\begin{DoxyCode}
211   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: version = &
212     & \textcolor{stringliteral}{'$Name:  $'} // &
213     & \textcolor{stringliteral}{'$Id: dc\_clock.F90,v 1.1 2009-03-20 09:09:53 morikawa Exp $'}
\end{DoxyCode}
