dust3d/thirdparty/instant-meshes/instant-meshes-dust3d/ext/tbb/doc/html/a00120.html

322 lines
19 KiB
HTML

<!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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.4"/>
<title>tbb::interface6::runtime_loader Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!-- end header part -->
<!-- Generated by Doxygen 1.8.4 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</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 id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="a00228.html">tbb</a></li><li class="navelem"><b>interface6</b></li><li class="navelem"><a class="el" href="a00120.html">runtime_loader</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="a00379.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">tbb::interface6::runtime_loader Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Load TBB at runtime.
<a href="a00120.html#details">More...</a></p>
<p><code>#include &lt;runtime_loader.h&gt;</code></p>
<div class="dynheader">
Inheritance diagram for tbb::interface6::runtime_loader:</div>
<div class="dyncontent">
<div class="center">
<img src="a00120.png" usemap="#tbb::interface6::runtime_loader_map" alt=""/>
<map id="tbb::interface6::runtime_loader_map" name="tbb::interface6::runtime_loader_map">
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:ab85c82f9c0ccd91905f2795a79ac1295"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html#ab85c82f9c0ccd91905f2795a79ac1295">error_mode</a> { <a class="el" href="a00120.html#ab85c82f9c0ccd91905f2795a79ac1295af9c9137d6acdb0fd37f1a92b5cdaeb36">em_status</a>,
<a class="el" href="a00120.html#ab85c82f9c0ccd91905f2795a79ac1295a17ec1019cffa635146eaefb042e28a2c">em_throw</a>,
<a class="el" href="a00120.html#ab85c82f9c0ccd91905f2795a79ac1295ac41f8e03c7e8bfc6a420be035d59cc35">em_abort</a>
}</td></tr>
<tr class="memdesc:ab85c82f9c0ccd91905f2795a79ac1295"><td class="mdescLeft">&#160;</td><td class="mdescRight">Error mode constants. <a href="a00120.html#ab85c82f9c0ccd91905f2795a79ac1295">More...</a><br/></td></tr>
<tr class="separator:ab85c82f9c0ccd91905f2795a79ac1295"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a264674772d9f4240d89aa9d939c1eef7"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html#a264674772d9f4240d89aa9d939c1eef7">error_code</a> { <br/>
&#160;&#160;<a class="el" href="a00120.html#a264674772d9f4240d89aa9d939c1eef7afc7eba28f2fc936312f041cf85276434">ec_ok</a>,
<a class="el" href="a00120.html#a264674772d9f4240d89aa9d939c1eef7a670e4d0a5a3c1bbcdff9e5ee16dc9c01">ec_bad_call</a>,
<a class="el" href="a00120.html#a264674772d9f4240d89aa9d939c1eef7afd928f63eb3da0980e746d58374b07c3">ec_bad_arg</a>,
<a class="el" href="a00120.html#a264674772d9f4240d89aa9d939c1eef7a71f874957c0322f499ba764dd0bb8732">ec_bad_lib</a>,
<br/>
&#160;&#160;<a class="el" href="a00120.html#a264674772d9f4240d89aa9d939c1eef7aae7497a49ceae69d06d6ab9fef636064">ec_bad_ver</a>,
<a class="el" href="a00120.html#a264674772d9f4240d89aa9d939c1eef7a5e694560f3ada80d2cc25881b5ae43dd">ec_no_lib</a>
<br/>
}</td></tr>
<tr class="memdesc:a264674772d9f4240d89aa9d939c1eef7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Error codes. <a href="a00120.html#a264674772d9f4240d89aa9d939c1eef7">More...</a><br/></td></tr>
<tr class="separator:a264674772d9f4240d89aa9d939c1eef7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a2f87eaf99564c705aa140f2eb8848eaa"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2f87eaf99564c705aa140f2eb8848eaa"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html#a2f87eaf99564c705aa140f2eb8848eaa">runtime_loader</a> (<a class="el" href="a00120.html#ab85c82f9c0ccd91905f2795a79ac1295">error_mode</a> mode=<a class="el" href="a00120.html#ab85c82f9c0ccd91905f2795a79ac1295ac41f8e03c7e8bfc6a420be035d59cc35">em_abort</a>)</td></tr>
<tr class="memdesc:a2f87eaf99564c705aa140f2eb8848eaa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize object but do not load TBB. <br/></td></tr>
<tr class="separator:a2f87eaf99564c705aa140f2eb8848eaa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e0932074d2f3ad04605e7e5da88c561"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html#a3e0932074d2f3ad04605e7e5da88c561">runtime_loader</a> (char const *path[], int min_ver=TBB_INTERFACE_VERSION, int max_ver=INT_MAX, <a class="el" href="a00120.html#ab85c82f9c0ccd91905f2795a79ac1295">error_mode</a> mode=<a class="el" href="a00120.html#ab85c82f9c0ccd91905f2795a79ac1295ac41f8e03c7e8bfc6a420be035d59cc35">em_abort</a>)</td></tr>
<tr class="memdesc:a3e0932074d2f3ad04605e7e5da88c561"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize object and load TBB. <a href="#a3e0932074d2f3ad04605e7e5da88c561">More...</a><br/></td></tr>
<tr class="separator:a3e0932074d2f3ad04605e7e5da88c561"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3b96f53e165e3d692c3c36292ba0737"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa3b96f53e165e3d692c3c36292ba0737"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html#aa3b96f53e165e3d692c3c36292ba0737">~runtime_loader</a> ()</td></tr>
<tr class="memdesc:aa3b96f53e165e3d692c3c36292ba0737"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy object. <br/></td></tr>
<tr class="separator:aa3b96f53e165e3d692c3c36292ba0737"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae2949e9adcac56a2cb9864437be8e22e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00120.html#a264674772d9f4240d89aa9d939c1eef7">error_code</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html#ae2949e9adcac56a2cb9864437be8e22e">load</a> (char const *path[], int min_ver=TBB_INTERFACE_VERSION, int max_ver=INT_MAX)</td></tr>
<tr class="memdesc:ae2949e9adcac56a2cb9864437be8e22e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load TBB. <a href="#ae2949e9adcac56a2cb9864437be8e22e">More...</a><br/></td></tr>
<tr class="separator:ae2949e9adcac56a2cb9864437be8e22e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a85bf9ee021a2076a3ac7cfd70aae7345"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00120.html#a264674772d9f4240d89aa9d939c1eef7">error_code</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html#a85bf9ee021a2076a3ac7cfd70aae7345">status</a> ()</td></tr>
<tr class="memdesc:a85bf9ee021a2076a3ac7cfd70aae7345"><td class="mdescLeft">&#160;</td><td class="mdescRight">Report status. <a href="#a85bf9ee021a2076a3ac7cfd70aae7345">More...</a><br/></td></tr>
<tr class="separator:a85bf9ee021a2076a3ac7cfd70aae7345"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Load TBB at runtime. </p>
<p><b>Usage:</b> </p>
<p>In source code:</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;tbb/runtime_loader.h&quot;</span></div>
<div class="line"></div>
<div class="line"><span class="keywordtype">char</span> <span class="keyword">const</span> * path[] = { <span class="stringliteral">&quot;&lt;install dir&gt;/lib/ia32&quot;</span>, NULL };</div>
<div class="line">tbb::runtime_loader loader( path );</div>
<div class="line"></div>
<div class="line"><span class="comment">// Now use TBB.</span></div>
</div><!-- fragment --><p>Link with <code>tbbproxy.lib</code> (or <code>libtbbproxy.a</code>) instead of <code>tbb.lib</code> (<code>libtbb.dylib</code>, <code>libtbb.so</code>).</p>
<p>TBB library will be loaded at runtime from <code></code> &lt;install dir&gt;=""&gt;/lib/ia32 directory.</p>
<p><b>Attention:</b> </p>
<p>All <code><a class="el" href="a00120.html" title="Load TBB at runtime. ">runtime_loader</a></code> objects (in the same module, i.e. exe or dll) share some global state. The most noticeable piece of global state is loaded TBB library. There are some implications: </p>
<pre class="fragment">- Only one TBB library can be loaded per module.
- If one object has already loaded TBB library, another object will not load TBB.
If the loaded TBB library is suitable for the second object, both will use TBB
cooperatively, otherwise the second object will report an error.
- \c runtime_loader objects will not work (correctly) in parallel due to absence of
synchronization.</pre> </div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a class="anchor" id="a264674772d9f4240d89aa9d939c1eef7"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="a00120.html#a264674772d9f4240d89aa9d939c1eef7">tbb::interface6::runtime_loader::error_code</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Error codes. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="a264674772d9f4240d89aa9d939c1eef7afc7eba28f2fc936312f041cf85276434"></a>ec_ok</em>&nbsp;</td><td class="fielddoc">
<p>No errors. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a264674772d9f4240d89aa9d939c1eef7a670e4d0a5a3c1bbcdff9e5ee16dc9c01"></a>ec_bad_call</em>&nbsp;</td><td class="fielddoc">
<p>Invalid function call (e. g. <a class="el" href="a00120.html#ae2949e9adcac56a2cb9864437be8e22e" title="Load TBB. ">load()</a> called when TBB is already loaded). </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a264674772d9f4240d89aa9d939c1eef7afd928f63eb3da0980e746d58374b07c3"></a>ec_bad_arg</em>&nbsp;</td><td class="fielddoc">
<p>Invalid argument passed. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a264674772d9f4240d89aa9d939c1eef7a71f874957c0322f499ba764dd0bb8732"></a>ec_bad_lib</em>&nbsp;</td><td class="fielddoc">
<p>Invalid library found (e. g. <code>TBB_runtime_version</code> symbol not found). </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a264674772d9f4240d89aa9d939c1eef7aae7497a49ceae69d06d6ab9fef636064"></a>ec_bad_ver</em>&nbsp;</td><td class="fielddoc">
<p>TBB found but version is not suitable. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a264674772d9f4240d89aa9d939c1eef7a5e694560f3ada80d2cc25881b5ae43dd"></a>ec_no_lib</em>&nbsp;</td><td class="fielddoc">
<p>No suitable TBB library found. </p>
</td></tr>
</table>
</div>
</div>
<a class="anchor" id="ab85c82f9c0ccd91905f2795a79ac1295"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="a00120.html#ab85c82f9c0ccd91905f2795a79ac1295">tbb::interface6::runtime_loader::error_mode</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Error mode constants. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ab85c82f9c0ccd91905f2795a79ac1295af9c9137d6acdb0fd37f1a92b5cdaeb36"></a>em_status</em>&nbsp;</td><td class="fielddoc">
<p>Save status of operation and continue. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ab85c82f9c0ccd91905f2795a79ac1295a17ec1019cffa635146eaefb042e28a2c"></a>em_throw</em>&nbsp;</td><td class="fielddoc">
<p>Throw an exception of tbb::runtime_loader::error_code type. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ab85c82f9c0ccd91905f2795a79ac1295ac41f8e03c7e8bfc6a420be035d59cc35"></a>em_abort</em>&nbsp;</td><td class="fielddoc">
<p>Print message to <code>stderr</code> and call <code>abort()</code>. </p>
</td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a3e0932074d2f3ad04605e7e5da88c561"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">tbb::interface6::runtime_loader::runtime_loader </td>
<td>(</td>
<td class="paramtype">char const *&#160;</td>
<td class="paramname"><em>path</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>min_ver</em> = <code>TBB_INTERFACE_VERSION</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>max_ver</em> = <code>INT_MAX</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00120.html#ab85c82f9c0ccd91905f2795a79ac1295">error_mode</a>&#160;</td>
<td class="paramname"><em>mode</em> = <code><a class="el" href="a00120.html#ab85c82f9c0ccd91905f2795a79ac1295ac41f8e03c7e8bfc6a420be035d59cc35">em_abort</a></code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initialize object and load TBB. </p>
<p>See <a class="el" href="a00120.html#ae2949e9adcac56a2cb9864437be8e22e" title="Load TBB. ">load()</a> for details.</p>
<p>If error mode is <code>em_status</code>, call <a class="el" href="a00120.html#a85bf9ee021a2076a3ac7cfd70aae7345" title="Report status. ">status()</a> to check whether TBB was loaded or not. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">path</td><td>List of directories to search TBB in. </td></tr>
<tr><td class="paramname">min_ver</td><td>Minimal suitable version of TBB. </td></tr>
<tr><td class="paramname">max_ver</td><td>Maximal suitable version of TBB. </td></tr>
<tr><td class="paramname">mode</td><td>Error mode for this object. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ae2949e9adcac56a2cb9864437be8e22e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00120.html#a264674772d9f4240d89aa9d939c1eef7">error_code</a> tbb::interface6::runtime_loader::load </td>
<td>(</td>
<td class="paramtype">char const *&#160;</td>
<td class="paramname"><em>path</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>min_ver</em> = <code>TBB_INTERFACE_VERSION</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>max_ver</em> = <code>INT_MAX</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Load TBB. </p>
<p>The method searches the directories specified in <code>path</code>[] array for the TBB library. When the library is found, it is loaded and its version is checked. If the version is not suitable, the library is unloaded, and the search continues.</p>
<p><b>Note:</b> </p>
<p>For security reasons, avoid using relative directory names. For example, never load TBB from current (<code>"."</code>), parent (<code>".."</code>) or any other relative directory (like <code>"lib"</code> ). Use only absolute directory names (e. g. "/usr/local/lib").</p>
<p>For the same security reasons, avoid using system default directories (<code>""</code>) on Windows. (See <a href="http://www.microsoft.com/technet/security/advisory/2269637.mspx">http://www.microsoft.com/technet/security/advisory/2269637.mspx</a> for details.)</p>
<p>Neglecting these rules may cause your program to execute 3-rd party malicious code.</p>
<p><b>Errors:</b> </p>
<ul>
<li><code>ec_bad_call</code> - TBB already loaded by this object.</li>
<li><code>ec_bad_arg</code> - <code>min_ver</code> and/or <code>max_ver</code> negative or zero, or <code>min_ver</code> &gt; <code>max_ver</code>.</li>
<li><code>ec_bad_ver</code> - TBB of unsuitable version already loaded by another object.</li>
<li><code>ec_no_lib</code> - No suitable library found. </li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">path</td><td>List of directories to search TBB in. </td></tr>
<tr><td class="paramname">min_ver</td><td>Minimal suitable version of TBB. </td></tr>
<tr><td class="paramname">max_ver</td><td>Maximal suitable version of TBB. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a85bf9ee021a2076a3ac7cfd70aae7345"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00120.html#a264674772d9f4240d89aa9d939c1eef7">error_code</a> tbb::interface6::runtime_loader::status </td>
<td>(</td>
<td class="paramname">)</td><td></td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Report status. </p>
<p>If error mode is <code>em_status</code>, the function returns status of the last operation. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>runtime_loader.h</li>
</ul>
</div><!-- contents -->
<hr>
<p></p>
Copyright &copy; 2005-2016 Intel Corporation. All Rights Reserved.
<p></p>
Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
registered trademarks or trademarks of Intel Corporation or its
subsidiaries in the United States and other countries.
<p></p>
* Other names and brands may be claimed as the property of others.