brandonpelfrey / Fast-BVH

A Simple, Optimized Bounding Volume Hierarchy for Ray/Object Intersection Testing
MIT License
503 stars 72 forks source link

Opencl and openmp optimization #6

Open ghost opened 8 years ago

ghost commented 8 years ago

Hello. Why not make opencl and openmp support for bvh? I did research parallelism with BVH. I have own results.

ghost commented 4 years ago

An OpenCL port of this project would probably be better in a separate repository. OpenCL uses a subset of C, and would have to be a complete rewrite. There's also no guarantee that what's fast about this library would be fast running on a GPU (even though OpenCL has CPU targets.) Further more, projects that already use this library would not benefit from an OpenCL port because the latency involved in transferring the data would slow them down. It would only be possibly faster on projects that already run on OpenCL. So OpenCL IMO is kind of out of the scope of this repository.

OpenMP support is sort of worth talking about. There's no shortage of papers on parallel BVH construction. I think it's worth considering the idea of parallel BVH construction, but not with OpenMP. Since there's many thread libraries that would be good candidates for this, it would probably be best to support generic parallelism. I vote bringing this up as a separate issue for parallelism support.