From e0e52953570caea66096cda08dc814f34735f7af Mon Sep 17 00:00:00 2001 From: steven-na Date: Wed, 5 Aug 2026 16:03:11 -0700 Subject: Fixed byte/element inconsistencies --- src/common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/common.h') 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; -- cgit v1.2.3