Advertisement
wandrake

Untitled

Nov 27th, 2014
430
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.24 KB | None | 0 0
  1. static inline int ff_numCores() {
  2.     int  n=-1;
  3. #if defined(__linux__)
  4.     FILE       *f;    
  5.     f = popen("cat /proc/cpuinfo |grep processor | wc -l", "r");
  6.     if (fscanf(f, "%d", &n) == EOF) { pclose(f); return n;}
  7.     pclose(f);
  8. ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement