move copying of code before and after scop from print_cuda to generate_gpu