Number of CPUs/cores?

Hi, Does there exist a Haskell library function that returns the number of CPUs/cores (in portable way) on a computer where the program calling it runs? Thanks. -- Dimitry Golubovsky Anywhere on the Web

I believe numCapabilities (should be in IO, in my opinion, but that's
another discussion) will tell you the number of capabilities (native
threads) that have been given to the RTS. The measurement doesn't
necessarily have any connection to the number of physical cores or
processors in your machine.
On Tue, Apr 27, 2010 at 11:05 AM, Dimitry Golubovsky
OK, makes sense.
Thank you.
On Tue, Apr 27, 2010 at 10:58 AM, Michael Lesniak
wrote: [skip]
numCapabilities, I think.
-- Dimitry Golubovsky
Anywhere on the Web _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Hi,
another discussion) will tell you the number of capabilities (native threads) that have been given to the RTS. The measurement doesn't necessarily have any connection to the number of physical cores or processors in your machine. You're correct, should have clarified this more.
Cheers, Michael
participants (3)
-
Daniel Peebles
-
Dimitry Golubovsky
-
Michael Lesniak