Tutorial: Introduction to CUDA Fortran | GTC 2013
Tutorial: Introduction to CUDA Fortran | GTC 2013
Tutorial: Introduction to CUDA Fortran | GTC 2013
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Direct Transfers<br />
• Once direct access is enabled, transfers between devices can<br />
be performed by<br />
– dstArray = srcArray<br />
• dstArray and srcArray are on different devices<br />
– cudaMemcpy(dstArray, srcArray, N)<br />
• Other variants (eg. cudaMemcpyAsync, cudaMemcpy2D) also work<br />
• cudaMemcpyPeer(dstArray, dstDev, srcArray, srcDev, N)<br />
– Explicitly specify source and destination devices<br />
– If direct access is not enabled, the transfer is staged through host,<br />
otherwise direct transfer is used