This file contains various macros. More...
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)) |
This file contains various macros.
$Id: gk_macros.h 10711 2011-08-31 22:23:04Z karypis $
Definition in file gk_macros.h.
#define 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 | |||
) |
Definition at line 131 of file gk_macros.h.
#define ASSERTP2 ASSERTP |
Definition at line 146 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_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_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.
Definition at line 19 of file gk_macros.h.
#define GKASSERT | ( | expr | ) |
Definition at line 90 of file gk_macros.h.
#define GKASSERTP | ( | expr, | |
msg | |||
) |
Definition at line 97 of file gk_macros.h.
#define GKCUASSERT | ( | expr | ) |
Definition at line 106 of file gk_macros.h.
#define GKCUASSERTP | ( | expr, | |
msg | |||
) |
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.
Definition at line 45 of file gk_macros.h.
Definition at line 20 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.