Is there a way to determine how many cores a machine has from C/C++ in a platform-independent way? If no such thing exists, what about determining it per-platform (Windows/*nix/Mac)?
转载于:https://stackoverflow.com/questions/150355/programmatically-find-the-number-of-cores-on-a-machine