//
//---------------------------- multithread_info.cc ----------------
+
#include <base/multithread_info.h>
#if defined(__linux__)
-
-#include <fstream.h>
-#include <string>
+# include <fstream.h>
+# include <string>
#endif
#if defined(__sun__)
-#include <unistd.h>
+# include <unistd.h>
#endif
+
+
+
#ifdef DEAL_II_USE_MT
#if defined(__linux__)
AssertThrow(cpuinfo,ExcProcNotPresent());
- while((cpuinfo))
+ while(cpuinfo)
{
cpuinfo >> search;
if (search.find("processor")!=string::npos)
return nCPU;
}
+
#elif defined(__sun__)
+
unsigned int MultithreadInfo::get_n_cpus()
{
return sysconf(_SC_NPROCESSORS_ONLN);
}
+
#else
#warning Detection of Processors not supported on this OS
#endif
- // not in multithreadmode
-#else
+
+#else // not in multithreadmode
unsigned int MultithreadInfo::get_n_cpus()
{
#endif
-MultithreadInfo multithread_info;
MultithreadInfo::MultithreadInfo () :
n_cpus (get_n_cpus()),
+// definition of the variable which is declared `extern' in the .h file
+MultithreadInfo multithread_info;