Liboil Reference Manual |
---|
OilProfileOilProfile — Measuring the length of time needed to execute Liboil functions. |
OilProfile; #define OIL_PROFILE_HIST_LENGTH #define oil_profile_stamp () unsigned long oil_profile_stamp_gtod (void); void oil_profile_init (OilProfile *prof); void oil_profile_stop_handle (OilProfile *prof); void oil_profile_get_ave_std (OilProfile *prof, double *ave_p, double *std_p); #define oil_profile_start (x) #define oil_profile_stop (x)
#define OIL_PROFILE_HIST_LENGTH 10
Internal definition of the number of histogram entries in OilProfile.
#define oil_profile_stamp() oil_profile_stamp_gtod()
Creates a timestamp based on a CPU-specific high-frequency counter, if available.
unsigned long oil_profile_stamp_gtod (void);
Creates a timestamp using the function gettimofday()
.
Returns : | a timestamp |
void oil_profile_init (OilProfile *prof);
Initializes a profiling structure.
prof : |
the OilProfile structure |
void oil_profile_stop_handle (OilProfile *prof);
Handles post-processing of a single profiling run.
FIXME: need more info
prof : |
the OilProfile structure |
void oil_profile_get_ave_std (OilProfile *prof, double *ave_p, double *std_p);
Calculates the average and standard deviation of a number of
profiling runs, and places the results in the locations
provided by ave_p
and std_p
. Either ave_p
and std_p
may
be NULL, in which case the values will not be written.
prof : |
the OilProfile structure |
ave_p : |
pointer to average |
std_p : |
pointer to standard deviation |
#define oil_profile_start(x)
Starts a profiling run by obtaining a timestamp via oil_profile_stamp()
and writing it into x
.
x : |
a pointer to an OilProfile structure |
#define oil_profile_stop(x)
Stops a profiling run by obtaining a timestamp via oil_profile_stamp()
and writing it into x
. It then calls oil_profile_stop_handle()
to
handle post-processing of the profiling run.
x : |
a pointer to an OilProfile structure |
<< OilParameter | OilPrototype >> |