16 #if defined(LINUX) && defined(_SC_NPROCESSORS_ONLN) 
   19 #include <sys/types.h> 
   20 #include <sys/sysctl.h> 
   45 #if defined(LINUX) && defined(_SC_NPROCESSORS_ONLN) 
   46         return sysconf( _SC_NPROCESSORS_ONLN );
 
   49         size_t size=
sizeof(num);
 
   50         if (!sysctlbyname(
"hw.ncpu", &num, &size, NULL, 0))
 
   71     return m_refcount->
ref();
 
   81     int32_t rc = m_refcount->
unref();
 
void set_num_threads(int32_t n)
int32_t get_num_cpus() const 
int32_t get_num_threads() const 
int32_t ref_count() const 
Class Parallel provides helper functions for multithreading. 
all of classes and functions are contained in the shogun namespace