From f654e16d06460a5f44fd8089538a41fc1936ea0b Mon Sep 17 00:00:00 2001 From: ominitay <37453713+ominitay@users.noreply.github.com> Date: Thu, 31 Mar 2022 19:13:27 +0100 Subject: [PATCH] std.simd: Fix suggestVectorSizeForCpu --- lib/std/simd.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/std/simd.zig b/lib/std/simd.zig index 02e08b0dadd308997facd9cc63a6a06ad037c47f..88c86cdd76da1d19441c211ce49427fe2dc61ab2 100644 --- 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; + }, } } -- 2.54.0