\hypertarget{adpcg_8c}{}\doxysection{src/adpcg.c File Reference}
\label{adpcg_8c}\index{src/adpcg.c@{src/adpcg.c}}


Header for basic types and routine list.  


{\ttfamily \#include $<$string.\+h$>$}\newline
{\ttfamily \#include $<$stdio.\+h$>$}\newline
{\ttfamily \#include $<$stdlib.\+h$>$}\newline
{\ttfamily \#include $<$sys/time.\+h$>$}\newline
{\ttfamily \#include \char`\"{}adpcg.\+h\char`\"{}}\newline
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{adpcg_8c_ae6ce66244a1a8ec8784b4a0fbab98a71}\label{adpcg_8c_ae6ce66244a1a8ec8784b4a0fbab98a71}} 
\#define {\bfseries adpcg\+\_\+free}(var)~do \{free((var)); (var) = NULL;\} while (0)
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
static double \mbox{\hyperlink{adpcg_8c_a0a1279d668859155feec392d753f972a}{my\+\_\+clock}} (void)
\begin{DoxyCompactList}\small\item\em Get time stamp for now. \end{DoxyCompactList}\item 
static cgint \mbox{\hyperlink{adpcg_8c_ae6125dc0de03090118780239204240b0}{cg\+\_\+prepare\+\_\+preconditioner}} (\mbox{\hyperlink{structadpcg}{adpcg}} $\ast$cg)
\begin{DoxyCompactList}\small\item\em Prepare pre-\/conditioner for the CG solver. \end{DoxyCompactList}\item 
static cgint \mbox{\hyperlink{adpcg_8c_a494a49c755f006b1b68e36421d3a5813}{cg\+\_\+precondition}} (\mbox{\hyperlink{structadpcg}{adpcg}} $\ast$cg, void $\ast$v)
\begin{DoxyCompactList}\small\item\em Apply pre-\/conditioning. \end{DoxyCompactList}\item 
static cgint \mbox{\hyperlink{adpcg_8c_a25344647e8c828d40c7584dd36675279}{cg\+\_\+decision}} (\mbox{\hyperlink{structadpcg}{adpcg}} $\ast$cg)
\begin{DoxyCompactList}\small\item\em Decide whether to update pre-\/conditioner. \end{DoxyCompactList}\item 
cgint \mbox{\hyperlink{adpcg_8c_a3b56f427deb776b33651cf0e7d81daf8}{cg\+\_\+iteration}} (\mbox{\hyperlink{structadpcg}{adpcg}} $\ast$cg, void $\ast$b, cgint warm)
\begin{DoxyCompactList}\small\item\em Implement conjugate gradinet. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{adpcg_8c_afdf40148d367eddfe46f567dd77a73d4}{cg\+\_\+init}} (\mbox{\hyperlink{structadpcg}{adpcg}} $\ast$cg)
\begin{DoxyCompactList}\small\item\em Initialize the conjugate gradient solver. \end{DoxyCompactList}\item 
cgint \mbox{\hyperlink{adpcg_8c_a6b92dfb6d54a82b6f8c1f4e7e5b765ce}{cg\+\_\+alloc}} (\mbox{\hyperlink{structadpcg}{adpcg}} $\ast$cg, cgint n, cgint vsize)
\begin{DoxyCompactList}\small\item\em Allocate internal memory for CG solver. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{adpcg_8c_a8a9678238b3f2bef2c41c1430d8888e4}{cg\+\_\+register}} (\mbox{\hyperlink{structadpcg}{adpcg}} $\ast$cg, void $\ast$A, void $\ast$diag, void $\ast$chol)
\begin{DoxyCompactList}\small\item\em Link pointers to LHS matrix, diagonal, and Cholesky pre-\/conditioner. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{adpcg_8c_a01232c348051ba27254a883bba7d36e0}{cg\+\_\+free}} (\mbox{\hyperlink{structadpcg}{adpcg}} $\ast$cg)
\begin{DoxyCompactList}\small\item\em Free the internal memory of CG solver. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{adpcg_8c_aa7a1177e034d6808f3925d74b19112ac}{cg\+\_\+setparam}} (\mbox{\hyperlink{structadpcg}{adpcg}} $\ast$cg, double tol, cgint reuse, cgint maxiter, cgint restart)
\begin{DoxyCompactList}\small\item\em Set parameters for the CG solver. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{adpcg_8c_a1c4e9fe4acfe20a78d506724b52f35ed}{cg\+\_\+getstats}} (\mbox{\hyperlink{structadpcg}{adpcg}} $\ast$cg, cgint $\ast$status, cgint $\ast$niter, double $\ast$rnrm, double $\ast$avgsvtime, double $\ast$avgfctime, cgint $\ast$nused, cgint $\ast$nmaixter, cgint $\ast$nfactors, cgint $\ast$nrounds, cgint $\ast$nsolverd, cgint $\ast$nsolves)
\begin{DoxyCompactList}\small\item\em Extract CG statistics after some solve. \end{DoxyCompactList}\item 
cgint \mbox{\hyperlink{adpcg_8c_a1e35d6019ebca8db1a86da3f4d27ff76}{cg\+\_\+start}} (\mbox{\hyperlink{structadpcg}{adpcg}} $\ast$cg)
\begin{DoxyCompactList}\small\item\em Start a round of solves. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{adpcg_8c_ab2db786b0a4ff73bc1090eb786f07b3a}{cg\+\_\+finish}} (\mbox{\hyperlink{structadpcg}{adpcg}} $\ast$cg)
\begin{DoxyCompactList}\small\item\em Finish a round of solve. \end{DoxyCompactList}\item 
cgint \mbox{\hyperlink{adpcg_8c_a46ef15fb5a41405067fee03eb9ae4321}{cg\+\_\+solve}} (\mbox{\hyperlink{structadpcg}{adpcg}} $\ast$cg, void $\ast$b, void $\ast$x0)
\begin{DoxyCompactList}\small\item\em Solve linear system using adaptive pre-\/conditioned conjugate gradient with restart. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Header for basic types and routine list. 

Solve a sequence of linear systems by either pre-\/conditioned conjugate gradient or direct solver, which is chosen heuristically based on problem conditioning. The routine also implements an adaptive pre-\/conditioning mechanism that updates the pre-\/conditioner automatically. Diagonal and Cholesky pre-\/conditioners are implemented

\begin{DoxyAuthor}{Author}
Wenzhi Gao, Shanghai University of Finance and Economics 
\end{DoxyAuthor}
\begin{DoxyDate}{Date}
Aug 29th, 2022 
\end{DoxyDate}


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{adpcg_8c_a6b92dfb6d54a82b6f8c1f4e7e5b765ce}\label{adpcg_8c_a6b92dfb6d54a82b6f8c1f4e7e5b765ce}} 
\index{adpcg.c@{adpcg.c}!cg\_alloc@{cg\_alloc}}
\index{cg\_alloc@{cg\_alloc}!adpcg.c@{adpcg.c}}
\doxysubsubsection{\texorpdfstring{cg\_alloc()}{cg\_alloc()}}
{\footnotesize\ttfamily cgint cg\+\_\+alloc (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structadpcg}{adpcg}} $\ast$}]{cg,  }\item[{cgint}]{n,  }\item[{cgint}]{vsize }\end{DoxyParamCaption})}



Allocate internal memory for CG solver. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em cg} & Adaptive CG solver \\
\hline
\mbox{\texttt{ in}}  & {\em n} & Dimension of the linear system \\
\hline
\mbox{\texttt{ in}}  & {\em vsize} & Size of vector structure \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
CG\+\_\+\+OK if memory is successfully allocated
\end{DoxyReturn}
Allocate the internal memory for the CG solver. \mbox{\Hypertarget{adpcg_8c_a25344647e8c828d40c7584dd36675279}\label{adpcg_8c_a25344647e8c828d40c7584dd36675279}} 
\index{adpcg.c@{adpcg.c}!cg\_decision@{cg\_decision}}
\index{cg\_decision@{cg\_decision}!adpcg.c@{adpcg.c}}
\doxysubsubsection{\texorpdfstring{cg\_decision()}{cg\_decision()}}
{\footnotesize\ttfamily static cgint cg\+\_\+decision (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structadpcg}{adpcg}} $\ast$}]{cg }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Decide whether to update pre-\/conditioner. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em cg} & CG solver\\
\hline
\end{DoxyParams}
1.\+If the system is classified as ill-\/conditioned or indefinite by some user-\/defined criterion 2.\+If the diagonal pre-\/conditioner is used 3.\+If latesttime \texorpdfstring{$>$}{>} 1.\+5 average solution time 4.\+If ADP-\/\+CG is asked to perform direct solve 5.\+If average solution time \texorpdfstring{$>$}{>} average factorization time 6.\+If the \char`\"{}nused\char`\"{} property of the current pre-\/conditioner exceeds the user-\/defined threshold \mbox{\Hypertarget{adpcg_8c_ab2db786b0a4ff73bc1090eb786f07b3a}\label{adpcg_8c_ab2db786b0a4ff73bc1090eb786f07b3a}} 
\index{adpcg.c@{adpcg.c}!cg\_finish@{cg\_finish}}
\index{cg\_finish@{cg\_finish}!adpcg.c@{adpcg.c}}
\doxysubsubsection{\texorpdfstring{cg\_finish()}{cg\_finish()}}
{\footnotesize\ttfamily void cg\+\_\+finish (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structadpcg}{adpcg}} $\ast$}]{cg }\end{DoxyParamCaption})}



Finish a round of solve. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em cg} & CG solver\\
\hline
\end{DoxyParams}
At the end of each round,
\begin{DoxyEnumerate}
\item nused increases by 1
\item currenttime overwrites latesttime
\item nsolverd is reset 
\end{DoxyEnumerate}\mbox{\Hypertarget{adpcg_8c_a01232c348051ba27254a883bba7d36e0}\label{adpcg_8c_a01232c348051ba27254a883bba7d36e0}} 
\index{adpcg.c@{adpcg.c}!cg\_free@{cg\_free}}
\index{cg\_free@{cg\_free}!adpcg.c@{adpcg.c}}
\doxysubsubsection{\texorpdfstring{cg\_free()}{cg\_free()}}
{\footnotesize\ttfamily void cg\+\_\+free (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structadpcg}{adpcg}} $\ast$}]{cg }\end{DoxyParamCaption})}



Free the internal memory of CG solver. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em cg} & CG solver\\
\hline
\end{DoxyParams}
Free all the internal memory allocated by adaptive CG solver. The solver pointer itself has to be freed by user. \mbox{\Hypertarget{adpcg_8c_a1c4e9fe4acfe20a78d506724b52f35ed}\label{adpcg_8c_a1c4e9fe4acfe20a78d506724b52f35ed}} 
\index{adpcg.c@{adpcg.c}!cg\_getstats@{cg\_getstats}}
\index{cg\_getstats@{cg\_getstats}!adpcg.c@{adpcg.c}}
\doxysubsubsection{\texorpdfstring{cg\_getstats()}{cg\_getstats()}}
{\footnotesize\ttfamily void cg\+\_\+getstats (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structadpcg}{adpcg}} $\ast$}]{cg,  }\item[{cgint $\ast$}]{status,  }\item[{cgint $\ast$}]{niter,  }\item[{double $\ast$}]{rnrm,  }\item[{double $\ast$}]{avgsvtime,  }\item[{double $\ast$}]{avgfctime,  }\item[{cgint $\ast$}]{nused,  }\item[{cgint $\ast$}]{nmaixter,  }\item[{cgint $\ast$}]{nfactors,  }\item[{cgint $\ast$}]{nrounds,  }\item[{cgint $\ast$}]{nsolverd,  }\item[{cgint $\ast$}]{nsolves }\end{DoxyParamCaption})}



Extract CG statistics after some solve. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em cg} & CG solver \\
\hline
\mbox{\texttt{ out}}  & {\em status} & CG solution status \\
\hline
\mbox{\texttt{ out}}  & {\em niter} & Number of CG iterations \\
\hline
\mbox{\texttt{ out}}  & {\em rnrm} & Residual norm \\
\hline
\mbox{\texttt{ out}}  & {\em avgsvtime} & Current avarage solution time \\
\hline
\mbox{\texttt{ out}}  & {\em avgfctime} & Current average factorization time \\
\hline
\mbox{\texttt{ out}}  & {\em nused} & Current number of iterations the pre-\/conditioner is used \\
\hline
\mbox{\texttt{ out}}  & {\em nmaixter} & Number of iterations CG fails to solve the system \\
\hline
\mbox{\texttt{ out}}  & {\em nfactors} & Number of factorizations \\
\hline
\mbox{\texttt{ out}}  & {\em nrounds} & Number of rounds \\
\hline
\mbox{\texttt{ out}}  & {\em nsolverd} & Number of solves in the current round \\
\hline
\mbox{\texttt{ out}}  & {\em nsolves} & Number of solves\\
\hline
\end{DoxyParams}
Collect different CG statistics. If some statistic is not needed, just let it be NULL. \mbox{\Hypertarget{adpcg_8c_afdf40148d367eddfe46f567dd77a73d4}\label{adpcg_8c_afdf40148d367eddfe46f567dd77a73d4}} 
\index{adpcg.c@{adpcg.c}!cg\_init@{cg\_init}}
\index{cg\_init@{cg\_init}!adpcg.c@{adpcg.c}}
\doxysubsubsection{\texorpdfstring{cg\_init()}{cg\_init()}}
{\footnotesize\ttfamily void cg\+\_\+init (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structadpcg}{adpcg}} $\ast$}]{cg }\end{DoxyParamCaption})}



Initialize the conjugate gradient solver. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em cg} & Adaptive CG solver Initlaize all the pointers to NULL and values to 0 \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{adpcg_8c_a3b56f427deb776b33651cf0e7d81daf8}\label{adpcg_8c_a3b56f427deb776b33651cf0e7d81daf8}} 
\index{adpcg.c@{adpcg.c}!cg\_iteration@{cg\_iteration}}
\index{cg\_iteration@{cg\_iteration}!adpcg.c@{adpcg.c}}
\doxysubsubsection{\texorpdfstring{cg\_iteration()}{cg\_iteration()}}
{\footnotesize\ttfamily cgint cg\+\_\+iteration (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structadpcg}{adpcg}} $\ast$}]{cg,  }\item[{void $\ast$}]{b,  }\item[{cgint}]{warm }\end{DoxyParamCaption})}



Implement conjugate gradinet. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em cg} & CG solver \\
\hline
\mbox{\texttt{ in}}  & {\em b} & RHS vector \\
\hline
\mbox{\texttt{ in}}  & {\em warm} & If there is warm start?\\
\hline
\end{DoxyParams}
Implement pre-\/conditioned CG with restart \mbox{\Hypertarget{adpcg_8c_a494a49c755f006b1b68e36421d3a5813}\label{adpcg_8c_a494a49c755f006b1b68e36421d3a5813}} 
\index{adpcg.c@{adpcg.c}!cg\_precondition@{cg\_precondition}}
\index{cg\_precondition@{cg\_precondition}!adpcg.c@{adpcg.c}}
\doxysubsubsection{\texorpdfstring{cg\_precondition()}{cg\_precondition()}}
{\footnotesize\ttfamily static cgint cg\+\_\+precondition (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structadpcg}{adpcg}} $\ast$}]{cg,  }\item[{void $\ast$}]{v }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Apply pre-\/conditioning. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em cg} & CG solver \\
\hline
\mbox{\texttt{ in}}  & {\em v} & Overwritten by P \textbackslash{} v \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
CG\+\_\+\+OK if pre-\/conditioning is done successfully 
\end{DoxyReturn}
\mbox{\Hypertarget{adpcg_8c_ae6125dc0de03090118780239204240b0}\label{adpcg_8c_ae6125dc0de03090118780239204240b0}} 
\index{adpcg.c@{adpcg.c}!cg\_prepare\_preconditioner@{cg\_prepare\_preconditioner}}
\index{cg\_prepare\_preconditioner@{cg\_prepare\_preconditioner}!adpcg.c@{adpcg.c}}
\doxysubsubsection{\texorpdfstring{cg\_prepare\_preconditioner()}{cg\_prepare\_preconditioner()}}
{\footnotesize\ttfamily static cgint cg\+\_\+prepare\+\_\+preconditioner (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structadpcg}{adpcg}} $\ast$}]{cg }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Prepare pre-\/conditioner for the CG solver. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em cg} & CG solver \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
CG\+\_\+\+OK if the pre-\/conditioner is successfully collected
\end{DoxyReturn}
The method invokes internal preparation routine of pre-\/conditioner. The time computing pre-\/conditioner is counted into avgsvtime \mbox{\Hypertarget{adpcg_8c_a8a9678238b3f2bef2c41c1430d8888e4}\label{adpcg_8c_a8a9678238b3f2bef2c41c1430d8888e4}} 
\index{adpcg.c@{adpcg.c}!cg\_register@{cg\_register}}
\index{cg\_register@{cg\_register}!adpcg.c@{adpcg.c}}
\doxysubsubsection{\texorpdfstring{cg\_register()}{cg\_register()}}
{\footnotesize\ttfamily void cg\+\_\+register (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structadpcg}{adpcg}} $\ast$}]{cg,  }\item[{void $\ast$}]{A,  }\item[{void $\ast$}]{diag,  }\item[{void $\ast$}]{chol }\end{DoxyParamCaption})}



Link pointers to LHS matrix, diagonal, and Cholesky pre-\/conditioner. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em cg} & CG Solver \\
\hline
\mbox{\texttt{ in}}  & {\em A} & Left hand side matrix \\
\hline
\mbox{\texttt{ in}}  & {\em diag} & Diagonal matrix \\
\hline
\mbox{\texttt{ in}}  & {\em chol} & Cholesky factor\\
\hline
\end{DoxyParams}
Register pointers for coefficient data, diagonal matrix and Cholesky factor \mbox{\Hypertarget{adpcg_8c_aa7a1177e034d6808f3925d74b19112ac}\label{adpcg_8c_aa7a1177e034d6808f3925d74b19112ac}} 
\index{adpcg.c@{adpcg.c}!cg\_setparam@{cg\_setparam}}
\index{cg\_setparam@{cg\_setparam}!adpcg.c@{adpcg.c}}
\doxysubsubsection{\texorpdfstring{cg\_setparam()}{cg\_setparam()}}
{\footnotesize\ttfamily void cg\+\_\+setparam (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structadpcg}{adpcg}} $\ast$}]{cg,  }\item[{double}]{tol,  }\item[{cgint}]{reuse,  }\item[{cgint}]{maxiter,  }\item[{cgint}]{restart }\end{DoxyParamCaption})}



Set parameters for the CG solver. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em cg} & CG solver \\
\hline
\mbox{\texttt{ in}}  & {\em tol} & Relative solution tolerance \\
\hline
\mbox{\texttt{ in}}  & {\em reuse} & The maximum reuse number \\
\hline
\mbox{\texttt{ in}}  & {\em maxiter} & Maximum of iteration \\
\hline
\mbox{\texttt{ in}}  & {\em restart} & Restart frequency of CG. -\/1 if automatically decided\\
\hline
\end{DoxyParams}
Set CG parameters \mbox{\Hypertarget{adpcg_8c_a46ef15fb5a41405067fee03eb9ae4321}\label{adpcg_8c_a46ef15fb5a41405067fee03eb9ae4321}} 
\index{adpcg.c@{adpcg.c}!cg\_solve@{cg\_solve}}
\index{cg\_solve@{cg\_solve}!adpcg.c@{adpcg.c}}
\doxysubsubsection{\texorpdfstring{cg\_solve()}{cg\_solve()}}
{\footnotesize\ttfamily cgint cg\+\_\+solve (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structadpcg}{adpcg}} $\ast$}]{cg,  }\item[{void $\ast$}]{b,  }\item[{void $\ast$}]{x0 }\end{DoxyParamCaption})}



Solve linear system using adaptive pre-\/conditioned conjugate gradient with restart. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em cg} & CG Solver \\
\hline
\mbox{\texttt{ in}}  & {\em b} & RHS vector. Overwritten when solved \\
\hline
\mbox{\texttt{ in}}  & {\em x0} & Initial point\\
\hline
\end{DoxyParams}
Solve the linear system by adaptive pre-\/conditioning and restart. \mbox{\Hypertarget{adpcg_8c_a1e35d6019ebca8db1a86da3f4d27ff76}\label{adpcg_8c_a1e35d6019ebca8db1a86da3f4d27ff76}} 
\index{adpcg.c@{adpcg.c}!cg\_start@{cg\_start}}
\index{cg\_start@{cg\_start}!adpcg.c@{adpcg.c}}
\doxysubsubsection{\texorpdfstring{cg\_start()}{cg\_start()}}
{\footnotesize\ttfamily cgint cg\+\_\+start (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structadpcg}{adpcg}} $\ast$}]{cg }\end{DoxyParamCaption})}



Start a round of solves. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em cg} & CG solver\\
\hline
\end{DoxyParams}
Several rules decide whether to update the current pre-\/conditioner \mbox{\Hypertarget{adpcg_8c_a0a1279d668859155feec392d753f972a}\label{adpcg_8c_a0a1279d668859155feec392d753f972a}} 
\index{adpcg.c@{adpcg.c}!my\_clock@{my\_clock}}
\index{my\_clock@{my\_clock}!adpcg.c@{adpcg.c}}
\doxysubsubsection{\texorpdfstring{my\_clock()}{my\_clock()}}
{\footnotesize\ttfamily static double my\+\_\+clock (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Get time stamp for now. 

\begin{DoxyReturn}{Returns}
Current time stamp 
\end{DoxyReturn}
