[gomp4, ptx] worker & gang complex double reductions

Nathan Sidwell nathan@acm.org
Tue Nov 17 16:28:00 GMT 2015

On 11/16/15 17:07, Nathan Sidwell wrote:
> I've committed this patch to the gomp4 branch.  It adds support for worker and
> gang level complex double reductions.

I was unsatisfied with that approach, so I've separated the two mechanisms into 
different functions with the attached patch.  The locking scheme returns to the 
early variant (but using cmp&swaq builtin)

   while (cmp&swap (&lock, 0, 1)
   T accum = *ptr;
   accum = accum OP myval;
   *ptr = accum
   cmp&swap (&lock, 1, 0);

A new dispatcher function decides which approach to take, and that's where we 
can add atomic optimization smarts and the like.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: gomp4-red-cplx-dbl-2.patch
Type: text/x-patch
Size: 15916 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20151117/71e8cf26/attachment.bin>

More information about the Gcc-patches mailing list