writing gmm_cudaMemcpy