| author | |
| committer | |
| log | b64fe53ad509a1f582483e886f8b740a59b379c3 |
| tree | 7cfd0980566bdf6ff430ab9856b9e1ed4b1ecf12 |
| parent | 197fb26da0b8bb068fc8b52931870f97661b797d |
| signature |
This does a bunch of CPU family and feature checks. It would be annoying to have
to @setEvalBranchQuota() at every comptime use site.1 files changed, 2 insertions(+), 0 deletions(-)
lib/std/simd.zig+2| ... | ... | @@ -9,6 +9,8 @@ const std = @import("std"); |
| 9 | 9 | const builtin = @import("builtin"); |
| 10 | 10 | |
| 11 | 11 | pub fn suggestVectorLengthForCpu(comptime T: type, comptime cpu: std.Target.Cpu) ?comptime_int { |
| 12 | @setEvalBranchQuota(2_000); | |
| 13 | ||
| 12 | 14 | // This is guesswork, if you have better suggestions can add it or edit the current here |
| 13 | 15 | const element_bit_size = @max(8, std.math.ceilPowerOfTwo(u16, @bitSizeOf(T)) catch unreachable); |
| 14 | 16 | const vector_bit_size: u16 = blk: { |