0c5e0b3f43
[SVN r53471]
76 lines
4.0 KiB
HTML
76 lines
4.0 KiB
HTML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="generator" content="Docutils 0.6: http://docutils.sourceforge.net/" />
|
|
<title>Parallel BGL Simple Triggers</title>
|
|
<link rel="stylesheet" href="../../../../rst.css" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div class="document" id="logo-simple-triggers">
|
|
<h1 class="title"><a class="reference external" href="http://www.osl.iu.edu/research/pbgl"><img align="middle" alt="Parallel BGL" class="align-middle" src="pbgl-logo.png" /></a> Simple Triggers</h1>
|
|
|
|
<!-- Copyright (C) 2004-2008 The Trustees of Indiana University.
|
|
Use, modification and distribution is subject to the Boost Software
|
|
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
|
http://www.boost.org/LICENSE_1_0.txt) -->
|
|
<div class="contents topic" id="contents">
|
|
<p class="topic-title first">Contents</p>
|
|
<ul class="simple">
|
|
<li><a class="reference internal" href="#introduction" id="id1">Introduction</a></li>
|
|
<li><a class="reference internal" href="#where-defined" id="id2">Where Defined</a></li>
|
|
<li><a class="reference internal" href="#reference" id="id3">Reference</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="section" id="introduction">
|
|
<h1><a class="toc-backref" href="#id1">Introduction</a></h1>
|
|
<p>Triggers in the <a class="reference external" href="process_group.html">process group</a> interface are used to asynchronously
|
|
receive and process messages destined for distributed data
|
|
structures. The trigger interface is relatively versatile, permitting
|
|
one to attach any function object to handle requests. The
|
|
<tt class="docutils literal"><span class="pre">simple_trigger</span></tt> function simplifies a common case for triggers:
|
|
attaching a trigger that invokes a specific member function of the
|
|
distributed data structure.</p>
|
|
</div>
|
|
<div class="section" id="where-defined">
|
|
<h1><a class="toc-backref" href="#id2">Where Defined</a></h1>
|
|
<p>Header <tt class="docutils literal"><span class="pre"><boost/graph/parallel/simple_trigger.hpp></span></tt></p>
|
|
</div>
|
|
<div class="section" id="reference">
|
|
<h1><a class="toc-backref" href="#id3">Reference</a></h1>
|
|
<blockquote>
|
|
<pre class="literal-block">
|
|
template<typename ProcessGroup, typename Class, typename T>
|
|
void
|
|
simple_trigger(ProcessGroup& pg, int tag, Class* self,
|
|
void (Class::*pmf)(int source, int tag, const T& data,
|
|
trigger_receive_context context))
|
|
|
|
template<typename ProcessGroup, typename Class, typename T, typename Result>
|
|
void
|
|
simple_trigger(ProcessGroup& pg, int tag, Class* self,
|
|
Result (Class::*pmf)(int source, int tag, const T& data,
|
|
trigger_receive_context context))
|
|
</pre>
|
|
</blockquote>
|
|
<p>The <tt class="docutils literal"><span class="pre">simple_trigger</span></tt> function registers a trigger that invokes the
|
|
given member function (<tt class="docutils literal"><span class="pre">pmf</span></tt>) on the object <tt class="docutils literal"><span class="pre">self</span></tt> whenever a
|
|
message is received. If the member function has a return value, then
|
|
the trigger has a reply, and can only be used via out-of-band sends
|
|
that expect a reply. Otherwise, the member function returns <tt class="docutils literal"><span class="pre">void</span></tt>,
|
|
and the function is registered as a normal trigger.</p>
|
|
<hr class="docutils" />
|
|
<p>Copyright (C) 2007 Douglas Gregor</p>
|
|
<p>Copyright (C) 2007 Matthias Troyer</p>
|
|
</div>
|
|
</div>
|
|
<div class="footer">
|
|
<hr class="footer" />
|
|
Generated on: 2009-05-31 00:21 UTC.
|
|
Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
|
|
|
|
</div>
|
|
</body>
|
|
</html>
|