Skip to content

Commit 2b9c68d

Browse files
Reduce chunk size in scatter and cache functions
1 parent dd48d05 commit 2b9c68d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/SolverCPU.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ end
2727

2828
function scatter!(y::AbstractVector, α::Number, fecoef::AbstractVector,
2929
refs::AbstractVector, cache::AbstractVector)
30-
@spawn_for_chunks 1_000_000 for i in eachindex(y)
30+
@spawn_for_chunks 100_000 for i in eachindex(y)
3131
@inbounds y[i] += α * fecoef[refs[i]] * cache[i]
3232
end
3333
end
@@ -85,7 +85,7 @@ function scale!(scale::AbstractVector, refs::AbstractVector, interaction::Abstra
8585
end
8686

8787
function cache!(cache::AbstractVector, refs::AbstractVector, interaction::AbstractVector, weights::AbstractVector, scale::AbstractVector)
88-
@spawn_for_chunks 1_000_000 for i in eachindex(cache)
88+
@spawn_for_chunks 100_000 for i in eachindex(cache)
8989
@inbounds @fastmath cache[i] = interaction[i] * sqrt(weights[i]) * scale[refs[i]]
9090
end
9191
end

0 commit comments

Comments
 (0)