openMVS icon indicating copy to clipboard operation
openMVS copied to clipboard

opencl support?

Open zoey9628 opened this issue 2 years ago • 2 comments

Hi!

I want to run it not in nvidia drivers, but in other drivers and I wanted to speed things up. So I want to implement SceneRefineOpenCL.cpp, and I will be glad to do so if you will commit source code of openCL. I will be glad to help with this.

zoey9628 avatar Oct 25 '23 03:10 zoey9628

Hi @zoey9628 Great idea adding support for openCL. Two suggestions I'd like to make:

  • if you want to reimplement refine mesh algorithm you should use plain openGL shaders, and no CUDA or openCL; first of all I lost the original cuda kernerls for this, second the entire refinement process is just a bunch of triangles rasterization, which is perfect for any rasterization pipeline like OpenGL, or even OpenGL ES which will work on any GPU, including mobile :)
  • however the densification algorithm would be a perfect match for porting to OpenCL, so pls try that instead if you really want to use openCL

cdcseacave avatar Oct 25 '23 17:10 cdcseacave

Hi @zoey9628 Great idea adding support for openCL. Two suggestions I'd like to make:

  • if you want to reimplement refine mesh algorithm you should use plain openGL shaders, and no CUDA or openCL; first of all I lost the original cuda kernerls for this, second the entire refinement process is just a bunch of triangles rasterization, which is perfect for any rasterization pipeline like OpenGL, or even OpenGL ES which will work on any GPU, including mobile :)
  • however the densification algorithm would be a perfect match for porting to OpenCL, so pls try that instead if you really want to use openCL

Thanks a lot for your apply. As you said, I wanted to use openCL in densification algorithm.

  • On cpu, densification algorithm take about 35 seconds, so I wanted to speed up the algorithms with openCL. I will give it a try :)

  • Refine mesh algorithm take less than 1 second on the cpu, so it is enough to meet my requirements

zoey9628 avatar Oct 26 '23 06:10 zoey9628