(j3.2006) (SC22WG5.4482) [ukfortran] Added atomic
Fri Jun 17 17:02:59 EDT 2011
On 6/17/11 3:54 PM, N.M. Maclaren wrote:
> On Jun 17 2011, Bill Long wrote:
>> The list of comments on the coarray TR from Rice suggested adding a SWAP
>> atomic subroutine. The list in 11-200 includes all of the "common"
>> atomic operations except one: atomic andxor. I'm inclined to add that
>> one, which would make SWAP unnecessary. Or we could add both. For those
>> who are not big amo users...
>> If this is added, is there a need for a separate atomic_swap?
> Swapping works reliably and portably when one integer may be negative;
> XOR doesn't.
Perhaps even more persuasively, the SWAP routine would be well defined
for LOGICAL arguments (which we allow for _DEFINE and _REF), whereas the
andxor version description is problematic for that case.
So, I'm convinced that both versions are useful.
> J3 mailing list
> J3 at j3-fortran.org
Bill Long longb at cray.com
Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc./Cray Plaza, Suite 210/380 Jackson St./St. Paul, MN 55101
More information about the J3