<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>MPQC: sc::ShmMessageGrp Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.9 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><b>sc</b>::<a class="el" href="classsc_1_1ShmMessageGrp.html">ShmMessageGrp</a> </div> </div> <div class="contents"> <h1>sc::ShmMessageGrp Class Reference</h1><!-- doxytag: class="sc::ShmMessageGrp" --><!-- doxytag: inherits="sc::intMessageGrp" -->The <a class="el" href="classsc_1_1ShmMessageGrp.html" title="The ShmMessageGrp class is an implementation of MessageGrp that allows multiple process...">ShmMessageGrp</a> class is an implementation of <a class="el" href="classsc_1_1MessageGrp.html" title="The MessageGrp abstract class provides a mechanism for moving data and objects between...">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_8h_source.html">messshm.h</a>></code> <p> <div class="dynheader"> Inheritance diagram for sc::ShmMessageGrp:</div> <div class="dynsection"> <p><center><img src="classsc_1_1ShmMessageGrp.png" usemap="#sc::ShmMessageGrp_map" border="0" alt=""></center> <map name="sc::ShmMessageGrp_map"> <area href="classsc_1_1intMessageGrp.html" alt="sc::intMessageGrp" shape="rect" coords="0,224,127,248"> <area href="classsc_1_1MessageGrp.html" alt="sc::MessageGrp" shape="rect" coords="0,168,127,192"> <area href="classsc_1_1DescribedClass.html" alt="sc::DescribedClass" shape="rect" coords="0,112,127,136"> <area href="classsc_1_1RefCount.html" alt="sc::RefCount" shape="rect" coords="0,56,127,80"> <area href="classsc_1_1Identity.html" alt="sc::Identity" shape="rect" coords="0,0,127,24"> </map> </div> <p> <a href="classsc_1_1ShmMessageGrp-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="468e266389875a8087c25ca85fbb1c95"></a><!-- doxytag: member="sc::ShmMessageGrp::ShmMessageGrp" ref="468e266389875a8087c25ca85fbb1c95" args="()" --> </td><td class="memItemRight" valign="bottom"><a class="el" href="classsc_1_1ShmMessageGrp.html#468e266389875a8087c25ca85fbb1c95">ShmMessageGrp</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Reads the number of processors from environmental variable NUMPROC. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classsc_1_1ShmMessageGrp.html#84322428cedb5c8ee9a98602f5cd90a7">ShmMessageGrp</a> (const <a class="el" href="classsc_1_1Ref.html">Ref</a>< <a class="el" href="classsc_1_1KeyVal.html">KeyVal</a> > &)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The <a class="el" href="classsc_1_1ShmMessageGrp.html" title="The ShmMessageGrp class is an implementation of MessageGrp that allows multiple process...">ShmMessageGrp</a> <a class="el" href="classsc_1_1KeyVal.html" title="The KeyVal class is designed to simplify the process of allowing a user to specify...">KeyVal</a> constructor takes a single keyword that specifies the number of processors. <a href="#84322428cedb5c8ee9a98602f5cd90a7"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="124399fd11b564311aa9312ae3b6aca4"></a><!-- doxytag: member="sc::ShmMessageGrp::ShmMessageGrp" ref="124399fd11b564311aa9312ae3b6aca4" args="(int nprocs)" --> </td><td class="memItemRight" valign="bottom"><a class="el" href="classsc_1_1ShmMessageGrp.html#124399fd11b564311aa9312ae3b6aca4">ShmMessageGrp</a> (int nprocs)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize <a class="el" href="classsc_1_1ShmMessageGrp.html" title="The ShmMessageGrp class is an implementation of MessageGrp that allows multiple process...">ShmMessageGrp</a> to use nprocs processors. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="867ee472c612bc6764b48c1abcf05171"></a><!-- doxytag: member="sc::ShmMessageGrp::sync" ref="867ee472c612bc6764b48c1abcf05171" args="()" --> void </td><td class="memItemRight" valign="bottom"><a class="el" href="classsc_1_1ShmMessageGrp.html#867ee472c612bc6764b48c1abcf05171">sync</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Synchronize all of the processors. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classsc_1_1Ref.html">Ref</a>< <a class="el" href="classsc_1_1MessageGrp.html">MessageGrp</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classsc_1_1ShmMessageGrp.html#a2a7b603183871a6a3d25cdd5de05290">clone</a> (void)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a copy of this <a class="el" href="classsc_1_1MessageGrp.html" title="The MessageGrp abstract class provides a mechanism for moving data and objects between...">MessageGrp</a> specialization that provides an independent communication context. <a href="#a2a7b603183871a6a3d25cdd5de05290"></a><br></td></tr> <tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c49003e2dfbfca514a3454d1ccecbd99"></a><!-- doxytag: member="sc::ShmMessageGrp::basic_send" ref="c49003e2dfbfca514a3454d1ccecbd99" args="(int target, int type, const void *data, int nbyte)" --> void </td><td class="memItemRight" valign="bottom"><a class="el" href="classsc_1_1ShmMessageGrp.html#c49003e2dfbfca514a3454d1ccecbd99">basic_send</a> (int target, int type, const void *data, int nbyte)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Must be implemented by specializations. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="38e312a41172f86193d1183ac169288c"></a><!-- doxytag: member="sc::ShmMessageGrp::basic_recv" ref="38e312a41172f86193d1183ac169288c" args="(int type, void *data, int nbyte)" --> void </td><td class="memItemRight" valign="bottom"><a class="el" href="classsc_1_1ShmMessageGrp.html#38e312a41172f86193d1183ac169288c">basic_recv</a> (int type, void *data, int nbyte)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Must be implemented by specializations. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b686e185158e8c1ca3e131cf7433a72c"></a><!-- doxytag: member="sc::ShmMessageGrp::basic_probe" ref="b686e185158e8c1ca3e131cf7433a72c" args="(int type)" --> int </td><td class="memItemRight" valign="bottom"><a class="el" href="classsc_1_1ShmMessageGrp.html#b686e185158e8c1ca3e131cf7433a72c">basic_probe</a> (int type)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Must be implemented by specializations. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="de63289e633d3d33c218becb43f8b4bc"></a><!-- doxytag: member="sc::ShmMessageGrp::initialize" ref="de63289e633d3d33c218becb43f8b4bc" args="(int nprocs)" --> void </td><td class="memItemRight" valign="bottom"><b>initialize</b> (int nprocs)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bf3af5c07234bd8f5c9f2b9d481734da"></a><!-- doxytag: member="sc::ShmMessageGrp::initialize" ref="bf3af5c07234bd8f5c9f2b9d481734da" args="()" --> void </td><td class="memItemRight" valign="bottom"><b>initialize</b> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a9e76160ee95bb0426f783d9c502c5e6"></a><!-- doxytag: member="sc::ShmMessageGrp::NEXT_MESSAGE" ref="a9e76160ee95bb0426f783d9c502c5e6" args="(msgbuf_t *m)" --> msgbuf_t * </td><td class="memItemRight" valign="bottom"><b>NEXT_MESSAGE</b> (msgbuf_t *m)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ee7f872843abc196f658fb92e8613e50"></a><!-- doxytag: member="sc::ShmMessageGrp::get_change" ref="ee7f872843abc196f658fb92e8613e50" args="(int node)" --> void </td><td class="memItemRight" valign="bottom"><b>get_change</b> (int node)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0d55008716e7f91a2fa273c58785b368"></a><!-- doxytag: member="sc::ShmMessageGrp::put_change" ref="0d55008716e7f91a2fa273c58785b368" args="(int node)" --> void </td><td class="memItemRight" valign="bottom"><b>put_change</b> (int node)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cb28ed530c2516fa106fdf0741f9f1d1"></a><!-- doxytag: member="sc::ShmMessageGrp::wait_for_write" ref="cb28ed530c2516fa106fdf0741f9f1d1" args="(int node)" --> void </td><td class="memItemRight" valign="bottom"><b>wait_for_write</b> (int node)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9e920e75ffc5598188751a679ca422d6"></a><!-- doxytag: member="sc::ShmMessageGrp::release_write" ref="9e920e75ffc5598188751a679ca422d6" args="(int node)" --> void </td><td class="memItemRight" valign="bottom"><b>release_write</b> (int node)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="861fa20867dd3fe602ce475869e7980e"></a><!-- doxytag: member="sc::ShmMessageGrp::print_buffer" ref="861fa20867dd3fe602ce475869e7980e" args="(int node, int me)" --> void </td><td class="memItemRight" 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 class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8ad990a86c99ffbe5a35954bb5934547"></a><!-- doxytag: member="sc::ShmMessageGrp::commbuf" ref="8ad990a86c99ffbe5a35954bb5934547" args="[MAXPROCS]" --> commbuf_t * </td><td class="memItemRight" valign="bottom"><b>commbuf</b> [MAXPROCS]</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b58c0f033a3657a7634ce9bb1d7984b9"></a><!-- doxytag: member="sc::ShmMessageGrp::shmid" ref="b58c0f033a3657a7634ce9bb1d7984b9" args="" --> int </td><td class="memItemRight" valign="bottom"><b>shmid</b></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ca18adff5eafbc82039d6fb14b39c80e"></a><!-- doxytag: member="sc::ShmMessageGrp::semid" ref="ca18adff5eafbc82039d6fb14b39c80e" args="" --> int </td><td class="memItemRight" valign="bottom"><b>semid</b></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="afa845d8789983db46738f63529123c9"></a><!-- doxytag: member="sc::ShmMessageGrp::change_semid" ref="afa845d8789983db46738f63529123c9" args="" --> int </td><td class="memItemRight" valign="bottom"><b>change_semid</b></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="491a0ff62b891257a388b30e56f5036d"></a><!-- doxytag: member="sc::ShmMessageGrp::sharedmem" ref="491a0ff62b891257a388b30e56f5036d" args="" --> void * </td><td class="memItemRight" valign="bottom"><b>sharedmem</b></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5c0626c8165369f9163d6d3b65889166"></a><!-- doxytag: member="sc::ShmMessageGrp::semdec" ref="5c0626c8165369f9163d6d3b65889166" args="" --> struct sembuf </td><td class="memItemRight" valign="bottom"><b>semdec</b></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="036cdcfd52fce77e466b501ce130312a"></a><!-- doxytag: member="sc::ShmMessageGrp::seminc" ref="036cdcfd52fce77e466b501ce130312a" args="" --> struct sembuf </td><td class="memItemRight" valign="bottom"><b>seminc</b></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> The <a class="el" href="classsc_1_1ShmMessageGrp.html" title="The ShmMessageGrp class is an implementation of MessageGrp that allows multiple process...">ShmMessageGrp</a> class is an implementation of <a class="el" href="classsc_1_1MessageGrp.html" title="The MessageGrp abstract class provides a mechanism for moving data and objects between...">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. <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="84322428cedb5c8ee9a98602f5cd90a7"></a><!-- doxytag: member="sc::ShmMessageGrp::ShmMessageGrp" ref="84322428cedb5c8ee9a98602f5cd90a7" args="(const Ref< KeyVal > &)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">sc::ShmMessageGrp::ShmMessageGrp </td> <td>(</td> <td class="paramtype">const <a class="el" href="classsc_1_1Ref.html">Ref</a>< <a class="el" href="classsc_1_1KeyVal.html">KeyVal</a> > & </td> <td class="paramname"> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> The <a class="el" href="classsc_1_1ShmMessageGrp.html" title="The ShmMessageGrp class is an implementation of MessageGrp that allows multiple process...">ShmMessageGrp</a> <a class="el" href="classsc_1_1KeyVal.html" title="The KeyVal class is designed to simplify the process of allowing a user to specify...">KeyVal</a> constructor takes a single keyword that specifies the number of processors. <p> Here is an example of a <a class="el" href="classsc_1_1ParsedKeyVal.html" title="Converts textual information into keyword/value assocations.">ParsedKeyVal</a> input that creates a <a class="el" href="classsc_1_1ShmMessageGrp.html" title="The ShmMessageGrp class is an implementation of MessageGrp that allows multiple process...">ShmMessageGrp</a> that runs on four processors:<p> <pre> message<ShmMessageGrp>: n = 4 </pre> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="a2a7b603183871a6a3d25cdd5de05290"></a><!-- doxytag: member="sc::ShmMessageGrp::clone" ref="a2a7b603183871a6a3d25cdd5de05290" args="(void)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classsc_1_1Ref.html">Ref</a><<a class="el" href="classsc_1_1MessageGrp.html">MessageGrp</a>> sc::ShmMessageGrp::clone </td> <td>(</td> <td class="paramtype">void </td> <td class="paramname"> </td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Returns a copy of this <a class="el" href="classsc_1_1MessageGrp.html" title="The MessageGrp abstract class provides a mechanism for moving data and objects between...">MessageGrp</a> specialization that provides an independent communication context. <p> <p>Implements <a class="el" href="classsc_1_1MessageGrp.html#f928526e305eab8b5a1d4ca0e57949f1">sc::MessageGrp</a>.</p> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="messshm_8h_source.html">messshm.h</a></ul> </div> <hr> <address> <small> Generated at Wed Oct 14 14:12:16 2009 for <a href="http://www.mpqc.org">MPQC</a> 2.3.1 using the documentation package <a href="http://www.doxygen.org">Doxygen</a> 1.5.9. </small> </address> </body> </html>