diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2015-03-11 06:39:48 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2015-03-11 06:39:48 (GMT) |
commit | 52607ae9004a01637dbfc411fd9c0a382f4e3f99 (patch) | |
tree | 58dbdc111ea6ca3ae8dc07d0742beb5a20b6f47e | |
parent | 3ed20376e058b8d17c9c91d2c06107fcb67a0c3c (diff) | |
download | hdf5-52607ae9004a01637dbfc411fd9c0a382f4e3f99.zip hdf5-52607ae9004a01637dbfc411fd9c0a382f4e3f99.tar.gz hdf5-52607ae9004a01637dbfc411fd9c0a382f4e3f99.tar.bz2 |
[svn-r26427] Revert of r26426
The repository wasn't clean when I made some changes so untested
code was committed.
-rwxr-xr-x | bin/chkmanifest | 12 | ||||
-rw-r--r-- | src/H5timer.c | 35 | ||||
-rw-r--r-- | src/H5trace.c | 10 |
3 files changed, 27 insertions, 30 deletions
diff --git a/bin/chkmanifest b/bin/chkmanifest index 646f815..8abd8ea 100755 --- a/bin/chkmanifest +++ b/bin/chkmanifest @@ -79,14 +79,12 @@ done # # First get a list of all the pending files with svn stat and # check those. -svn_stat=`svn stat -q` +svn_stat="$(svn stat -q)" for file in $svn_stat; do - # Newly added files are not listed by svn ls, which - # we check later. - - # The line listing new files starts with 'A'. - letter=`echo $file | head -c 1` + # we check below.. + # The line listing them starts with 'A'. + letter="$(echo $file | head -c 1)" if [ "$letter" = "A" ]; then # Convert the seven Subversion status columns to './' so it matches # the manifest file name. @@ -108,7 +106,7 @@ done # Next check svn ls, which gets a list of all files that are # checked in. -svn_ls=`svn ls -R` +svn_ls="$(svn ls -R)" for file in $svn_ls; do path="./${file}" # Ignore directories diff --git a/src/H5timer.c b/src/H5timer.c index fd9dfcb..94f2883 100644 --- a/src/H5timer.c +++ b/src/H5timer.c @@ -125,21 +125,20 @@ H5_timer_begin (H5_timer_t *timer) HDassert(timer); #ifdef H5_HAVE_GETRUSAGE - HDgetrusage(RUSAGE_SELF, &rusage); + HDgetrusage (RUSAGE_SELF, &rusage); timer->utime = (double)rusage.ru_utime.tv_sec + - ((double)rusage.ru_utime.tv_usec / H5_DOUBLE(1e6)); + ((double)rusage.ru_utime.tv_usec / 1e6F); timer->stime = (double)rusage.ru_stime.tv_sec + - ((double)rusage.ru_stime.tv_usec / H5_DOUBLE(1e6)); + ((double)rusage.ru_stime.tv_usec / 1e6F); #else - timer->utime = H5_DOUBLE(0.0); - timer->stime = H5_DOUBLE(0.0); + timer->utime = 0.0F; + timer->stime = 0.0F; #endif #ifdef H5_HAVE_GETTIMEOFDAY - HDgettimeofday(&etime, NULL); - timer->etime = (double)etime.tv_sec + - ((double)etime.tv_usec / H5_DOUBLE(1e6)); + HDgettimeofday (&etime, NULL); + timer->etime = (double)etime.tv_sec + ((double)etime.tv_usec / 1e6F); #else - timer->etime = H5_DOUBLE(0.0); + timer->etime = 0.0F; #endif } /* end H5_timer_begin() */ @@ -167,9 +166,9 @@ H5_timer_end (H5_timer_t *sum/*in,out*/, H5_timer_t *timer/*in,out*/) HDassert(timer); H5_timer_begin(&now); - timer->utime = MAX(H5_DOUBLE(0.0), now.utime - timer->utime); - timer->stime = MAX(H5_DOUBLE(0.0), now.stime - timer->stime); - timer->etime = MAX(H5_DOUBLE(0.0), now.etime - timer->etime); + timer->utime = MAX(0.0F, now.utime - timer->utime); + timer->stime = MAX(0.0F, now.stime - timer->stime); + timer->etime = MAX(0.0F, now.etime - timer->etime); if (sum) { sum->utime += timer->utime; @@ -185,14 +184,14 @@ H5_timer_end (H5_timer_t *sum/*in,out*/, H5_timer_t *timer/*in,out*/) * Purpose: Prints the bandwidth (bytes per second) in a field 10 * characters wide widh four digits of precision like this: * - * NaN If <= 0.0 seconds + * NaN If <=0 seconds * 1234. TB/s * 123.4 TB/s * 12.34 GB/s * 1.234 MB/s * 4.000 kB/s * 1.000 B/s - * 0.000 B/s If NBYTES == 0.0 + * 0.000 B/s If NBYTES==0 * 1.2345e-10 For bandwidth less than 1 * 6.7893e+94 For exceptionally large values * 6.678e+106 For really big values @@ -205,17 +204,17 @@ H5_timer_end (H5_timer_t *sum/*in,out*/, H5_timer_t *timer/*in,out*/) *------------------------------------------------------------------------- */ void -H5_bandwidth(char *buf /*out*/, double nbytes, double nseconds) +H5_bandwidth(char *buf/*out*/, double nbytes, double nseconds) { double bw; - if(nseconds <= H5_DOUBLE(0.0)) + if(nseconds <= 0.0F) HDstrcpy(buf, " NaN"); else { bw = nbytes/nseconds; - if(H5_DBL_ABS_EQUAL(bw, H5_DOUBLE(0.0))) + if(H5_DBL_ABS_EQUAL(bw, 0.0F)) HDstrcpy(buf, "0.000 B/s"); - else if(bw < H5_DOUBLE(1.0)) + else if(bw < 1.0F) sprintf(buf, "%10.4e", bw); else if(bw < H5_KB) { sprintf(buf, "%05.4f", bw); diff --git a/src/H5trace.c b/src/H5trace.c index cb5a8c8..6634a2a 100644 --- a/src/H5trace.c +++ b/src/H5trace.c @@ -129,34 +129,34 @@ H5_trace(const double *returning, const char *func, const char *type, ...) void *vp = NULL; FILE *out = H5_debug_g.trace; H5_timer_t event_time; - static H5_timer_t first_time = {H5_DOUBLE(0.0), H5_DOUBLE(0.0), H5_DOUBLE(0.0)}; + static H5_timer_t first_time = {0.0F, 0.0F, 0.0F}; static int current_depth = 0; static int last_call_depth = 0; /* FUNC_ENTER() should not be called */ if(!out) - return H5_DOUBLE(0.0); /*tracing is off*/ + return 0.0F; /*tracing is off*/ va_start(ap, type); if(H5_debug_g.ttop) { if(returning) { if(current_depth > 1) { --current_depth; - return H5_DOUBLE(0.0); + return 0.0F; } /* end if */ } /* end if */ else { if(current_depth > 0) { /*do not update last_call_depth*/ current_depth++; - return H5_DOUBLE(0.0); + return 0.0F; } /* end if */ } /* end else */ } /* end if */ /* Get time for event */ - if(HDfabs(first_time.etime) < H5_DOUBLE(0.0000000001)) + if(HDfabs(first_time.etime) < 0.0000000001F) /* That is == 0.0, but direct comparison between floats is bad */ H5_timer_begin(&first_time); if(H5_debug_g.ttimes) |