Skip to content

Instantly share code, notes, and snippets.

@santosh
Created January 26, 2015 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save santosh/981b5425c2ed497e53cf to your computer and use it in GitHub Desktop.
Save santosh/981b5425c2ed497e53cf to your computer and use it in GitHub Desktop.
get the number of cores
#include <thread>
unsigned int nthreads = std::thread::hardware_concurrency();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment