Tutorial: Introduction to CUDA Fortran | GTC 2013
Tutorial: Introduction to CUDA Fortran | GTC 2013
Tutorial: Introduction to CUDA Fortran | GTC 2013
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
2D Example - Device Code<br />
module simpleOps_m<br />
contains<br />
attributes(global) subroutine inc(a, b)<br />
implicit none<br />
real :: a(:,:)<br />
real, value :: b<br />
integer :: i, j<br />
i = (blockIdx%x-1)*blockDim%x + threadIdx%x<br />
j = (blockIdx%y-1)*blockDim%y + threadIdx%y<br />
if (i