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.

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

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

Saved successfully!

Ooh no, something went wrong!