This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp4 00/14] NVPTX: further porting
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Bernd Schmidt <bschmidt at redhat dot com>
- Cc: Alexander Monakov <amonakov at ispras dot ru>, gcc-patches at gcc dot gnu dot org, Dmitry Melnik <dm at ispras dot ru>
- Date: Fri, 23 Oct 2015 10:23:40 +0200
- Subject: Re: [gomp4 00/14] NVPTX: further porting
- Authentication-results: sourceware.org; auth=none
- References: <1445366076-16082-1-git-send-email-amonakov at ispras dot ru> <562779F9 dot 9070800 at redhat dot com> <alpine dot LNX dot 2 dot 20 dot 1510211759420 dot 23517 at monopod dot intra dot ispras dot ru> <20151022095442 dot GN478 at tucnak dot redhat dot com> <alpine dot LNX dot 2 dot 20 dot 1510221833190 dot 28723 at monopod dot intra dot ispras dot ru> <56291A01 dot 7090007 at redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Oct 22, 2015 at 07:16:49PM +0200, Bernd Schmidt wrote:
> I'm not really familiar with OpenMP and what it allows, so take all my
> comments with a grain of salt.
>
> On 10/22/2015 06:41 PM, Alexander Monakov wrote:
> >The second approach is to run all threads in the warp all the time, making
> >sure they execute the same code with the same data, and thus build up the same
> >local state.
>
> But is that equivalent? If each thread takes the address of a variable on
> its own stack, that's not the same as taking an address once and
> broadcasting it.
BTW, does it consume more energy if all threads in the warp in a lock step
do the same thing, vs. just the first one doing something and all the others
neuterized? What about stores to global or shared memory if done in lock step by
multiple threads in the warp?
Jakub