Skip to content

Commit

Permalink
Merge pull request #12 from JuliaAlgebra/fix-allocations
Browse files Browse the repository at this point in the history
Fix allocation in fill_reduced_values
  • Loading branch information
saschatimme authored May 15, 2018
2 parents c8e5913 + 0de6a51 commit cd398cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/config.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function PolyConfig(g::Polynomial{T}, reduced_exponents::Matrix{UInt16}, big_loo
zeros(typeof(one(T) * one(S) + one(T) * one(S)), n))
end

@inline function fillreduced_values!(
function fillreduced_values!(
cfg::PolyConfig{T},
g::Polynomial,
x::AbstractVector,
Expand All @@ -94,14 +94,14 @@ end
k = 1
j = 1
nextj_at = j + reds[j]
@inbounds res = cfs[j]
@inbounds res = convert(T, cfs[j])
while k N || j < n
togo = nextj_at - k
if togo == 0
@inbounds v[j] = res
j += 1
@inbounds nextj_at += reds[j]
@inbounds res = cfs[j]
@inbounds res = convert(T, cfs[j])
else
@inbounds i, l = rem[k]
@inbounds res *= dv[i, l]
Expand Down

0 comments on commit cd398cd

Please sign in to comment.