prelim rpam cuda code

Just the beginning on the CUDA code. NOT TESTED OR COMPLETE.