19.11.2014 Views

with CUDA Fortran

with CUDA Fortran

with CUDA Fortran

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Overlapping Transfers and Kernels<br />

• Requires:<br />

– Pinned host memory<br />

– Kernel and transfer to use different non-zero streams<br />

integer (kind=cuda_stream_kind) :: stream1, stream2<br />

...<br />

istat = cudaStreamCreate(stream1)<br />

istat = cudaStreamCreate(stream2)<br />

istat = cudaMemcpyAsync(a_d, a_h, N, stream1)<br />

call kernel(b_d)<br />

overlapped

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!