12 #define MAX(a,b) ( ((a)>(b)) ? (a) : (b) )
16 #define MIN(a,b) ( ((a)<(b)) ? (a) : (b) )
21 #define MIN_POS(a,b) ((a) < 0 ? (b) : ((b) < 0 ? (a) : MIN((a), (b))))
25 #define ABS(x) ( ((x)>=0) ? (x) : (-(x)) )
28 #define DIV_INT_ROUND_UP(a, b) ((__typeof__(a)) ((int64_t) (((((double) (a)) + ((double) (b)) - 1) / (b)))))
31 #define MEGA (KILO*KILO)
32 #define GIGA (KILO*MEGA)
33 #define TERA (KILO*GIGA)
34 #define PETA (KILO*TERA)
42 #define USECOND 1000000