From c930841f834e43df28be41e8e3509773a523ed0f Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 10 Aug 2016 10:00:57 +0100 Subject: f16/f128,u|i128, basic vector support. --- src/common.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/common.cpp') diff --git a/src/common.cpp b/src/common.cpp index d1905f1e8..2a0cd8371 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -20,6 +20,17 @@ gb_inline u64 hash_pointer(void *ptr) { return p; } +i64 next_pow2(i64 n) { + n--; + n |= n >> 1; + n |= n >> 2; + n |= n >> 4; + n |= n >> 8; + n |= n >> 16; + n |= n >> 32; + n++; + return n; +} #define gb_for_array(index_, array_) for (isize index_ = 0; index_ < gb_array_count(array_); index_++) -- cgit v1.2.3