diff options
| author | gingerBill <bill@gingerbill.org> | 2022-05-26 18:09:59 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-05-26 18:09:59 +0100 |
| commit | 1f438d4e6c0a979b249683cb2da048a0ff36dcce (patch) | |
| tree | 60d274f23a02022321f25de00759ebd770e32a6e /core | |
| parent | 421d45a7a76e53946e7441212af9d08a0d93ff68 (diff) | |
Merge `intrinsics.simd_sqrt` with `intrinsics.sqrt`
Diffstat (limited to 'core')
| -rw-r--r-- | core/intrinsics/intrinsics.odin | 3 | ||||
| -rw-r--r-- | core/simd/simd.odin | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/core/intrinsics/intrinsics.odin b/core/intrinsics/intrinsics.odin index c13e099c5..4f10c5a32 100644 --- a/core/intrinsics/intrinsics.odin +++ b/core/intrinsics/intrinsics.odin @@ -33,7 +33,7 @@ overflow_add :: proc(lhs, rhs: $T) -> (T, bool) #optional_ok --- overflow_sub :: proc(lhs, rhs: $T) -> (T, bool) #optional_ok --- overflow_mul :: proc(lhs, rhs: $T) -> (T, bool) #optional_ok --- -sqrt :: proc(x: $T) -> T where type_is_float(T) --- +sqrt :: proc(x: $T) -> T where type_is_float(T) || (type_is_simd_vector(T) && type_is_float(type_elem_type(T))) --- fused_mul_add :: proc(a, b, c: $T) -> T where type_is_float(T) || (type_is_simd_vector(T) && type_is_float(type_elem_type(T))) --- @@ -247,7 +247,6 @@ simd_shuffle :: proc(a, b: #simd[N]T, indices: ..int) -> #simd[len(indices)]T -- simd_select :: proc(cond: #simd[N]boolean_or_integer, true, false: #simd[N]T) -> #simd[N]T --- // Lane-wise operations -simd_sqrt :: proc(a: #simd[N]any_float) -> #simd[N]any_float --- // IEEE sqrt simd_ceil :: proc(a: #simd[N]any_float) -> #simd[N]any_float --- simd_floor :: proc(a: #simd[N]any_float) -> #simd[N]any_float --- simd_trunc :: proc(a: #simd[N]any_float) -> #simd[N]any_float --- diff --git a/core/simd/simd.odin b/core/simd/simd.odin index ce278bce7..263402c43 100644 --- a/core/simd/simd.odin +++ b/core/simd/simd.odin @@ -91,7 +91,7 @@ shuffle :: intrinsics.simd_shuffle select :: intrinsics.simd_select -sqrt :: intrinsics.simd_sqrt +sqrt :: intrinsics.sqrt ceil :: intrinsics.simd_ceil floor :: intrinsics.simd_floor trunc :: intrinsics.simd_trunc |