#include "lasp_nprocs.h" #ifdef MS_WIN64 #include #else // Used for obtaining the number of processors #include #endif us getNumberOfProcs() { #if MS_WIN64 // https://stackoverflow.com/questions/150355/programmatically-find-the-number-of-cores-on-a-machine SYSTEM_INFO sysinfo; GetSystemInfo(&sysinfo); return sysinfo.dwNumberOfProcessors; #else // Linux, easy return get_nprocs(); #endif }