zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 5df31f3ef3d2c4640fa2c7fc9b03c83c6a8606ae (tree)
parent 0c169127338ef8af752d1a077e412b5135e300d5
Author: KOUNOIKE Yuusuke <kounoike.yuusuke+github@gmail.com>
Date:   Tue, 21 Mar 2023 01:45:12 +0900

add wasm-simd support for suggestVectorSizeForCpu (#14992)


Diffstat:
Mlib/std/simd.zig | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib/std/simd.zig b/lib/std/simd.zig @@ -43,6 +43,8 @@ pub fn suggestVectorSizeForCpu(comptime T: type, comptime cpu: std.Target.Cpu) ? // for multiple processing, but I don't know what's optimal here, if using // the 2048 bits or using just 64 per vector or something in between if (std.Target.sparc.featureSetHasAny(cpu.features, .{ .vis, .vis2, .vis3 })) break :blk 64; + } else if (cpu.arch.isWasm()) { + if (std.Target.wasm.featureSetHas(cpu.features, .simd128)) break :blk 128; } return null; };