Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ repo = "https://github.com/JuliaAlgebra/DynamicPolynomials.jl.git"
version = "0.6.4"

[deps]
Future = "9fa8497b-333b-5362-9e8d-4d0656e87820"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MultivariatePolynomials = "102ac46a-7ee4-5c85-9060-abc95bfdeaa3"
MutableArithmetics = "d8a4904e-b15c-11e9-3269-09a3773c0cb0"
Expand Down
2 changes: 0 additions & 2 deletions src/DynamicPolynomials.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
module DynamicPolynomials

import Future # For `copy!`

using Reexport
@reexport using MultivariatePolynomials
import MultivariatePolynomials as MP
Expand Down
2 changes: 1 addition & 1 deletion src/mono.jl
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function __add_variables!(
allvars::Vector{Variable{V,M}},
map,
) where {V,M}
Future.copy!(mono.vars, allvars)
copy!(mono.vars, allvars)
tmp = copy(mono.z)
resize!(mono.z, length(allvars))
fill!(mono.z, 0)
Expand Down
4 changes: 2 additions & 2 deletions src/monomial_vector.jl
Original file line number Diff line number Diff line change
Expand Up @@ -396,11 +396,11 @@ function __add_variables!(
allvars::Vector{Variable{V,M}},
map,
) where {V,M}
Future.copy!(monos.vars, allvars)
copy!(monos.vars, allvars)
if !isempty(monos.Z)
tmp = similar(first(monos.Z))
for z in monos.Z
Future.copy!(tmp, z)
copy!(tmp, z)
resize!(z, length(allvars))
fill!(z, 0)
z[map] = tmp
Expand Down
6 changes: 3 additions & 3 deletions src/mult.jl
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ function MA.operate_to!(
MP.mul_to_terms!(ts, q1, q2)
# TODO do better than create tmp
tmp = polynomial!(ts)
Future.copy!(p.a, tmp.a)
Future.copy!(p.x.vars, tmp.x.vars)
Future.copy!(p.x.Z, tmp.x.Z)
copy!(p.a, tmp.a)
copy!(p.x.vars, tmp.x.vars)
copy!(p.x.Z, tmp.x.Z)
return p
end
end
Expand Down
2 changes: 1 addition & 1 deletion src/operators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function MA.operate_to!(
end
varsvec = [MP.variables(p), MP.variables(q)]
allvars, maps = mergevars(varsvec)
Future.copy!(output.x.vars, allvars)
copy!(output.x.vars, allvars)
empty!(output.a)
empty!(output.x.Z)
_plusorminus_to!(output.a, output.x.Z, op, p, q, maps, length(allvars))
Expand Down
4 changes: 2 additions & 2 deletions src/poly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ function polynomialclean_to!(
adup::Vector{T},
Zdup::Vector{Vector{Int}},
) where {V,M,T}
Future.copy!(p.x.vars, vars)
copy!(p.x.vars, vars)
empty!(p.a)
empty!(p.x.Z)
removedups_to!(p.a, p.x.Z, adup, Zdup, M)
Expand Down Expand Up @@ -374,7 +374,7 @@ function MP.map_coefficients_to!(
)
resize!(output.a, length(p.a))
map!(f, output.a, p.a)
Future.copy!(output.x.vars, p.x.vars)
copy!(output.x.vars, p.x.vars)
# TODO reuse the part of `Z` that is already in `output`.
resize!(output.x.Z, length(p.x.Z))
for i in eachindex(p.x.Z)
Expand Down
2 changes: 1 addition & 1 deletion src/subs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function _subsmap(
# Some variable may not be replaced
vals =
Vector{promote_type(_substype(s), Variable{V,M})}(undef, length(vars))
Future.copy!(vals, vars)
copy!(vals, vars)
fillmap!(vals, vars, s...)
return vals
end
Expand Down
Loading