在CUDA文档中提到,如果我们使用2个流(stream0和stream1),就像这样:我们在stream0中复制数据,然后在stream0中启动第一个内核,然后我们从stream0中的设备恢复数据,然后那么在stream1中执行相同的操作,就像在“CUDA by example 2010”一书中提到的那样,该方法不提供并发执行,但是在“并发内核示例”中使用了此方法并提供并发执行。那么你能帮我理解这
考虑以下情况: //thread 0 on device 0:
cudaMemcpyAsync(Dst0, Src0, ..., stream0);//stream0 is on Device 0;
...
//thread 1 on device 1:
cudaMemcpyAsync(Dst1, Src1, ..., stream1);//stream1 is on Device 1;