cuda global memory code example
Example: cuda copy memory
cudaMemcpy(d_dst, h_src, N*sizeof(float), cudaMemcpyHostToDevice);
cudaMemcpy(h_dst, d_src, N*sizeof(float), cudaMemcpyDeviceToHost);
cudaMemcpy(d_dst, h_src, N*sizeof(float), cudaMemcpyHostToDevice);
cudaMemcpy(h_dst, d_src, N*sizeof(float), cudaMemcpyDeviceToHost);