Skip to content

Commit cd398cd

Browse files
authored
Merge pull request #12 from JuliaAlgebra/fix-allocations
Fix allocation in fill_reduced_values
2 parents c8e5913 + 0de6a51 commit cd398cd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/config.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ function PolyConfig(g::Polynomial{T}, reduced_exponents::Matrix{UInt16}, big_loo
7878
zeros(typeof(one(T) * one(S) + one(T) * one(S)), n))
7979
end
8080

81-
@inline function fillreduced_values!(
81+
function fillreduced_values!(
8282
cfg::PolyConfig{T},
8383
g::Polynomial,
8484
x::AbstractVector,
@@ -94,14 +94,14 @@ end
9494
k = 1
9595
j = 1
9696
nextj_at = j + reds[j]
97-
@inbounds res = cfs[j]
97+
@inbounds res = convert(T, cfs[j])
9898
while k N || j < n
9999
togo = nextj_at - k
100100
if togo == 0
101101
@inbounds v[j] = res
102102
j += 1
103103
@inbounds nextj_at += reds[j]
104-
@inbounds res = cfs[j]
104+
@inbounds res = convert(T, cfs[j])
105105
else
106106
@inbounds i, l = rem[k]
107107
@inbounds res *= dv[i, l]

0 commit comments

Comments
 (0)