diff options
| author | Bond_009 <bond.009@outlook.com> | 2022-12-01 22:30:22 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2022-12-01 22:30:22 +0100 |
| commit | baf4910870a6e8999802b9a4a22eabd4142a34e3 (patch) | |
| tree | 2d11443dc21e53bd0d99d015cf789937d6d95862 /utils/utils.h | |
| parent | 49d0c908f24b2c193c9deed1716fe36061ba26a1 (diff) | |
Move all Advent of Codes into one repo
Diffstat (limited to 'utils/utils.h')
| -rw-r--r-- | utils/utils.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/utils/utils.h b/utils/utils.h new file mode 100644 index 0000000..840d1d4 --- /dev/null +++ b/utils/utils.h @@ -0,0 +1,9 @@ +#ifndef AOC_UTILS_H +#define AOC_UTILS_H + +#define SWAP(a, b) (((a) ^= (b)), ((b) ^= (a)), ((a) ^= (b))) + +#define likely(x) __builtin_expect((x), 1) +#define unlikely(x) __builtin_expect((x), 0) + +#endif |
