Re: [gomp4 10/14] libgomp: arrange a team of pre-started threads via gomp_nvptx_main

2015-10-21 Thread Jakub Jelinek
On Wed, Oct 21, 2015 at 05:40:24PM +0300, Alexander Monakov wrote: > On Wed, 21 Oct 2015, Jakub Jelinek wrote: > > > -#if defined HAVE_TLS || defined USE_EMUTLS > > > +#if defined __nvptx__ > > > +extern struct gomp_thread *nvptx_thrs; > > > > What kind of address space is this variable? It shoul

Re: [gomp4 10/14] libgomp: arrange a team of pre-started threads via gomp_nvptx_main

2015-10-21 Thread Alexander Monakov
On Wed, 21 Oct 2015, Jakub Jelinek wrote: > > -#if defined HAVE_TLS || defined USE_EMUTLS > > +#if defined __nvptx__ > > +extern struct gomp_thread *nvptx_thrs; > > What kind of address space is this variable? It should be > a per-CTA var, so that different teams have different, and > simultaneou

Re: [gomp4 10/14] libgomp: arrange a team of pre-started threads via gomp_nvptx_main

2015-10-21 Thread Jakub Jelinek
On Tue, Oct 20, 2015 at 09:34:32PM +0300, Alexander Monakov wrote: > diff --git a/libgomp/config/nvptx/team.c b/libgomp/config/nvptx/team.c > deleted file mode 100644 > index e69de29..000 > diff --git a/libgomp/libgomp.h b/libgomp/libgomp.h > index 1454adf..f25b265 100644 > --- a/libgomp/libgom

[gomp4 10/14] libgomp: arrange a team of pre-started threads via gomp_nvptx_main

2015-10-20 Thread Alexander Monakov
This patch ports team.c to nvptx by arranging an initialization/cleanup routine, gomp_nvptx_main, that all (pre-started) threads can run. It initializes a thread pool and proceeds to run gomp_thread_start in all threads except thread zero, which runs original target region function. Thread-privat