19.11.2014 Views

Tutorial: Introduction to CUDA Fortran | GTC 2013

Tutorial: Introduction to CUDA Fortran | GTC 2013

Tutorial: Introduction to CUDA Fortran | GTC 2013

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Computing π with <strong>CUDA</strong> <strong>Fortran</strong><br />

π = 4 ∗ (Σ red points)/(Σ points)<br />

Simple example:<br />

–Generate random numbers ( CURAND)<br />

–Compute sum using of kernel loop directive<br />

–Compute sum using two stages reduction with Cuda <strong>Fortran</strong> kernels<br />

–Compute sum using single stage reduction with Cuda <strong>Fortran</strong> kernel<br />

–Accuracy

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

Saved successfully!

Ooh no, something went wrong!