summaryrefslogtreecommitdiff
path: root/src/common.h
diff options
context:
space:
mode:
authorsteven-na <noreply.github@stvnc.dev>2026-08-05 16:03:11 -0700
committersteven-na <noreply.github@stvnc.dev>2026-08-05 16:03:11 -0700
commite0e52953570caea66096cda08dc814f34735f7af (patch)
tree75ee87cb8685fe72ef944970b5fc2dbfbfecaf6c /src/common.h
parente939fa891b6403fcdaba7f545b2bf7932aa7f9ba (diff)
Fixed byte/element inconsistencies
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h
index abca66d..1154bdf 100644
--- a/src/common.h
+++ b/src/common.h
@@ -19,6 +19,8 @@
#define F64_EQ(x, y, eps) (fabs((x) - (y)) <= (eps))
#define MAX(n, m) ((n > m) ? (n) : (m))
#define MIN(n, m) ((n < m) ? (n) : (m))
+// n and m are expected to be byte counts (m a power of 2); keep call sites in bytes,
+// not element counts, so alignment semantics stay consistent across the codebase.
#define ALIGN_UP_POW2(n, m) (((u64)(n) + (u64)(m) - 1) & (~((u64)(m) - 1)))
typedef int8_t i8;