|
From: | Iain Murray |
Subject: | [Octave-patch-tracker] [patch #7504] add an nprocs function |
Date: | Sat, 12 Mar 2011 18:09:37 +0000 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15 |
URL: <http://savannah.gnu.org/patch/?7504> Summary: add an nprocs function Project: GNU Octave Submitted by: imurray Submitted on: Sat 12 Mar 2011 18:09:32 GMT Category: None Priority: 5 - Normal Status: None Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: While searching for how to get the number of CPUs in Octave I found: http://octave.1599824.n4.nabble.com/Read-the-number-of-cpus-on-Linux-td2295117.html jwe wrote "I see an nproc module in gnulib that appears to be portable to current systems of interest...Would someone like to contribute a function for this purpose?" The attachment is the entirely boiler-plate implementation of this if you want it. (Also exposes nprocs_conf.) Currently the m-file I use to count CPUs is here: http://homepages.inf.ed.ac.uk/imurray2/code/imurray-matlab/num_cores.m It has separate hacks for Windows, Mac and Linux. But I can't test Windows or MacOS as I don't currently run either. Having a built-in cross-platform function would be nice. _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Sat 12 Mar 2011 18:09:32 GMT Name: nprocs.diff Size: 3kB By: imurray <http://savannah.gnu.org/patch/download.php?file_id=22911> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/patch/?7504> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |