Sophie

Sophie

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

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::ShmMemoryGrp 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:48 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::ShmMemoryGrp  Class Reference</h1>The <a class="el" href="class_sc__ShmMemoryGrp.html">ShmMemoryGrp</a> concrete class provides an implementation of <a class="el" href="class_sc__MsgMemoryGrp.html">MsgMemoryGrp</a>. 
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="memshm_h-source.html">memshm.h</a>&gt;</code>
<p>
Inheritance diagram for sc::ShmMemoryGrp<p><center><img src="class_sc__ShmMemoryGrp_inherit_graph.gif" border="0" usemap="#sc::ShmMemoryGrp_inherit_map" alt="Inheritance graph"></center>
<map name="sc::ShmMemoryGrp_inherit_map">
<area href="class_sc__MsgMemoryGrp.html" shape="rect" coords="14,280,137,299">
<area href="class_sc__MemoryGrp.html" shape="rect" coords="26,213,125,232">
<area href="class_sc__DescribedClass.html" shape="rect" coords="18,147,133,165">
<area href="class_sc__RefCount.html" shape="rect" coords="34,80,117,99">
<area href="class_sc__Identity.html" shape="rect" coords="39,13,111,32">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for sc::ShmMemoryGrp:<p><center><img src="class_sc__ShmMemoryGrp_coll_graph.gif" border="0" usemap="#sc::ShmMemoryGrp_coll_map" alt="Collaboration graph"></center>
<map name="sc::ShmMemoryGrp_coll_map">
<area href="class_sc__MsgMemoryGrp.html" shape="rect" coords="341,347,463,366">
<area href="class_sc__MemoryGrp.html" shape="rect" coords="182,264,281,283">
<area href="class_sc__DescribedClass.html" shape="rect" coords="14,166,129,184">
<area href="class_sc__RefCount.html" shape="rect" coords="30,83,113,102">
<area href="class_sc__Identity.html" shape="rect" coords="35,14,107,32">
<area href="class_sc__Ref.html" shape="rect" coords="262,166,398,184">
<area href="class_sc__RefBase.html" shape="rect" coords="345,83,422,102">
<area href="class_sc__Ref.html" shape="rect" coords="370,215,509,234">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="class_sc__ShmMemoryGrp-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::ShmMemoryGrp::ShmMemoryGrp"></a>
&nbsp;</td><td valign=bottom><b>ShmMemoryGrp</b> (const <a class="el" href="class_sc__Ref.html">Ref</a>&lt; <a class="el" href="class_sc__MessageGrp.html">MessageGrp</a> &gt; &amp;msg)</td></tr>
<tr><td nowrap align=right valign=top><a name="a1" doxytag="sc::ShmMemoryGrp::ShmMemoryGrp"></a>
&nbsp;</td><td valign=bottom><b>ShmMemoryGrp</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::ShmMemoryGrp::~ShmMemoryGrp"></a>
&nbsp;</td><td valign=bottom><b>~ShmMemoryGrp</b> ()</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="class_sc__ShmMemoryGrp.html#a3">set_localsize</a> (size_t)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Set the size of locally held memory.</em> <a href="#a3">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="a4" doxytag="sc::ShmMemoryGrp::localdata"></a>
void*&nbsp;</td><td valign=bottom><a class="el" href="class_sc__ShmMemoryGrp.html#a4">localdata</a> ()</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Returns a pointer to the local data.</em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void*&nbsp;</td><td valign=bottom><a class="el" href="class_sc__ShmMemoryGrp.html#a5">obtain_readwrite</a> (distsize_t offset, int size)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Only one thread can have an unreleased obtain_readwrite at a time.</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::ShmMemoryGrp::obtain_readonly"></a>
void*&nbsp;</td><td valign=bottom><a class="el" href="class_sc__ShmMemoryGrp.html#a6">obtain_readonly</a> (distsize_t offset, int size)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>This gives read access to the memory location. No locking is done.</em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="a7" doxytag="sc::ShmMemoryGrp::obtain_writeonly"></a>
void*&nbsp;</td><td valign=bottom><a class="el" href="class_sc__ShmMemoryGrp.html#a7">obtain_writeonly</a> (distsize_t offset, int size)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>This gives write access to the memory location. No locking is done.</em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="a8" doxytag="sc::ShmMemoryGrp::release_readonly"></a>
void&nbsp;</td><td valign=bottom><a class="el" href="class_sc__ShmMemoryGrp.html#a8">release_readonly</a> (void *data, distsize_t offset, int size)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>This is called when read access is no longer needed.</em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="a9" doxytag="sc::ShmMemoryGrp::release_writeonly"></a>
void&nbsp;</td><td valign=bottom><a class="el" href="class_sc__ShmMemoryGrp.html#a9">release_writeonly</a> (void *data, distsize_t offset, int size)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>This is called when write access is no longer needed.</em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="class_sc__ShmMemoryGrp.html#a10">release_readwrite</a> (void *data, distsize_t offset, int size)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>This is called when read/write access is no longer needed.</em> <a href="#a10">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="a11" doxytag="sc::ShmMemoryGrp::print"></a>
void&nbsp;</td><td valign=bottom><a class="el" href="class_sc__ShmMemoryGrp.html#a11">print</a> (std::ostream &amp;o=ExEnv::out0()) const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Prints out information about the object.</em></font><br><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The <a class="el" href="class_sc__ShmMemoryGrp.html">ShmMemoryGrp</a> concrete class provides an implementation of <a class="el" href="class_sc__MsgMemoryGrp.html">MsgMemoryGrp</a>.
<p>
It uses SYSV IPC to provided shared memory in a system that provide shared memory in hardware. It is very fast and reliable. 
<p>
<hr><h2>Member Function Documentation</h2>
<a name="a5" doxytag="sc::ShmMemoryGrp::obtain_readwrite"></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::ShmMemoryGrp::obtain_readwrite (
          </b></td>
          <td valign="bottom"><b>
distsize_t <em>offset</em>, 
          </b></td>
        </tr>
        <tr>
          <td></td>
          <td><b>
int <em>size</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>
Only one thread can have an unreleased obtain_readwrite at a time.
<p>
The actual memory region locked can be larger than that requested. If the memory region is already locked this will block. For this reason, data should be held as read/write for as short a time as possible. 
<p>
Reimplemented from <a class="el" href="class_sc__MemoryGrp.html#a15">sc::MemoryGrp</a>.    </td>
  </tr>
</table>
<a name="a10" doxytag="sc::ShmMemoryGrp::release_readwrite"></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::ShmMemoryGrp::release_readwrite (
          </b></td>
          <td valign="bottom"><b>
void * <em>data</em>, 
          </b></td>
        </tr>
        <tr>
          <td></td>
          <td><b>
distsize_t <em>offset</em>, 
          </b></td>
        </tr>
        <tr>
          <td></td>
          <td><b>
int <em>size</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>
This is called when read/write access is no longer needed.
<p>
The memory will be unlocked. 
<p>
Reimplemented from <a class="el" href="class_sc__MemoryGrp.html#a19">sc::MemoryGrp</a>.    </td>
  </tr>
</table>
<a name="a3" doxytag="sc::ShmMemoryGrp::set_localsize"></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::ShmMemoryGrp::set_localsize (
          </b></td>
          <td valign="bottom"><b>
size_t <em>localsize</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>
Set the size of locally held memory.
<p>
When memory is accessed using a global offset counting starts at node 0 and proceeds up to node <a class="el" href="class_sc__MemoryGrp.html#a4">n</a>() - 1. 
<p>
Reimplemented from <a class="el" href="class_sc__MsgMemoryGrp.html#a3">sc::MsgMemoryGrp</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="memshm_h-source.html">memshm.h</a></ul>
<hr>
<address>
<small>

Generated at Mon Oct 14 14:17:48 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>