Browse Source

add constant_log2 to intrinsics file

Laytan 1 year ago
parent
commit
85a33a1c9b
1 changed files with 2 additions and 0 deletions
  1. 2 0
      base/intrinsics/intrinsics.odin

+ 2 - 0
base/intrinsics/intrinsics.odin

@@ -221,6 +221,8 @@ type_merge :: proc($U, $V: typeid) -> typeid where type_is_union(U), type_is_uni
 
 constant_utf16_cstring :: proc($literal: string) -> [^]u16 ---
 
+constant_log2 :: proc($v: $T) -> T where type_is_integer(T) ---
+
 // SIMD related
 simd_add  :: proc(a, b: #simd[N]T) -> #simd[N]T ---
 simd_sub  :: proc(a, b: #simd[N]T) -> #simd[N]T ---