diff options
Diffstat (limited to 'perform/pio_timer.h')
-rw-r--r-- | perform/pio_timer.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/perform/pio_timer.h b/perform/pio_timer.h index 4144825..81916dd 100644 --- a/perform/pio_timer.h +++ b/perform/pio_timer.h @@ -28,21 +28,25 @@ typedef enum timer_type_ { HDF5_FINE_READ_FIXED_DIMS, HDF5_GROSS_WRITE_FIXED_DIMS, HDF5_GROSS_READ_FIXED_DIMS, + HDF5_RAW_WRITE_FIXED_DIMS, + HDF5_RAW_READ_FIXED_DIMS, NUM_TIMERS } timer_type; -/* Miscellaneous identifiers */ -enum { +typedef enum clock_type_ { MPI_TIMER = 0, /* Use MPI timer to measure time */ - SYS_TIMER = 1, /* Use system clock to measure time */ + SYS_TIMER = 1 /* Use system clock to measure time */ +} clock_type; +/* Miscellaneous identifiers */ +enum { START, /* Start a specified timer */ STOP /* Stop a specified timer */ }; /* The performance time structure */ typedef struct pio_time_ { - unsigned int type : 1; + clock_type type; double total_time[NUM_TIMERS]; double mpi_timer[NUM_TIMERS]; struct timeval sys_timer[NUM_TIMERS]; @@ -52,10 +56,10 @@ typedef struct pio_time_ { #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ -extern pio_time *pio_time_new(unsigned int); +extern pio_time *pio_time_new(clock_type t); extern void pio_time_destroy(pio_time *pt); -extern void set_timer_type(pio_time *pt, timer_type type); -extern timer_type get_timer_type(pio_time *pt); +extern void set_timer_type(pio_time *pt, clock_type type); +extern clock_type get_timer_type(pio_time *pt); extern pio_time *set_time(pio_time *pt, timer_type t, int start_stop); extern double get_time(pio_time *pt, timer_type t); #ifdef __cplusplus |