Timing/report.h File Reference

Define interface to reporting infrastructure

if -DCOUNT is among the compile flags, then certain algorithms are enabled to compute the number of comparisons, the number of swaps, and the number of comparisons with Null. More...

#include <sys/time.h>

Go to the source code of this file.

Functions

long diffTimer (struct timeval *before, struct timeval *after)
 This code is used by both C and C++.
void printDiffTimer (long usecs)
 Print the time difference.
char * timingString (long usecs)
 Convert microseconds into string showing seconds and microseconds.

Variables

long __compTotal
 reporting variables to be defined in report.c
long __compNilTotal
long __swapTotal
 defined here so we can reuse code compiled for use with benchmarking.
int verbose
 Whether run is to be executing in verbose mode.
int numElements
 Most important parameter is the number of elements selected.


Detailed Description

Define interface to reporting infrastructure

if -DCOUNT is among the compile flags, then certain algorithms are enabled to compute the number of comparisons, the number of swaps, and the number of comparisons with Null.

Also exposes some core logic used by reporting throughout.

Author:
George Heineman
Date:
6/15/08

Function Documentation

long diffTimer ( struct timeval *  before,
struct timeval *  after 
)

This code is used by both C and C++.

Parameters:
before Time before a computation started
after Time when a computation completed
Returns:
difference of these two times in long microseconds.

void printDiffTimer ( long  usecs  ) 

Print the time difference.

char* timingString ( long  usecs  ) 

Convert microseconds into string showing seconds and microseconds.

Parameters:
usecs absolute time amount in microseconds
Returns:
a char* string representing "N.M" seconds.


Variable Documentation

long __compNilTotal

long __compTotal

reporting variables to be defined in report.c

long __swapTotal

defined here so we can reuse code compiled for use with benchmarking.

int numElements

Most important parameter is the number of elements selected.

Note: This behavior is unusual. You have been warned.

int verbose

Whether run is to be executing in verbose mode.

Algorithm Development Kit 1.0