| ... | @@ -9,6 +9,8 @@ const std = @import("std"); | ... | @@ -9,6 +9,8 @@ const std = @import("std"); |
| 9 | const builtin = @import("builtin"); | 9 | const builtin = @import("builtin"); |
| 10 | | 10 | |
| 11 | pub fn suggestVectorLengthForCpu(comptime T: type, comptime cpu: std.Target.Cpu) ?comptime_int { | 11 | pub fn suggestVectorLengthForCpu(comptime T: type, comptime cpu: std.Target.Cpu) ?comptime_int { |
| | 12 | @setEvalBranchQuota(2_000); |
| | 13 | |
| 12 | // This is guesswork, if you have better suggestions can add it or edit the current here | 14 | // This is guesswork, if you have better suggestions can add it or edit the current here |
| 13 | const element_bit_size = @max(8, std.math.ceilPowerOfTwo(u16, @bitSizeOf(T)) catch unreachable); | 15 | const element_bit_size = @max(8, std.math.ceilPowerOfTwo(u16, @bitSizeOf(T)) catch unreachable); |
| 14 | const vector_bit_size: u16 = blk: { | 16 | const vector_bit_size: u16 = blk: { |