2017-09-09 16:33 GMT+02:00 Jason Roehm
On Sep 9, 2017, at 3:46 AM, Oliver Kowalke via Boost < boost@lists.boost.org> wrote:
Hello, a grep over the boost.config showed some code related to nvcc - but I could not figure out how to use nvcc together with b2. What is the toolset target for nvcc ('b2 toolset=nvcc' doesn't work)? Oliver
What’s your goal in doing so? You only need to use nvcc when compiling code that uses CUDA language extensions (e.g. kernels that will run on the GPU). I’ve used Boost a lot with CUDA-based projects, and I just built Boost with gcc and linked it to my nvcc-compiled code. In some more exotic cases, CUDA linking can be a bit tricky to get working, but for simple cases, it’s pretty simple.
I'd like to extend one of my boost libraries to support CUDA - so one part of the library has to be compiled for the host and the other part has to be compiled for the device. That means the library code will contain __host__, __device__ etc. keywords ...