Re: gthread: how many cores do I have?



On Tue, Mar 16, 2010 at 00:43, Sven Neumann <sven gimp org> wrote:
> On Mon, 2010-03-15 at 21:14 +0000, jcupitt gmail com wrote:
>
>> But it seems to me that we have a more immediate need: gthread has a
>> threadpools, but no way to pick a reasonable size for a pool.
>
> Feel free to use the implementation in GIMP as a starting point:
>
>  http://git.gnome.org/browse/gimp/tree/app/base/base-utils.c#n54

GCC OpenMP implementation has one also.  omp_get_num_procs().
Mandated by OpenMP spec and essentially for the same reason :-)

-- 
Andrew W. Nosenko <andrew w nosenko gmail com>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]