JuliaGeometry / Meshing.jl

Meshing and isosurface extraction algorithms
Other
60 stars 13 forks source link

Threaded Meshing #24

Open sjkelly opened 5 years ago

sjkelly commented 5 years ago

From what I can tell this should be possible in at least MarchingCubes and NaiveSurfaceNets. There are some other optimizations from the NaiveSurfaceNet implementation I would also like to apply to MarchingCubes and Marching Tetrahedra.

SimonDanisch commented 5 years ago

Might be worth checking out julia master with the nrw threading architecture!

sjkelly commented 5 years ago

I am building 1.2 now. Some rough changes are on this branch: https://github.com/JuliaGeometry/Meshing.jl/tree/sjk/threads

I think I am running into the closure inference bug on 1.1 because an Int declaration seems to be getting boxed and is triggering the GC quite a bit. Hopefully 1.2 helps. I have seen ~12x performance improvements on the distance field sampling side with threads and SIMD, but meshing is still the performance bottleneck in my applications.

Alternatively I may port a GPU example and use CUDANative and/or OpenCL.