Search code examples
linuxcudagpuopenclhpc

Launching many copies of POSIX C++ code on GPU


I have a very compute intensive single-threaded POSIX+boost C++ program that I just launch in many copies on a 48-core CPU (it's kind-a brute-force A* search algorithm)

Is there any easy way of recompiling the code for GPU and running on "many more" GPU cores?

What is the easiest way to port existing boost C++ code for GPU assuming I want to run the threads as-is?


Solution

  • Is there any easy way of recompiling the code for GPU and running on "many more" GPU cores?

    No

    What is the easiest way to port existing boost C++ code for GPU assuming I want to run the threads as-is?

    There isn't one. As noted in comments, C++17 includes parallel algorithms, and NVIDIA ship a C++17 compiler with CUDA support. That is a long way from taking a "POSIX C++" code and just running it directly on a GPU. No GPU programming paradigm I am familiar with works like that.