<!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::ShmMessageGrp 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> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="pages.html">Related Pages</a> </center> <hr><h1>sc::ShmMessageGrp Class Reference</h1>The <a class="el" href="class_sc__ShmMessageGrp.html">ShmMessageGrp</a> class is an implementation of <a class="el" href="class_sc__MessageGrp.html">MessageGrp</a> that allows multiple process to be started that communicate with shared memory. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="messshm_h-source.html">messshm.h</a>></code> <p> Inheritance diagram for sc::ShmMessageGrp<p><center><img src="class_sc__ShmMessageGrp_inherit_graph.gif" border="0" usemap="#sc::ShmMessageGrp_inherit_map" alt="Inheritance graph"></center> <map name="sc::ShmMessageGrp_inherit_map"> <area href="class_sc__intMessageGrp.html" shape="rect" coords="19,280,131,299"> <area href="class_sc__MessageGrp.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::ShmMessageGrp:<p><center><img src="class_sc__ShmMessageGrp_coll_graph.gif" border="0" usemap="#sc::ShmMessageGrp_coll_map" alt="Collaboration graph"></center> <map name="sc::ShmMessageGrp_coll_map"> <area href="class_sc__intMessageGrp.html" shape="rect" coords="198,331,310,350"> <area href="class_sc__MessageGrp.html" shape="rect" coords="205,262,303,281"> <area href="class_sc__DescribedClass.html" shape="rect" coords="14,179,129,198"> <area href="class_sc__RefCount.html" shape="rect" coords="18,97,101,115"> <area href="class_sc__Identity.html" shape="rect" coords="23,14,95,33"> <area href="class_sc__Ref.html" shape="rect" coords="373,179,543,198"> <area href="class_sc__RefBase.html" shape="rect" coords="419,97,497,115"> </map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="class_sc__ShmMessageGrp-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::ShmMessageGrp::ShmMessageGrp"></a> </td><td valign=bottom><a class="el" href="class_sc__ShmMessageGrp.html#a0">ShmMessageGrp</a> ()</td></tr> <tr><td> </td><td><font size=-1><em>Reads the number of processors from environmental variable NUMPROC.</em></font><br><br></td></tr> <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="class_sc__ShmMessageGrp.html#a1">ShmMessageGrp</a> (const <a class="el" href="class_sc__Ref.html">Ref</a>< <a class="el" href="class_sc__KeyVal.html">KeyVal</a> > &)</td></tr> <tr><td> </td><td><font size=-1><em>The <a class="el" href="class_sc__ShmMessageGrp.html">ShmMessageGrp</a> <a class="el" href="class_sc__KeyVal.html">KeyVal</a> constructor takes a single keyword that specifies the number of processors.</em> <a href="#a1">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top><a name="a2" doxytag="sc::ShmMessageGrp::ShmMessageGrp"></a> </td><td valign=bottom><a class="el" href="class_sc__ShmMessageGrp.html#a2">ShmMessageGrp</a> (int nprocs)</td></tr> <tr><td> </td><td><font size=-1><em>Initialize <a class="el" href="class_sc__ShmMessageGrp.html">ShmMessageGrp</a> to use nprocs processors.</em></font><br><br></td></tr> <tr><td nowrap align=right valign=top><a name="a3" doxytag="sc::ShmMessageGrp::~ShmMessageGrp"></a> </td><td valign=bottom><b>~ShmMessageGrp</b> ()</td></tr> <tr><td nowrap align=right valign=top><a name="a4" doxytag="sc::ShmMessageGrp::sync"></a> void </td><td valign=bottom><a class="el" href="class_sc__ShmMessageGrp.html#a4">sync</a> ()</td></tr> <tr><td> </td><td><font size=-1><em>Synchronize all of the processors.</em></font><br><br></td></tr> <tr><td nowrap align=right valign=top><a name="a5" doxytag="sc::ShmMessageGrp::clone"></a> <a class="el" href="class_sc__Ref.html">Ref</a><<a class="el" href="class_sc__MessageGrp.html">MessageGrp</a>> </td><td valign=bottom><a class="el" href="class_sc__ShmMessageGrp.html#a5">clone</a> (void)</td></tr> <tr><td> </td><td><font size=-1><em>Returns a copy of this <a class="el" href="class_sc__MessageGrp.html">MessageGrp</a> specialization that provides an independent communication context.</em></font><br><br></td></tr> <tr><td colspan=2><br><h2>Protected Methods</h2></td></tr> <tr><td nowrap align=right valign=top><a name="b0" doxytag="sc::ShmMessageGrp::basic_send"></a> void </td><td valign=bottom><a class="el" href="class_sc__ShmMessageGrp.html#b0">basic_send</a> (int target, int type, void *data, int nbyte)</td></tr> <tr><td> </td><td><font size=-1><em>Must be implemented by specializations.</em></font><br><br></td></tr> <tr><td nowrap align=right valign=top><a name="b1" doxytag="sc::ShmMessageGrp::basic_recv"></a> void </td><td valign=bottom><a class="el" href="class_sc__ShmMessageGrp.html#b1">basic_recv</a> (int type, void *data, int nbyte)</td></tr> <tr><td> </td><td><font size=-1><em>Must be implemented by specializations.</em></font><br><br></td></tr> <tr><td nowrap align=right valign=top><a name="b2" doxytag="sc::ShmMessageGrp::basic_probe"></a> int </td><td valign=bottom><a class="el" href="class_sc__ShmMessageGrp.html#b2">basic_probe</a> (int type)</td></tr> <tr><td> </td><td><font size=-1><em>Must be implemented by specializations.</em></font><br><br></td></tr> <tr><td nowrap align=right valign=top><a name="b3" doxytag="sc::ShmMessageGrp::initialize"></a> void </td><td valign=bottom><b>initialize</b> (int nprocs)</td></tr> <tr><td nowrap align=right valign=top><a name="b4" doxytag="sc::ShmMessageGrp::initialize"></a> void </td><td valign=bottom><b>initialize</b> ()</td></tr> <tr><td nowrap align=right valign=top><a name="b5" doxytag="sc::ShmMessageGrp::NEXT_MESSAGE"></a> msgbuf_t* </td><td valign=bottom><b>NEXT_MESSAGE</b> (msgbuf_t *m)</td></tr> <tr><td nowrap align=right valign=top><a name="b6" doxytag="sc::ShmMessageGrp::get_change"></a> void </td><td valign=bottom><b>get_change</b> (int node)</td></tr> <tr><td nowrap align=right valign=top><a name="b7" doxytag="sc::ShmMessageGrp::put_change"></a> void </td><td valign=bottom><b>put_change</b> (int node)</td></tr> <tr><td nowrap align=right valign=top><a name="b8" doxytag="sc::ShmMessageGrp::wait_for_write"></a> void </td><td valign=bottom><b>wait_for_write</b> (int node)</td></tr> <tr><td nowrap align=right valign=top><a name="b9" doxytag="sc::ShmMessageGrp::release_write"></a> void </td><td valign=bottom><b>release_write</b> (int node)</td></tr> <tr><td nowrap align=right valign=top><a name="b10" doxytag="sc::ShmMessageGrp::print_buffer"></a> void </td><td valign=bottom><b>print_buffer</b> (int node, int me)</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::ShmMessageGrp::commbuf"></a> commbuf_t* </td><td valign=bottom><b>commbuf</b> [MAXPROCS]</td></tr> <tr><td nowrap align=right valign=top><a name="n1" doxytag="sc::ShmMessageGrp::shmid"></a> int </td><td valign=bottom><b>shmid</b></td></tr> <tr><td nowrap align=right valign=top><a name="n2" doxytag="sc::ShmMessageGrp::semid"></a> int </td><td valign=bottom><b>semid</b></td></tr> <tr><td nowrap align=right valign=top><a name="n3" doxytag="sc::ShmMessageGrp::change_semid"></a> int </td><td valign=bottom><b>change_semid</b></td></tr> <tr><td nowrap align=right valign=top><a name="n4" doxytag="sc::ShmMessageGrp::sharedmem"></a> void* </td><td valign=bottom><b>sharedmem</b></td></tr> <tr><td nowrap align=right valign=top><a name="n5" doxytag="sc::ShmMessageGrp::semdec"></a> struct sembuf </td><td valign=bottom><b>semdec</b></td></tr> <tr><td nowrap align=right valign=top><a name="n6" doxytag="sc::ShmMessageGrp::seminc"></a> struct sembuf </td><td valign=bottom><b>seminc</b></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> The <a class="el" href="class_sc__ShmMessageGrp.html">ShmMessageGrp</a> class is an implementation of <a class="el" href="class_sc__MessageGrp.html">MessageGrp</a> that allows multiple process to be started that communicate with shared memory. <p> This only provides improved performance if you have multiple CPU's in a symmetric multiprocessor configuration. Nonetheless, it is quite useful on a single CPU for tracking down bugs. <p> <hr><h2>Constructor & Destructor Documentation</h2> <a name="a1" doxytag="sc::ShmMessageGrp::ShmMessageGrp"></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> sc::ShmMessageGrp::ShmMessageGrp ( </b></td> <td valign="bottom"><b> const <a class="el" href="class_sc__Ref.html">Ref</a>< <a class="el" href="class_sc__KeyVal.html">KeyVal</a> > & ) </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> The <a class="el" href="class_sc__ShmMessageGrp.html">ShmMessageGrp</a> <a class="el" href="class_sc__KeyVal.html">KeyVal</a> constructor takes a single keyword that specifies the number of processors. <p> Here is an example of a <a class="el" href="class_sc__ParsedKeyVal.html">ParsedKeyVal</a> input that creates a <a class="el" href="class_sc__ShmMessageGrp.html">ShmMessageGrp</a> that runs on four processors: <p> <pre> message<<a class="el" href="class_sc__ShmMessageGrp.html">ShmMessageGrp</a>>: n = 4 </pre> </td> </tr> </table> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="messshm_h-source.html">messshm.h</a></ul> <hr> <address> <small> Generated at Mon Oct 14 14:17:49 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>