help-octave
[Top][All Lists]
Advanced

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

Re: Read the number of cpus on Linux


From: Francesco Potortì
Subject: Re: Read the number of cpus on Linux
Date: Wed, 21 Jul 2010 10:05:14 +0200

>>>If you have GNU coreutils 8.1 or later, you can do
>>>   [err,numprocs] = system("nproc")
>>
>> Isn't this less efficient, systemwise?
>
>Are you planning to check millions of times in a for loop if the
>number of cores in your system has changed?

No, but in general having a function less heavy on the system is a plus,
because you never know how it will be used in the future.

Probably it is not important in this case, because it should be called
at most once per invocation of parcellfun, so the overhead should be
negligible.

-- 
Francesco Potortì (ricercatore)        Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR          Fax:   +39 050 315 2040
via G. Moruzzi 1, I-56124 Pisa         Email: address@hidden
(entrance 20, 1st floor, room C71)     Web:   http://fly.isti.cnr.it/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]