diff options
| author | Feoramund <161657516+Feoramund@users.noreply.github.com> | 2025-05-29 15:11:12 -0400 |
|---|---|---|
| committer | Feoramund <161657516+Feoramund@users.noreply.github.com> | 2025-05-29 15:12:01 -0400 |
| commit | 827a6f90454cc7540bb3a809657b8d4162545f3c (patch) | |
| tree | 8aaec9326adb410b508e9b060c02a8fd74a8943f /core/simd | |
| parent | b5bc0fdcda8285656562d701fae0e4d6f92ae183 (diff) | |
Move `simd.IS_EMULATED` to `runtime.SIMD_IS_EMULATED`
Diffstat (limited to 'core/simd')
| -rw-r--r-- | core/simd/simd.odin | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/core/simd/simd.odin b/core/simd/simd.odin index a97155f58..c6c1e10a0 100644 --- a/core/simd/simd.odin +++ b/core/simd/simd.odin @@ -21,6 +21,7 @@ package simd import "base:builtin" import "base:intrinsics" +import "base:runtime" /* Check if SIMD is software-emulated on a target platform. @@ -30,11 +31,7 @@ at 128-bit (or wider) SIMD. If the compile-time target lacks the hardware suppor for 128-bit SIMD, this value is `true`, and all SIMD operations will likely be emulated. */ -IS_EMULATED :: true when (ODIN_ARCH == .amd64 || ODIN_ARCH == .i386) && !intrinsics.has_target_feature("sse2") else - true when (ODIN_ARCH == .arm64 || ODIN_ARCH == .arm32) && !intrinsics.has_target_feature("neon") else - true when (ODIN_ARCH == .wasm64p32 || ODIN_ARCH == .wasm32) && !intrinsics.has_target_feature("simd128") else - true when (ODIN_ARCH == .riscv64) && !intrinsics.has_target_feature("v") else - false +IS_EMULATED :: runtime.SIMD_IS_EMULATED /* Vector of 16 `u8` lanes (128 bits). |