RecFilter
timing.h File Reference
#include <iostream>
#include <fstream>
#include <string>

Go to the source code of this file.

Data Structures

class  Log
 Logging utility. More...
 

Functions

float throughput (float runtime, int pixels)
 Compute the throughput in Gibipixels = 2^30 pixels. More...
 
unsigned long millisecond_timer (void)
 Millisecond-precision timer function. More...
 

Function Documentation

float throughput ( float  runtime,
int  pixels 
)

Compute the throughput in Gibipixels = 2^30 pixels.

Parameters
runtimerunning time in milliseconds
pixelsnumber of pixels
Returns
throughput in MiP/s
unsigned long millisecond_timer ( void  )

Millisecond-precision timer function.

Returns
Clock value in milliseconds

This routine implements a timer with millisecond precision. In order to obtain timing at high resolution, platform-specific functions are needed:

  • On Windows systems, the GetSystemTime function is used.
  • On Mac and POSIX systems, the gettimeofday function is used.

Preprocessor symbols are checked in attempt to detect whether the platform is POSIX or Windows or Mac and defines millisecond_timer() accordingly.