helpers.h File Reference

Go to the source code of this file.


#define MY_MAX(a, b)   (((a) > (b)) ? (a) : (b))
#define MY_MIN(a, b)   (((a) < (b)) ? (a) : (b))


float invert_byte_order_float (float x)
unsigned long invert_byte_order_long (unsigned long x)
unsigned int invert_byte_order_int (unsigned int x)
unsigned short invert_byte_order_short (unsigned short x)
long invert_byte_order_long (long x)
int invert_byte_order_int (int x)
short invert_byte_order_short (short x)
void get_timer_value (unsigned int &sec, unsigned int &usec)
unsigned int get_timer_value (bool bResetTimer=false)
int my_round (double x)
int my_round (float x)
double uniform_random ()
double gaussian_random ()
float uniform_random_float ()
float gaussian_random_float ()
void sleep_ms (unsigned int ms)
void hsv2rgb (int h, int s, int v, int &r, int &g, int &b)
void rgb2hsv (int r, int g, int b, int &h, int &s, int &v)
void * aligned_malloc (unsigned int size, unsigned int align_size=16)
void aligned_free (void *ptr)
const char * GetVersionIVT ()

Macro Definition Documentation

#define MY_MAX (   a,
)    (((a) > (b)) ? (a) : (b))

Definition at line 63 of file helpers.h.

#define MY_MIN (   a,
)    (((a) < (b)) ? (a) : (b))

Definition at line 64 of file helpers.h.

Function Documentation

void aligned_free ( void *  ptr)

Definition at line 426 of file helpers.cpp.

void* aligned_malloc ( unsigned int  size,
unsigned int  align_size = 16 

Definition at line 409 of file helpers.cpp.

double gaussian_random ( )

Definition at line 263 of file helpers.cpp.

float gaussian_random_float ( )

Definition at line 294 of file helpers.cpp.

void get_timer_value ( unsigned int &  sec,
unsigned int &  usec 

Definition at line 135 of file helpers.cpp.

unsigned int get_timer_value ( bool  bResetTimer = false)

Definition at line 180 of file helpers.cpp.

const char* GetVersionIVT ( )

Definition at line 435 of file helpers.cpp.

void hsv2rgb ( int  h,
int  s,
int  v,
int &  r,
int &  g,
int &  b 

Definition at line 348 of file helpers.cpp.

float invert_byte_order_float ( float  x)

Definition at line 73 of file helpers.cpp.

unsigned int invert_byte_order_int ( unsigned int  x)

Definition at line 89 of file helpers.cpp.

int invert_byte_order_int ( int  x)

Definition at line 117 of file helpers.cpp.

unsigned long invert_byte_order_long ( unsigned long  x)

Definition at line 79 of file helpers.cpp.

long invert_byte_order_long ( long  x)

Definition at line 107 of file helpers.cpp.

unsigned short invert_byte_order_short ( unsigned short  x)

Definition at line 99 of file helpers.cpp.

short invert_byte_order_short ( short  x)

Definition at line 127 of file helpers.cpp.

int my_round ( double  x)

Definition at line 325 of file helpers.cpp.

int my_round ( float  x)

Definition at line 330 of file helpers.cpp.

void rgb2hsv ( int  r,
int  g,
int  b,
int &  h,
int &  s,
int &  v 

Definition at line 381 of file helpers.cpp.

void sleep_ms ( unsigned int  ms)

Definition at line 336 of file helpers.cpp.

double uniform_random ( )

Definition at line 251 of file helpers.cpp.

float uniform_random_float ( )

Definition at line 256 of file helpers.cpp.