Skip to content

Commit 5df31f3

Browse files
authored
add wasm-simd support for suggestVectorSizeForCpu (#14992)
1 parent 0c16912 commit 5df31f3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/std/simd.zig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ pub fn suggestVectorSizeForCpu(comptime T: type, comptime cpu: std.Target.Cpu) ?
4343
// for multiple processing, but I don't know what's optimal here, if using
4444
// the 2048 bits or using just 64 per vector or something in between
4545
if (std.Target.sparc.featureSetHasAny(cpu.features, .{ .vis, .vis2, .vis3 })) break :blk 64;
46+
} else if (cpu.arch.isWasm()) {
47+
if (std.Target.wasm.featureSetHas(cpu.features, .simd128)) break :blk 128;
4648
}
4749
return null;
4850
};

0 commit comments

Comments
 (0)