Sophie

Sophie

distrib > * > cooker > x86_64 > by-pkgid > 6821ecc3db154939da2f564d5e6d1885 > files > 1022

ppl-docs-0.11.2-1.x86_64.rpm

<!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">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>PPL C Language Interface: Handling</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.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>Handling</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Timeout.html#ga3b97bf31964a662176749152d0086271">ppl_set_timeout</a> (unsigned time)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the timeout for computations whose completion could require an exponential amount of time.  <a href="#ga3b97bf31964a662176749152d0086271"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga3ebabd1a7396005fadcd08efb53c1f58"></a><!-- doxytag: member="Timeout::ppl_reset_timeout" ref="ga3ebabd1a7396005fadcd08efb53c1f58" args="(void)" -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Timeout.html#ga3ebabd1a7396005fadcd08efb53c1f58">ppl_reset_timeout</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resets the timeout time so that the computation is not interrupted. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Timeout.html#ga8394b6aef8fc9841ec4e63c2724ad75d">ppl_set_deterministic_timeout</a> (unsigned weight)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets a threshold for computations whose completion could require an exponential amount of time.  <a href="#ga8394b6aef8fc9841ec4e63c2724ad75d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga7e11189e03e9d1452b16e24dae5d6bc3"></a><!-- doxytag: member="Timeout::ppl_reset_deterministic_timeout" ref="ga7e11189e03e9d1452b16e24dae5d6bc3" args="(void)" -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Timeout.html#ga7e11189e03e9d1452b16e24dae5d6bc3">ppl_reset_deterministic_timeout</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resets the deterministic timeout so that the computation is not interrupted. <br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Functions for setting and resetting timeouts. </p>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga3b97bf31964a662176749152d0086271"></a><!-- doxytag: member="ppl_c_header.h::ppl_set_timeout" ref="ga3b97bf31964a662176749152d0086271" args="(unsigned time)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ppl_set_timeout </td>
          <td>(</td>
          <td class="paramtype">unsigned&nbsp;</td>
          <td class="paramname"> <em>time</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the timeout for computations whose completion could require an exponential amount of time. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>time</em>&nbsp;</td><td>The number of hundreths of seconds. It must be strictly greater than zero.</td></tr>
  </table>
  </dd>
</dl>
<p>Computations taking exponential time will be interrupted some time after <code>time</code> hundreths of seconds have elapsed since the call to the timeout setting function. If the computation is interrupted that way, the interrupted function will return error code <code>PPL_TIMEOUT_EXCEPTION</code>. Otherwise, if the computation completes without being interrupted, then the timeout should be reset by calling <code><a class="el" href="group__Timeout.html#ga3ebabd1a7396005fadcd08efb53c1f58" title="Resets the timeout time so that the computation is not interrupted.">ppl_reset_timeout()</a></code>. </p>

</div>
</div>
<a class="anchor" id="ga8394b6aef8fc9841ec4e63c2724ad75d"></a><!-- doxytag: member="ppl_c_header.h::ppl_set_deterministic_timeout" ref="ga8394b6aef8fc9841ec4e63c2724ad75d" args="(unsigned weight)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ppl_set_deterministic_timeout </td>
          <td>(</td>
          <td class="paramtype">unsigned&nbsp;</td>
          <td class="paramname"> <em>weight</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets a threshold for computations whose completion could require an exponential amount of time. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>weight</em>&nbsp;</td><td>The maximum computational weight allowed. It must be strictly greater than zero.</td></tr>
  </table>
  </dd>
</dl>
<p>Computations taking exponential time will be interrupted some time after reaching the <code>weight</code> complexity threshold. If the computation is interrupted that way, the interrupted function will return error code <code>PPL_TIMEOUT_EXCEPTION</code>. Otherwise, if the computation completes without being interrupted, then the deterministic timeout should be reset by calling <code><a class="el" href="group__Timeout.html#ga7e11189e03e9d1452b16e24dae5d6bc3" title="Resets the deterministic timeout so that the computation is not interrupted.">ppl_reset_deterministic_timeout()</a></code>.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>This "timeout" checking functionality is said to be <em>deterministic</em> because it is not based on actual elapsed time. Its behavior will only depend on (some of the) computations performed in the PPL library and it will be otherwise independent from the computation environment (CPU, operating system, compiler, etc.).</dd></dl>
<dl class="warning"><dt><b>Warning:</b></dt><dd>The weight mechanism is under alpha testing. In particular, there is still no clear relation between the weight threshold and the actual computational complexity. As a consequence, client applications should be ready to reconsider the tuning of these weight thresholds when upgrading to newer version of the PPL. </dd></dl>

</div>
</div>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Sun Feb 27 10:12:18 2011 for PPL C Language Interface by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>