Move kernels to their own files
This hopefully makes kernel development a lot easier: I've moved all the kernels (both OpenCL and CUDA) into their own files in the opencl/kernels/
and cuda/kernels/
directories, respectively, and update the code to simply load those files from source.
This was going to be necessary sooner or later anyway, since the kernel_src.hpp
files were getting super unwieldy, and also because recompiling the entire bandicoot program shouldn't be necessary after a kernel is tweaked.
Now, one question raised by this is "how do we figure out where the kernel sources are?" For now, I've used a hack (just __FILE__
), but eventually, since we will need some kind of on-disk configuration to cache precompiled kernels for various devices, we can just use that whenever it happens to appear.