summaryrefslogtreecommitdiff
path: root/2022/util.h
blob: 4bc6c2e964e6d70ce0b14d19ae14a00d6dc1afb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef UTIL_H
#define UTIL_H

#include <stdint.h>

#define NULL ((void *)0)
#define LEN(arr) (sizeof arr / sizeof arr[0])
#define BIT(b) (1UL << b)

typedef int8_t s8;
typedef uint8_t u8;

typedef int16_t s16;
typedef uint16_t u16;

typedef int32_t s32;
typedef uint32_t u32;

typedef int64_t s64;
typedef uint64_t u64;

typedef float f32;
typedef double f64;

#endif /* UTIL_H */