This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [openacc] adjust default num_gangs
On Wed, Nov 02, 2016 at 03:11:52PM -0700, Cesar Philippidis wrote:
> if (seen_zero)
> {
> + /* See if the user provided GOMP_OPENACC_DIM environment
> + variable to specify runtime defaults. */
> + static int default_dims[GOMP_DIM_MAX];
> +
> + pthread_mutex_lock (&ptx_dev_lock);
I think pthread_once would be better here, with the default_dims
initialization outlined into a separate helper function.
Jakub