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.

Textures - Host Code<br />

program tex<br />

use mymodule<br />

...<br />

real, device, target :: a_d(n)<br />

real, device :: b_d(n)<br />

! bind texture<br />

aTex => a_d<br />

call inc(b_d)<br />

...<br />

! unbind texture<br />

nullify(aTex)<br />

end program

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

Saved successfully!

Ooh no, something went wrong!