|
Hi
I wonder if there is a simple call that will tell me the number of effective CPUs on the local computer?
I want to know so I can figure out how many threads to launch. I know I could simply launch "many" and allow them to time slice on the same CPU, but there is overhead in managing them.
I wrote a simple C# prog that measures the threaded execution time versus non-threaded, and it seems to work OK for my quad core, but it takes a few seconds to run and seems as though it might be inaccurate if other processes are running. I'm guessing there should be some CPU info call available but I'm new to C# and .NET.
Thanks
Greg
|