Cuda code implemented & compiling, not working