We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jb/tupleoverhaul doesn't seem to get rid of the allocations during FRep eval. There are some deeper design issues here:
julia> u = union(Sphere(2, (2,3,4)), Sphere(4, (4,5,6)), Sphere(5, (7,8,9))) Descartes.CSGUnion{3,Int64}(Descartes.Sphere{3,Int64}(2,(2,3,4)),Descartes.CSGUnion{3,Int64}(Descartes.Sphere{3,Int64}(4,(4,5,6)),Descartes.Sphere{3,Int64}(5,(7,8,9)))) julia> a = FRep(u) Descartes.FRep{3,Int64}(Descartes.CSGUnion{3,Int64}(Descartes.Sphere{3,Int64}(2,(2,3,4)),Descartes.CSGUnion{3,Int64}(Descartes.Sphere{3,Int64}(4,(4,5,6)),Descartes.Sphere{3,Int64}(5,(7,8,9)))),csgunion_frep) julia> @code_lowered a.func(1,2,3) 1-element Array{Any,1}: :($(Expr(:lambda, Any[:x,:y,:z], Any[Any[],Any[Any[:x,Any,0],Any[:y,Any,0],Any[:z,Any,0]],Any[Any[:u,Descartes.CSGUnion{3,Int64},1]],0], :(begin # /home/steve/.julia/v0.4/Descartes/src/frep.jl, line 15: return min((FRep((top(getfield))(u,:left)::Any)::Any)(x,y,z)::Any,(FRep((top(getfield))(u,:right)::Any)::Any)(x,y,z)::Any)::Any end::Any))))
The text was updated successfully, but these errors were encountered:
More atomic case:
julia> b = FRep(Sphere(4, (1,2,3))) Descartes.FRep{3,Int64}(Descartes.Sphere{3,Int64}(4,(1,2,3)),sphere_frep) julia> @code_lowered b.func(1,2,3) 1-element Array{Any,1}: :($(Expr(:lambda, Any[:x,:y,:z], Any[Any[],Any[Any[:x,Any,0],Any[:y,Any,0],Any[:z,Any,0]],Any[Any[:s,Descartes.Sphere{3,Int64},1]],0], :(begin # /home/steve/.julia/v0.4/Descartes/src/frep.jl, line 7: return sqrt((x - getindex((top(getfield))(s,:location)::Any,1)::Any)::Any ^ 2::Any + (y - getindex((top(getfield))(s,:location)::Any,2)::Any)::Any ^ 2::Any + (z - getindex((top(getfield))(s,:location)::Any,3)::Any)::Any ^ 2::Any::Any)::Any - (top(getfield))(s,:radius)::Any::Any end::Any))))
So it looks like closures blow at type inference.
Sorry, something went wrong.
825ba59
remove FRep type since that approach doesn't really work, see #2
5b32e4d
No branches or pull requests
jb/tupleoverhaul doesn't seem to get rid of the allocations during FRep eval. There are some deeper design issues here:
The text was updated successfully, but these errors were encountered: