~ubuntu-branches/ubuntu/warty/petsc/warty

« back to all changes in this revision

Viewing changes to src/sys/src/plog/ptime.h.html

  • Committer: Bazaar Package Importer
  • Author(s): Adam C. Powell, IV
  • Date: 2004-06-07 13:41:43 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040607134143-92p586zrauvie0le
Tags: 2.2.0-2
* Upstream patch level 2.
* New PETSC_BOPT_EXTRA option for different BOPT and lib names, with _c++
  symlinks only for plain and single (closes: #249617).
* New DEBIAN_DIST=contrib option to link with hypre, parmetis (closes:
  #249619).
* Combined petsc-c and petsc-fortran substvars into petsc-compilers.
* Extra quote in -dev prerm eliminates "too many arguments" problem.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
<html>
4
4
<head>
5
5
<title></title>
6
 
<meta name="generator" content="c2html 0.9.1">
7
 
<meta name="date" content="2002-05-31T15:59:33+00:00">
 
6
<meta name="generator" content="c2html 0.9.4">
 
7
<meta name="date" content="2004-02-27T19:57:02+00:00">
8
8
</head>
9
9
 
10
10
<body bgcolor="#FFFFFF">
39
39
<a name="line31"> 31: </a><font color="#B22222">     PetscLogDouble v;</font>
40
40
<a name="line32"> 32: </a><font color="#B22222">     PetscTime(v);</font>
41
41
<a name="line33"> 33: </a><font color="#B22222">     .... perform some calculation ...</font>
42
 
<a name="line34"> 34: </a><font color="#B22222">     printf("Time for operation %gn",v);</font>
 
42
<a name="line34"> 34: </a><font color="#B22222">     printf("Time for operation %g\n",v);</font>
43
43
 
44
44
<a name="line36"> 36: </a><font color="#B22222">   Notes:</font>
45
45
<a name="line37"> 37: </a><font color="#B22222">   Since the PETSc libraries incorporate timing of phases and operations, </font>
130
130
<a name="line122">122: </a>EXTERN_C_END
131
131
 
132
132
 
133
 
<a name="line125">125: </a><strong><font color="#228B22">#define PetscTime(v)         {static struct  timespec _tp; </font></strong>
134
 
<a name="line126">126: </a><strong><font color="#228B22">                             getclock(TIMEOFDAY,&amp;_tp); </font></strong>
 
133
<a name="line125">125: </a><strong><font color="#228B22">#define PetscTime(v)         {static struct  timespec _tp; \</font></strong>
 
134
<a name="line126">126: </a><strong><font color="#228B22">                             getclock(TIMEOFDAY,&amp;_tp); \</font></strong>
135
135
<a name="line127">127: </a><strong><font color="#228B22">                             (v)=((PetscLogDouble)_tp.tv_sec)+(1.0e-9)*(_tp.tv_nsec);}</font></strong>
136
136
 
137
 
<a name="line129">129: </a><strong><font color="#228B22">#define PetscTimeSubtract(v) {static struct timespec  _tp; </font></strong>
138
 
<a name="line130">130: </a><strong><font color="#228B22">                             getclock(TIMEOFDAY,&amp;_tp); </font></strong>
 
137
<a name="line129">129: </a><strong><font color="#228B22">#define PetscTimeSubtract(v) {static struct timespec  _tp; \</font></strong>
 
138
<a name="line130">130: </a><strong><font color="#228B22">                             getclock(TIMEOFDAY,&amp;_tp); \</font></strong>
139
139
<a name="line131">131: </a><strong><font color="#228B22">                             (v)-=((PetscLogDouble)_tp.tv_sec)+(1.0e-9)*(_tp.tv_nsec);}</font></strong>
140
140
 
141
 
<a name="line133">133: </a><strong><font color="#228B22">#define PetscTimeAdd(v)      {static struct timespec  _tp; </font></strong>
142
 
<a name="line134">134: </a><strong><font color="#228B22">                             getclock(TIMEOFDAY,&amp;_tp); </font></strong>
 
141
<a name="line133">133: </a><strong><font color="#228B22">#define PetscTimeAdd(v)      {static struct timespec  _tp; \</font></strong>
 
142
<a name="line134">134: </a><strong><font color="#228B22">                             getclock(TIMEOFDAY,&amp;_tp); \</font></strong>
143
143
<a name="line135">135: </a><strong><font color="#228B22">                             (v)+=((PetscLogDouble)_tp.tv_sec)+(1.0e-9)*(_tp.tv_nsec);}</font></strong>
144
144
 
145
145
<a name="line137">137: </a><font color="#B22222">/* ------------------------------------------------------------------</font>
173
173
<a name="line165">165: </a><font color="#B22222">    The usual Unix time routines.</font>
174
174
<a name="line166">166: </a><font color="#B22222">*/</font>
175
175
<a name="line167">167: </a><font color="#A020F0">#else</font>
176
 
<a name="line168">168: </a><strong><font color="#228B22">#define PetscTime(v)         {static struct timeval _tp; </font></strong>
177
 
<a name="line169">169: </a><strong><font color="#228B22">                             gettimeofday(&amp;_tp,(struct timezone *)0);</font></strong>
 
176
<a name="line168">168: </a><strong><font color="#228B22">#define PetscTime(v)         {static struct timeval _tp; \</font></strong>
 
177
<a name="line169">169: </a><strong><font color="#228B22">                             gettimeofday(&amp;_tp,(struct timezone *)0);\</font></strong>
178
178
<a name="line170">170: </a><strong><font color="#228B22">                             (v)=((PetscLogDouble)_tp.tv_sec)+(1.0e-6)*(_tp.tv_usec);}</font></strong>
179
179
 
180
 
<a name="line172">172: </a><strong><font color="#228B22">#define PetscTimeSubtract(v) {static struct timeval _tp; </font></strong>
181
 
<a name="line173">173: </a><strong><font color="#228B22">                             gettimeofday(&amp;_tp,(struct timezone *)0);</font></strong>
 
180
<a name="line172">172: </a><strong><font color="#228B22">#define PetscTimeSubtract(v) {static struct timeval _tp; \</font></strong>
 
181
<a name="line173">173: </a><strong><font color="#228B22">                             gettimeofday(&amp;_tp,(struct timezone *)0);\</font></strong>
182
182
<a name="line174">174: </a><strong><font color="#228B22">                             (v)-=((PetscLogDouble)_tp.tv_sec)+(1.0e-6)*(_tp.tv_usec);}</font></strong>
183
183
 
184
 
<a name="line176">176: </a><strong><font color="#228B22">#define PetscTimeAdd(v)      {static struct timeval _tp; </font></strong>
185
 
<a name="line177">177: </a><strong><font color="#228B22">                             gettimeofday(&amp;_tp,(struct timezone *)0);</font></strong>
 
184
<a name="line176">176: </a><strong><font color="#228B22">#define PetscTimeAdd(v)      {static struct timeval _tp; \</font></strong>
 
185
<a name="line177">177: </a><strong><font color="#228B22">                             gettimeofday(&amp;_tp,(struct timezone *)0);\</font></strong>
186
186
<a name="line178">178: </a><strong><font color="#228B22">                             (v)+=((PetscLogDouble)_tp.tv_sec)+(1.0e-6)*(_tp.tv_usec);}</font></strong>
187
187
<a name="line179">179: </a><font color="#A020F0">#endif</font>
188
188