]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Small clean-up
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 24 Feb 2000 12:40:55 +0000 (12:40 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 24 Feb 2000 12:40:55 +0000 (12:40 +0000)
git-svn-id: https://svn.dealii.org/trunk@2489 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/multithread_info.cc

index 604279df43c11eb73f394cef7d55bd0b1e8320f0..7931d8014131b2d9a12279fb825887105e858593 100644 (file)
 //
 //----------------------------  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__)
@@ -37,7 +40,7 @@ unsigned int MultithreadInfo::get_n_cpus()
 
   AssertThrow(cpuinfo,ExcProcNotPresent());
   
-  while((cpuinfo))
+  while(cpuinfo)
     {
       cpuinfo >> search;
       if (search.find("processor")!=string::npos)
@@ -48,13 +51,16 @@ unsigned int MultithreadInfo::get_n_cpus()
   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
@@ -66,8 +72,8 @@ unsigned int MultithreadInfo::get_n_cpus()
 
 #endif
 
-                                // not in multithreadmode
-#else
+
+#else                           // not in multithreadmode
 
 unsigned int MultithreadInfo::get_n_cpus()
 {
@@ -76,7 +82,6 @@ unsigned int MultithreadInfo::get_n_cpus()
 
 #endif
 
-MultithreadInfo multithread_info;
 
 MultithreadInfo::MultithreadInfo () :
                 n_cpus (get_n_cpus()),
@@ -86,4 +91,6 @@ MultithreadInfo::MultithreadInfo () :
 
 
 
+// definition of the variable which is declared `extern' in the .h file
+MultithreadInfo multithread_info;
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.