timer.h File Reference

Timing module. More...

#include <oski/common.h>

Go to the source code of this file.

Defines

#define INC_OSKI_TIMER_H
 oski/timer.h included.
#define INVALID_TIMER   ((oski_timer_t)NULL)
 Invalid timer object.

Typedefs

typedef struct
tagBebop_timerstruct_t
oski_timer_t
 Timer object.

Functions

oski_timer_t oski_CreateTimer (void)
 Allocate a new timer.
void oski_DestroyTimer (oski_timer_t timer)
 Free previously allocated timer.
void oski_RestartTimer (oski_timer_t timer)
 Start virtual stopwatch.
void oski_StopTimer (oski_timer_t timer)
 Stop virtual stopwatch.
const char * oski_GetTimerDesc (oski_timer_t timer)
 Get a short string description of the timer being used.
double oski_ReadElapsedTime (oski_timer_t timer)
 Check virtual stopwatch and return elapsed time, in seconds, since the last call to either oski_RestartTimer() or oski_StopTimer(), whichever happened most recently.
void oski_CalibrateTimer (oski_timer_t timer)
 Initialize timer.
double oski_GetTimerSecsPerTick (void)
 Get the current calibration factor.


Detailed Description

Timing module.


Define Documentation

#define INC_OSKI_TIMER_H

oski/timer.h included.

#define INVALID_TIMER   ((oski_timer_t)NULL)

Invalid timer object.

Referenced by ChooseFastest(), main(), oski_CalibrateTimer(), and oski_CreateTimer().


Function Documentation

void oski_CalibrateTimer ( oski_timer_t  timer  ) 

Initialize timer.

An application should call this at least once during its start-up to cache calibration results.

References g_seconds_per_tick, INVALID_TIMER, oski_GetTimerDesc(), oski_PrintDebugMessage(), and tagBebop_timerstruct_t::seconds_per_tick.

Referenced by oski_CreateTimer(), and oski_GetTimerSecsPerTick().

const char* oski_GetTimerDesc ( oski_timer_t  timer  ) 

Get a short string description of the timer being used.

Referenced by oski_CalibrateTimer().

double oski_ReadElapsedTime ( oski_timer_t  timer  ) 

Check virtual stopwatch and return elapsed time, in seconds, since the last call to either oski_RestartTimer() or oski_StopTimer(), whichever happened most recently.

Note:
If the caller has never restarted this timer, then the results are garbage.

References tagBebop_timerstruct_t::is_running, tagBebop_timerstruct_t::seconds_per_tick, tagBebop_timerstruct_t::t_end, and tagBebop_timerstruct_t::t_start.

Referenced by ChooseFastest(), main(), MeasureStreamTimeCSR(), oski_MatMult(), oski_MatMultAndMatTransMult(), oski_MatPowMult(), oski_MatTransMatMult(), oski_MatTrisolve(), and oski_TuneMat().


Generated on Fri Apr 8 22:35:20 2011 for BeBOP Optimized Sparse Kernel Interface Library by  doxygen 1.5.9