@kv  0.0.4
Library for graph problems in C and Python
macro.h
1 
18 #if !defined(AT_CORE_H_INSIDE)
19 #error "Only <at/core.h> can be included directly."
20 #endif
21 
22 #ifndef AT_MACRO_H
23 #define AT_MACRO_H
24 #include <stdint.h>
25 #define max(a,b) \
26  ({ __typeof__ (a) _a = (a); \
27  __typeof__ (b) _b = (b); \
28  _a > _b ? _a : _b; })
29 
30 #define min(a,b) \
31  ({ __typeof__ (a) _a = (a); \
32  __typeof__ (b) _b = (b); \
33  _a < _b ? _a : _b; })
34 
35 #ifdef __cplusplus
36  #define AT_BEGIN_DECLS extern "C" {
37  #define AT_END_DECLS }
38 #else
39  #define AT_BEGIN_DECLS
40  #define AT_END_DECLS
41 #endif /* __cplusplus */
42 typedef uint8_t u8;
43 typedef uint16_t u16;
44 typedef uint32_t u32;
45 typedef uint64_t u64;
46 typedef int8_t i8;
47 typedef int16_t i16;
48 typedef int32_t i32;
49 typedef int64_t i64;
50 typedef float f32;
51 typedef double d64;
52 #endif