CUDA Implementation (not tested yet)

CUDA implementation from the pre-parallel version.
IT IS NOT TESTED YET.