summaryrefslogtreecommitdiffstats
path: root/perform/pio_timer.c
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2001-12-04 22:23:54 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2001-12-04 22:23:54 (GMT)
commit4a124d00cc1ffe395ffc45a8c1a44ac63390b364 (patch)
tree5aa116e254eb2094bd1210fedd89b6960d6bf554 /perform/pio_timer.c
parenta330835a5b44954570b176bf9a57bdbbc88a40cf (diff)
downloadhdf5-4a124d00cc1ffe395ffc45a8c1a44ac63390b364.zip
hdf5-4a124d00cc1ffe395ffc45a8c1a44ac63390b364.tar.gz
hdf5-4a124d00cc1ffe395ffc45a8c1a44ac63390b364.tar.bz2
[svn-r4667]
Purpose: Code Cleanup and Feature Add Description: Finally checking in the changes I made to the performance code. It just modularizes it a bit more and performs some more checks, etc. I also renamed the timer functions to be more inline with how other things are named here... Platforms tested: Linux
Diffstat (limited to 'perform/pio_timer.c')
-rw-r--r--perform/pio_timer.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/perform/pio_timer.c b/perform/pio_timer.c
index 6fc078e..247b3c3 100644
--- a/perform/pio_timer.c
+++ b/perform/pio_timer.c
@@ -26,35 +26,35 @@
#define MILLISECOND 1000000.0
/*
- * Function: perf_time_new
+ * Function: pio_time_new
* Purpose: Build us a brand, spankin', new performance time object.
* The object is a black box to the user. They just tell us
* what type of timer they want (MPI_TIMER for MPI_Wtime or
* SYS_TIMER for system time).
- * Return: Pointer to perf_time object
+ * Return: Pointer to pio_time object
* Programmer: Bill Wendling, 01. October 2001
* Modifications:
*/
-perf_time *
-perf_time_new(unsigned int type)
+pio_time *
+pio_time_new(unsigned int type)
{
- perf_time *pt = (perf_time *)calloc(1, sizeof(struct perf_time_));
+ pio_time *pt = (pio_time *)calloc(1, sizeof(struct pio_time_));
pt->type = type;
return pt;
}
/*
- * Function: perf_time_destroy
- * Purpose: Remove the memory allocated for the perf_time object. Only
- * need to call on a pointer allocated with the ``perf_time_new''
+ * Function: pio_time_destroy
+ * Purpose: Remove the memory allocated for the pio_time object. Only
+ * need to call on a pointer allocated with the ``pio_time_new''
* function.
* Return: Nothing
* Programmer: Bill Wendling, 01. October 2001
* Modifications:
*/
void
-perf_time_destroy(perf_time *pt)
+pio_time_destroy(pio_time *pt)
{
free(pt);
}
@@ -63,13 +63,13 @@ perf_time_destroy(perf_time *pt)
* Function: set_timer_type
* Purpose: Set the type of the timer to either MPI_TIMER or SYS_TIMER.
* This really only needs to be called if you didn't construct a
- * timer with the perf_timer_new function (shame!).
+ * timer with the pio_timer_new function (shame!).
* Return: Nothing
* Programmer: Bill Wendling, 04. October 2001
* Modifications:
*/
void
-set_timer_type(perf_time *pt, timer_type type)
+set_timer_type(pio_time *pt, timer_type type)
{
pt->type = type;
}
@@ -82,20 +82,20 @@ set_timer_type(perf_time *pt, timer_type type)
* Modifications:
*/
timer_type
-get_timer_type(perf_time *pt)
+get_timer_type(pio_time *pt)
{
return pt->type;
}
/*
* Function: set_time
- * Purpose: Set the time in a ``perf_time'' object.
- * Return: Pointer to the passed in ``perf_time'' object.
+ * Purpose: Set the time in a ``pio_time'' object.
+ * Return: Pointer to the passed in ``pio_time'' object.
* Programmer: Bill Wendling, 01. October 2001
* Modifications:
*/
-perf_time *
-set_time(perf_time *pt, timer_type t, int start_stop)
+pio_time *
+set_time(pio_time *pt, timer_type t, int start_stop)
{
if (pt) {
if (pt->type == MPI_TIMER) {
@@ -122,13 +122,13 @@ set_time(perf_time *pt, timer_type t, int start_stop)
/*
* Function: get_time
- * Purpose: Get the time from a ``perf_time'' object.
+ * Purpose: Get the time from a ``pio_time'' object.
* Return: The number of seconds as a DOUBLE.
* Programmer: Bill Wendling, 01. October 2001
* Modifications:
*/
double
-get_time(perf_time *pt, timer_type t)
+get_time(pio_time *pt, timer_type t)
{
return pt->total_time[t];
}