File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 1
1
name = " CPUSummary"
2
2
uuid = " 2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9"
3
3
authors = [" chriselrod <elrodc@gmail.com> and contributors" ]
4
- version = " 0.1.26 "
4
+ version = " 0.1.27 "
5
5
6
6
[deps ]
7
7
CpuId = " adafc99b-e345-5852-983c-f28acb93d879"
Original file line number Diff line number Diff line change 26
26
end
27
27
num_l4cache () = static (0 )
28
28
29
- const PrecompiledCacheSize = CpuId. cachesize () .÷ (1 , 1 , CpuId. cpucores ())
29
+ const PrecompiledCacheSize = let cs = CpuId. cachesize ()
30
+ ntuple (i -> i == 3 ? cs[3 ] ÷ CpuId. cpucores () : cs[i], length (cs))
31
+ end
30
32
const PrecompiledCacheInclusive = CpuId. cacheinclusive ()
31
33
cache_inclusive (_) = False ()
32
34
@noinline function _eval_cache_size (cachesize)
@@ -56,7 +58,9 @@ cache_size(_) = StaticInt{0}()
56
58
57
59
# cache_size(::Union{Val{3},StaticInt{3}}) = num_cores() * StaticInt{1441792}()
58
60
function _extra_init ()
59
- cs = CpuId. cachesize () .÷ (1 , 1 , CpuId. cpucores ())
61
+ cs = let cs= CpuId. cachesize ()
62
+ ntuple (i -> i == 3 ? cs[3 ] ÷ CpuId. cpucores () : cs[i], length (cs))
63
+ end
60
64
cs === PrecompiledCacheSize || _eval_cache_size (cs)
61
65
ci = CpuId. cacheinclusive ()
62
66
ci === PrecompiledCacheInclusive || _eval_cache_inclusive (ci)
You can’t perform that action at this time.
0 commit comments