Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > media > contrib > by-pkgid > 263386785cefb9ae5d63b926d214d809 > files > 816

mpqc-2.1.2-4mdk.ppc.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta name="robots" content="noindex">
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>sc::ThreadGrp class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 1.2.5 on Mon Oct 14 14:17:58 2002 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; </center>
<hr><h1>sc::ThreadGrp  Class Reference</h1>The <a class="el" href="class_sc__ThreadGrp.html">ThreadGrp</a> abstract class provides a means to manage separate threads of control. 
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="thread_h-source.html">thread.h</a>&gt;</code>
<p>
Inheritance diagram for sc::ThreadGrp<p><center><img src="class_sc__ThreadGrp_inherit_graph.gif" border="0" usemap="#sc::ThreadGrp_inherit_map" alt="Inheritance graph"></center>
<map name="sc::ThreadGrp_inherit_map">
<area href="class_sc__ProcThreadGrp.html" shape="rect" coords="14,281,129,299">
<area href="class_sc__PthreadThreadGrp.html" shape="rect" coords="153,281,283,299">
<area href="class_sc__PumaThreadGrp.html" shape="rect" coords="307,281,427,299">
<area href="class_sc__DescribedClass.html" shape="rect" coords="161,147,275,166">
<area href="class_sc__RefCount.html" shape="rect" coords="177,81,259,99">
<area href="class_sc__Identity.html" shape="rect" coords="182,14,254,33">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for sc::ThreadGrp:<p><center><img src="class_sc__ThreadGrp_coll_graph.gif" border="0" usemap="#sc::ThreadGrp_coll_map" alt="Collaboration graph"></center>
<map name="sc::ThreadGrp_coll_map">
<area href="class_sc__DescribedClass.html" shape="rect" coords="14,152,129,171">
<area href="class_sc__RefCount.html" shape="rect" coords="30,83,113,101">
<area href="class_sc__Identity.html" shape="rect" coords="35,13,107,32">
<area href="class_sc__Thread.html" shape="rect" coords="153,152,222,171">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="class_sc__ThreadGrp-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
<tr><td nowrap align=right valign=top><a name="a0" doxytag="sc::ThreadGrp::ThreadGrp"></a>
&nbsp;</td><td valign=bottom><b>ThreadGrp</b> ()</td></tr>
<tr><td nowrap align=right valign=top><a name="a1" doxytag="sc::ThreadGrp::ThreadGrp"></a>
&nbsp;</td><td valign=bottom><b>ThreadGrp</b> (const <a class="el" href="class_sc__Ref.html">Ref</a>&lt; <a class="el" href="class_sc__KeyVal.html">KeyVal</a> &gt; &amp;)</td></tr>
<tr><td nowrap align=right valign=top><a name="a2" doxytag="sc::ThreadGrp::ThreadGrp"></a>
&nbsp;</td><td valign=bottom><b>ThreadGrp</b> (const ThreadGrp &amp;, int nthread=-1)</td></tr>
<tr><td nowrap align=right valign=top><a name="a3" doxytag="sc::ThreadGrp::~ThreadGrp"></a>
virtual&nbsp;</td><td valign=bottom><b>~ThreadGrp</b> ()</td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="class_sc__ThreadGrp.html#a4">add_thread</a> (int threadnum, <a class="el" href="class_sc__Thread.html">Thread</a> *thread)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Assigns a <a class="el" href="class_sc__Thread.html">Thread</a> object to each thread.</em> <a href="#a4">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="class_sc__ThreadGrp.html#a5">add_thread</a> (int threadnum, <a class="el" href="class_sc__Thread.html">Thread</a> *thread, int priority)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Like add_thread(threadnum, thread), but assign a priority that the thread is to use.</em> <a href="#a5">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="a6" doxytag="sc::ThreadGrp::nthread"></a>
int&nbsp;</td><td valign=bottom><a class="el" href="class_sc__ThreadGrp.html#a6">nthread</a> () const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>The number of threads that will be run by start_thread.</em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="a7" doxytag="sc::ThreadGrp::delete_threads"></a>
void&nbsp;</td><td valign=bottom><b>delete_threads</b> ()</td></tr>
<tr><td nowrap align=right valign=top>virtual int&nbsp;</td><td valign=bottom><a class="el" href="class_sc__ThreadGrp.html#a8">start_threads</a> ()=0</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Starts the threads running.</em> <a href="#a8">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual int&nbsp;</td><td valign=bottom><a class="el" href="class_sc__ThreadGrp.html#a9">wait_threads</a> ()=0</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Wait for all the threads to complete.</em> <a href="#a9">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="a10" doxytag="sc::ThreadGrp::new_lock"></a>
virtual <a class="el" href="class_sc__Ref.html">Ref</a>&lt;<a class="el" href="class_sc__ThreadLock.html">ThreadLock</a>&gt;&nbsp;</td><td valign=bottom><a class="el" href="class_sc__ThreadGrp.html#a10">new_lock</a> ()=0</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Return a local object.</em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual ThreadGrp*&nbsp;</td><td valign=bottom><a class="el" href="class_sc__ThreadGrp.html#a11">clone</a> (int nthread=-1)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Create a <a class="el" href="class_sc__ThreadGrp.html">ThreadGrp</a> like the current one.</em> <a href="#a11">More...</a><em></em></font><br><br></td></tr>
<tr><td colspan=2><br><h2>Static Public Methods</h2></td></tr>
<tr><td nowrap align=right valign=top><a name="d0" doxytag="sc::ThreadGrp::set_default_threadgrp"></a>
void&nbsp;</td><td valign=bottom><b>set_default_threadgrp</b> (const <a class="el" href="class_sc__Ref.html">Ref</a>&lt; ThreadGrp &gt; &amp;)</td></tr>
<tr><td nowrap align=right valign=top><a name="d1" doxytag="sc::ThreadGrp::get_default_threadgrp"></a>
ThreadGrp*&nbsp;</td><td valign=bottom><b>get_default_threadgrp</b> ()</td></tr>
<tr><td nowrap align=right valign=top><a name="d2" doxytag="sc::ThreadGrp::initial_threadgrp"></a>
ThreadGrp*&nbsp;</td><td valign=bottom><b>initial_threadgrp</b> (int &amp;argc, char **argv)</td></tr>
<tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr>
<tr><td nowrap align=right valign=top><a name="n0" doxytag="sc::ThreadGrp::threads_"></a>
<a class="el" href="class_sc__Thread.html">Thread</a>**&nbsp;</td><td valign=bottom><b>threads_</b></td></tr>
<tr><td nowrap align=right valign=top><a name="n1" doxytag="sc::ThreadGrp::nthread_"></a>
int&nbsp;</td><td valign=bottom><b>nthread_</b></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The <a class="el" href="class_sc__ThreadGrp.html">ThreadGrp</a> abstract class provides a means to manage separate threads of control.
<p>
<hr><h2>Member Function Documentation</h2>
<a name="a5" doxytag="sc::ThreadGrp::add_thread"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
void sc::ThreadGrp::add_thread (
          </b></td>
          <td valign="bottom"><b>
int <em>i</em>, 
          </b></td>
        </tr>
        <tr>
          <td></td>
          <td><b>
<a class="el" href="class_sc__Thread.html">Thread</a> * <em>t</em>, 
          </b></td>
        </tr>
        <tr>
          <td></td>
          <td><b>
int <em>priority</em>&nbsp;)<code> [virtual]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Like add_thread(threadnum, thread), but assign a priority that the thread is to use.
<p>
The member is primarily for experimentation, the priority argument is currently not well defined and ignored. 
<p>
Reimplemented in <a class="el" href="class_sc__PthreadThreadGrp.html#a7">sc::PthreadThreadGrp</a>.    </td>
  </tr>
</table>
<a name="a4" doxytag="sc::ThreadGrp::add_thread"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
void sc::ThreadGrp::add_thread (
          </b></td>
          <td valign="bottom"><b>
int <em>i</em>, 
          </b></td>
        </tr>
        <tr>
          <td></td>
          <td><b>
<a class="el" href="class_sc__Thread.html">Thread</a> * <em>t</em>&nbsp;)<code> [virtual]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Assigns a <a class="el" href="class_sc__Thread.html">Thread</a> object to each thread.
<p>
If 0 is assigned to a thread, then that thread will be skipped. 
<p>
Reimplemented in <a class="el" href="class_sc__PthreadThreadGrp.html#a6">sc::PthreadThreadGrp</a>.    </td>
  </tr>
</table>
<a name="a11" doxytag="sc::ThreadGrp::clone"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
ThreadGrp * sc::ThreadGrp::clone (
          </b></td>
          <td valign="bottom"><b>
int <em>nthread</em> = -1&nbsp;)<code> [virtual]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Create a <a class="el" href="class_sc__ThreadGrp.html">ThreadGrp</a> like the current one.
<p>
If nthread is given, the new <a class="el" href="class_sc__ThreadGrp.html">ThreadGrp</a> will attempt to support that number of threads, but the actual number supported may be less. If nthread is -1, the number of threads in the current group will be used. 
<p>
Reimplemented in <a class="el" href="class_sc__PthreadThreadGrp.html#a9">sc::PthreadThreadGrp</a>, and <a class="el" href="class_sc__ProcThreadGrp.html#a6">sc::ProcThreadGrp</a>.    </td>
  </tr>
</table>
<a name="a8" doxytag="sc::ThreadGrp::start_threads"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
int sc::ThreadGrp::start_threads (
          </b></td>
          <td valign="bottom"><b>
)<code> [pure virtual]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Starts the threads running.
<p>
<a class="el" href="class_sc__Thread.html">Thread</a> 0 will be run by the thread that calls start_threads. 
<p>
Reimplemented in <a class="el" href="class_sc__PthreadThreadGrp.html#a4">sc::PthreadThreadGrp</a>, <a class="el" href="class_sc__PumaThreadGrp.html#a3">sc::PumaThreadGrp</a>, and <a class="el" href="class_sc__ProcThreadGrp.html#a3">sc::ProcThreadGrp</a>.    </td>
  </tr>
</table>
<a name="a9" doxytag="sc::ThreadGrp::wait_threads"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
int sc::ThreadGrp::wait_threads (
          </b></td>
          <td valign="bottom"><b>
)<code> [pure virtual]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Wait for all the threads to complete.
<p>
This must be called before start_threads is called again or the object is destroyed. 
<p>
Reimplemented in <a class="el" href="class_sc__PthreadThreadGrp.html#a5">sc::PthreadThreadGrp</a>, <a class="el" href="class_sc__PumaThreadGrp.html#a4">sc::PumaThreadGrp</a>, and <a class="el" href="class_sc__ProcThreadGrp.html#a4">sc::ProcThreadGrp</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="thread_h-source.html">thread.h</a></ul>
<hr>
<address>
<small>

Generated at Mon Oct 14 14:17:59 2002 for <a
href="http://aros.ca.sandia.gov/~cljanss/mpqc">MPQC</a>
2.1.2 using the documentation package <a
href="http://www.stack.nl/~dimitri/doxygen/index.html">Doxygen</a>
1.2.5.

</small>
</address>
</body>
</html>