Performs an atomic swap operation to a symmetric data object.
#include <shmem.h> double shmem_double_swap(double *target, double value, int pe);
This function performs atomic swap operations
The shmem_double_swap function writes the double value in to the variable pointed by target on processing element pe and returns the previous contents of target as an atomic operation.
The atomic accessing of the shared variable is guaranteed only when that variable is updated solely using IBM openshmem functions.
This function returns the contents that had been at the target address on the remote PE prior to the swap is returned.
To utilize the hardware atomic operations support of the PERCS system, the variables of these operations should be aligned with their natural byte alignments. For example, an int variable should be 4-byte aligned; a long long variable should be 8-byte aligned. If the participating variables are not aligned, the operation is done in software with sub-optimal performance
Subroutines: shmem_put