CUDA code compiles, but is not working :(