Skip to content

Commit 4b3aa19

Browse files
authored
Fix #11
1 parent d93cf1c commit 4b3aa19

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/x86.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function _get_num_threads()::Int
77
(Sys.CPU_THREADS)::Int >> (Sys.ARCH !== :aarch64)
88
end
99

10-
_get_num_cores()::Int = clamp(CpuId.cpucores_total(), 1, (Sys.CPU_THREADS)::Int)
10+
_get_num_cores()::Int = clamp(CpuId.cpucores(), 1, (Sys.CPU_THREADS)::Int)
1111

1212
let nc = static(_get_num_cores())
1313
global num_l1cache() = nc
@@ -57,7 +57,7 @@ cache_size(_) = StaticInt{0}()
5757
# cache_size(::Union{Val{3},StaticInt{3}}) = num_cores() * StaticInt{1441792}()
5858
function _extra_init()
5959
nc = _get_num_cores()
60-
if (nc != CpuId.cpucores_total())
60+
if (nc != CpuId.cpucores())
6161
cache_l3_per_core = CpuId.cachesize(3) ÷ max(CpuId.cpucores(), 1)
6262
@eval cache_size(::Union{Val{3},StaticInt{3}}) = $(static(cache_l3_per_core * nc))
6363
end

0 commit comments

Comments
 (0)