I can tell that you wanted a clear distinction between implementations for comparisons sake. And I don&#x27;t doubt that you could probably achieve higher performance in each respective branch with Cuda and c++ for GPU and CPU branches.<p>I get why you&#x27;d choose Cuda over opencl for pure gpgpu code, but when faced with the requirement of having both a CPU and a GPU version  why not use openCL to keep both code paths as close as possible?  Did you write it so both branches live in a single build and can select the optimal path at runtime and looking at the hardware and seeing what is available? Or do you maintain two separate builds that are deployed to different servers?