Created
January 14, 2014 13:18
-
-
Save holysin/8418175 to your computer and use it in GitHub Desktop.
Get the core number of iPhone
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unsigned int countOfCores() { | |
unsigned int ncpu; | |
size_t len = sizeof(ncpu); | |
sysctlbyname(“hw.ncpu”, &ncpu, &len, NULL, 0); | |
return ncpu; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment