Split out the CUDA kernels into a separate file

There will be a bit of code duplication when TRBP is merged into the
headers, it is nicer to manage both of them in the same file
Relax encapsulation to allow for more code reuse