13.07.2015 Views

PGAS Programming with UPC and Fortran Coarrays

PGAS Programming with UPC and Fortran Coarrays

PGAS Programming with UPC and Fortran Coarrays

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.

12/19/2012TS: Atomic variables• <strong>Fortran</strong> already includes some atomic support (define,ref)• TS exp<strong>and</strong>s on this to supports atomic compare <strong>and</strong> swap,fetch <strong>and</strong> add, …integer (atomic_int_kind) :: counter[*]call atomic_define(counter[1],0)call atomic_add(counter[1],1)call atomic_ref(countval,counter[1])2513

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

Saved successfully!

Ooh no, something went wrong!