diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2026-02-17 09:41:22 +0000 |
|---|---|---|
| committer | gingerBill <gingerBill@users.noreply.github.com> | 2026-02-17 09:41:22 +0000 |
| commit | 6da4a6746f98a55b544d6d8e9cdaecd94d4e8743 (patch) | |
| tree | 06894de8bed04844debd5a95ccbeeb289e2498f8 | |
| parent | 2b2b5aeefb428abd2f8cf401f40c0f580e7747a8 (diff) | |
Add `linalg.to_f16`
| -rw-r--r-- | core/math/linalg/general.odin | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/math/linalg/general.odin b/core/math/linalg/general.odin index 4a0150972..ea3a4e84a 100644 --- a/core/math/linalg/general.odin +++ b/core/math/linalg/general.odin @@ -376,6 +376,7 @@ matrix_cast :: proc "contextless" (v: $A/matrix[$M, $N]$T, $Elem_Type: typeid) - return } +@(require_results) to_f16 :: #force_inline proc(v: $A/[$N]$T) -> [N]f16 { return array_cast(v, f16) } @(require_results) to_f32 :: #force_inline proc(v: $A/[$N]$T) -> [N]f32 { return array_cast(v, f32) } @(require_results) to_f64 :: #force_inline proc(v: $A/[$N]$T) -> [N]f64 { return array_cast(v, f64) } |