zig

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

commit f654e16d06460a5f44fd8089538a41fc1936ea0b (tree)
parent cdcb34cdf42fa3eb7a399106ccd57efc87643032
Author: ominitay <37453713+ominitay@users.noreply.github.com>
Date:   Thu, 31 Mar 2022 19:13:27 +0100

std.simd: Fix suggestVectorSizeForCpu

Diffstat:
Mlib/std/simd.zig | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/std/simd.zig b/lib/std/simd.zig @@ -23,7 +23,9 @@ pub fn suggestVectorSizeForCpu(comptime T: type, cpu: std.Target.Cpu) ?usize { const element_bit_size = std.math.max(8, std.math.ceilPowerOfTwo(T, @bitSizeOf(T))); return @divExact(vector_bit_size, element_bit_size); }, - else => @compileError("No vector sizes for this CPU architecture have yet been recommended"), + else => { + return null; + }, } }