Macros
gk_macros.h File Reference

This file contains various macros. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ASSERT(expr)
 
#define ASSERT2   ASSERT
 
#define ASSERTP(expr, msg)
 
#define ASSERTP2   ASSERTP
 
#define gk_abs(x)   ((x) >= 0 ? (x) : -(x))
 
#define gk_clearcputimer(tmr)   (tmr = 0.0)
 
#define gk_clearwctimer(tmr)   (tmr = 0.0)
 
#define gk_getcputimer(tmr)   (tmr)
 
#define gk_getwctimer(tmr)   (tmr)
 
#define gk_max(a, b)   ((a) >= (b) ? (a) : (b))
 
#define gk_max3(a, b, c)   ((a) >= (b) && (a) >= (c) ? (a) : ((b) >= (a) && (b) >= (c) ? (b) : (c)))
 
#define gk_min(a, b)   ((a) >= (b) ? (b) : (a))
 
#define gk_sigcatch()   (setjmp(gk_jbufs[gk_cur_jbufs]))
 
#define gk_startcputimer(tmr)   (tmr -= gk_CPUSeconds())
 
#define gk_startwctimer(tmr)   (tmr -= gk_WClockSeconds())
 
#define gk_stopcputimer(tmr)   (tmr += gk_CPUSeconds())
 
#define gk_stopwctimer(tmr)   (tmr += gk_WClockSeconds())
 
#define gk_SWAP(a, b, tmp)   do {(tmp) = (a); (a) = (b); (b) = (tmp);} while(0)
 
#define GKASSERT(expr)
 
#define GKASSERTP(expr, msg)
 
#define GKCUASSERT(expr)
 
#define GKCUASSERTP(expr, msg)
 
#define GKSETJMP()   (setjmp(gk_return_to_entry))
 
#define IFSET(a, flag, cmd)   if ((a)&(flag)) (cmd);
 
#define INC_DEC(a, b, val)   do {(a) += (val); (b) -= (val);} while(0)
 
#define MAKECSR(i, n, a)
 
#define MALLOC_CHECK(ptr)   ;
 
#define ONEOVERRANDMAX   (1.0/(RAND_MAX+1.0))
 
#define RandomInRange(u)   ((int) (ONEOVERRANDMAX*(u)*rand()))
 
#define SHIFTCSR(i, n, a)
 
#define sign(a, b)   ((a >= 0 ? b : -b))
 

Detailed Description

This file contains various macros.

Date
Started 3/27/2007
Author
George
Version
$Id: gk_macros.h 10711 2011-08-31 22:23:04Z karypis $ 

Definition in file gk_macros.h.

Macro Definition Documentation

#define ASSERT (   expr)
Value:
if (!(expr)) { \
printf("***ASSERTION failed on line %d of file %s: " #expr "\n", \
__LINE__, __FILE__); \
assert(expr); \
}

Definition at line 124 of file gk_macros.h.

#define ASSERT2   ASSERT

Definition at line 145 of file gk_macros.h.

#define ASSERTP (   expr,
  msg 
)
Value:
if (!(expr)) { \
printf("***ASSERTION failed on line %d of file %s: " #expr "\n", \
__LINE__, __FILE__); \
printf msg ; \
printf("\n"); \
assert(expr); \
}

Definition at line 131 of file gk_macros.h.

#define ASSERTP2   ASSERTP

Definition at line 146 of file gk_macros.h.

#define gk_abs (   x)    ((x) >= 0 ? (x) : -(x))

Definition at line 26 of file gk_macros.h.

#define gk_clearcputimer (   tmr)    (tmr = 0.0)

Definition at line 32 of file gk_macros.h.

#define gk_clearwctimer (   tmr)    (tmr = 0.0)

Definition at line 37 of file gk_macros.h.

#define gk_getcputimer (   tmr)    (tmr)

Definition at line 35 of file gk_macros.h.

#define gk_getwctimer (   tmr)    (tmr)

Definition at line 40 of file gk_macros.h.

#define gk_max (   a,
  b 
)    ((a) >= (b) ? (a) : (b))

Definition at line 16 of file gk_macros.h.

#define gk_max3 (   a,
  b,
  c 
)    ((a) >= (b) && (a) >= (c) ? (a) : ((b) >= (a) && (b) >= (c) ? (b) : (c)))

Definition at line 18 of file gk_macros.h.

#define gk_min (   a,
  b 
)    ((a) >= (b) ? (b) : (a))

Definition at line 17 of file gk_macros.h.

#define gk_sigcatch ( )    (setjmp(gk_jbufs[gk_cur_jbufs]))

Definition at line 52 of file gk_macros.h.

#define gk_startcputimer (   tmr)    (tmr -= gk_CPUSeconds())

Definition at line 33 of file gk_macros.h.

#define gk_startwctimer (   tmr)    (tmr -= gk_WClockSeconds())

Definition at line 38 of file gk_macros.h.

#define gk_stopcputimer (   tmr)    (tmr += gk_CPUSeconds())

Definition at line 34 of file gk_macros.h.

#define gk_stopwctimer (   tmr)    (tmr += gk_WClockSeconds())

Definition at line 39 of file gk_macros.h.

#define gk_SWAP (   a,
  b,
  tmp 
)    do {(tmp) = (a); (a) = (b); (b) = (tmp);} while(0)

Definition at line 19 of file gk_macros.h.

#define GKASSERT (   expr)
Value:
if (!(expr)) { \
printf("***ASSERTION failed on line %d of file %s: " #expr "\n", \
__LINE__, __FILE__); \
abort(); \
}

Definition at line 90 of file gk_macros.h.

#define GKASSERTP (   expr,
  msg 
)
Value:
if (!(expr)) { \
printf("***ASSERTION failed on line %d of file %s: " #expr "\n", \
__LINE__, __FILE__); \
printf msg ; \
printf("\n"); \
abort(); \
}

Definition at line 97 of file gk_macros.h.

#define GKCUASSERT (   expr)
Value:
if (!(expr)) { \
printf("***ASSERTION failed on line %d of file %s: " #expr "\n", \
__LINE__, __FILE__); \
}

Definition at line 106 of file gk_macros.h.

#define GKCUASSERTP (   expr,
  msg 
)
Value:
if (!(expr)) { \
printf("***ASSERTION failed on line %d of file %s: " #expr "\n", \
__LINE__, __FILE__); \
printf msg ; \
printf("\n"); \
}

Definition at line 112 of file gk_macros.h.

#define GKSETJMP ( )    (setjmp(gk_return_to_entry))

Definition at line 51 of file gk_macros.h.

#define IFSET (   a,
  flag,
  cmd 
)    if ((a)&(flag)) (cmd);

Definition at line 45 of file gk_macros.h.

#define INC_DEC (   a,
  b,
  val 
)    do {(a) += (val); (b) -= (val);} while(0)

Definition at line 20 of file gk_macros.h.

#define MAKECSR (   i,
  n,
  a 
)
Value:
do { \
for (i=1; i<n; i++) a[i] += a[i-1]; \
for (i=n; i>0; i--) a[i] = a[i-1]; \
a[0] = 0; \
} while(0)
for(size_t i=1;i< poses.size();++i)
int n
Array33i a

Definition at line 73 of file gk_macros.h.

#define MALLOC_CHECK (   ptr)    ;

Definition at line 66 of file gk_macros.h.

#define ONEOVERRANDMAX   (1.0/(RAND_MAX+1.0))

Definition at line 23 of file gk_macros.h.

#define RandomInRange (   u)    ((int) (ONEOVERRANDMAX*(u)*rand()))

Definition at line 24 of file gk_macros.h.

#define SHIFTCSR (   i,
  n,
  a 
)
Value:
do { \
for (i=n; i>0; i--) a[i] = a[i-1]; \
a[0] = 0; \
} while(0)
for(size_t i=1;i< poses.size();++i)
int n
Array33i a

Definition at line 80 of file gk_macros.h.

#define sign (   a,
  b 
)    ((a >= 0 ? b : -b))

Definition at line 21 of file gk_macros.h.



gtsam
Author(s):
autogenerated on Sat May 8 2021 02:51:30