Giuseppe Scrivano wrote:
> Hi Pádraig,
> 
> 
> Pádraig Brady <p...@draigbrady.com> writes:
> 
>> I do wonder though whether it would be better
>> to have num_processors() try to return this by default?
> 
> num_processors is going to be used by programs as nproc will be used by
> scripts; all considerations we made for nproc can be applied to
> num_processors.

Right. So in that case I would push the sched_getaffinity()
down into num_processors in gnulib.

Whether to drop the --installed (and consequently --available)
options to nproc, is debatable. If we leave it in then gnulib
would need a method to select between them.  Let's leave it
selectable for now unless others think it's superfluous.
In any case num_processors should return the "available"
count by default.

cheers,
Pádraig.


Reply via email to