// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
# include <unistd.h>
#endif
-
-
+#if defined(__MACH__) && defined(__ppc__) && defined(__APPLE__)
+# include <sys/types.h>
+# include <sys/sysctl.h>
+#endif
#if DEAL_II_USE_MT == 1
return sysconf(_SC_NPROC_ONLN);
}
+# elif defined(__MACH__) && defined(__ppc__) && defined(__APPLE__)
+// This is only tested on a dual G5 2.5GHz running MacOSX 10.3.6
+// and gcc version 3.3 20030304 (Apple Computer, Inc. build 1666)
+// If it doesnt work please contact the mailinglist.
+unsigned int MultithreadInfo::get_n_cpus()
+{
+ int mib[2];
+ int n_cpus;
+ size_t len;
+
+ mib[0] = CTL_HW;
+ mib[1] = HW_NCPU;
+ len = sizeof(n_cpus);
+ sysctl(mib, 2, &n_cpus, &len, NULL, 0);
+
+ return n_cpus;
+}
+
+
# else
// If you get n_cpus=1 although you are on a multi-processor machine,
<ol>
<li>
- <p> New: The <code class="member">
- TableHandler::write_tex</code> now accepts the additional boolean
- argument <code class="member">with_header</code> which is set to
- true by default and tells the function whether to add the latex
- header and footer (i.e. the \documentclass{...},
- \begin{document} and \end{document} stuff) to the table.<br>
- In addition to this, there are two new members in the above class:
- <code class="member"> TableHandler::tex_set_table_caption</code> and
- <code class="member"> TableHandler::tex_set_table_label</code> to
- add a caption and a label to the tex generated table.
- <br> (Luca Heltai 2004/10/29)
- </p>
+ <li> <p>
+ New: The <code>MultithreadInfo</code> class now also detects multiple
+ processors on Mac OS X.
+ <br>
+ (Helmut Müller 2004/11/29)
+ </p>
+
+ <li> <p>
+ New: The <code class="member">
+ TableHandler::write_tex</code> now accepts the additional boolean
+ argument <code class="member">with_header</code> which is set to
+ true by default and tells the function whether to add the latex
+ header and footer (i.e. the \documentclass{...},
+ \begin{document} and \end{document} stuff) to the table.<br>
+ In addition to this, there are two new members in the above class:
+ <code class="member"> TableHandler::tex_set_table_caption</code> and
+ <code class="member"> TableHandler::tex_set_table_label</code> to
+ add a caption and a label to the tex generated table.
+ <br>
+ (Luca Heltai 2004/10/29)
+ </p>
<li> <p>
Fixed: <code