Files
GridFire/docs/html/engine__adaptive__scratchpad_8h.html

190 lines
15 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.13.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>GridFire: src/include/gridfire/engine/scratchpads/engine_adaptive_scratchpad.h File 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>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">GridFire<span id="projectnumber">&#160;v0.7.6rc4.0</span>
</div>
<div id="projectbrief">General Purpose Nuclear Network</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.13.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search',true);
$(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('engine__adaptive__scratchpad_8h.html',''); initResizable(true); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#namespaces">Namespaces</a> </div>
<div class="headertitle"><div class="title">engine_adaptive_scratchpad.h File Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Scratchpad implementation for the AdaptiveEngineView.
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="scratchpad__abstract_8h.html">gridfire/engine/scratchpads/scratchpad_abstract.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="engine_2scratchpads_2types_8h.html">gridfire/engine/scratchpads/types.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="engine__adaptive_8h.html">gridfire/engine/views/engine_adaptive.h</a>&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for engine_adaptive_scratchpad.h:</div>
<div class="dyncontent">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="engine__adaptive__scratchpad_8h__incl.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div></div>
</div>
</div><div class="textblock"><div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="engine__adaptive__scratchpad_8h__dep__incl.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div></div>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structgridfire_1_1engine_1_1scratch_1_1_adaptive_engine_view_scratch_pad.html">gridfire::engine::scratch::AdaptiveEngineViewScratchPad</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Scratchpad for storing working memory used by <a class="el" href="classgridfire_1_1engine_1_1_adaptive_engine_view.html" title="An engine view that dynamically adapts the reaction network based on runtime conditions.">AdaptiveEngineView</a> computations. <a href="structgridfire_1_1engine_1_1scratch_1_1_adaptive_engine_view_scratch_pad.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacegridfire.html">gridfire</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacegridfire_1_1engine.html">gridfire::engine</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacegridfire_1_1engine_1_1scratch.html">gridfire::engine::scratch</a></td></tr>
<tr class="memdesc:namespacegridfire_1_1engine_1_1scratch"><td class="mdescLeft">&#160;</td><td class="mdescRight">Scratchpad memory management for computational engines. <br /></td></tr>
<tr class="separator:"><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>Scratchpad implementation for the AdaptiveEngineView. </p>
<p>This header defines the AdaptiveEngineViewScratchPad, a concrete implementation of AbstractScratchPad designed for use with the AdaptiveEngineView. It provides thread-local storage for active species and reactions that are dynamically determined during adaptive network computations.</p>
<dl class="section user"><dt>Purpose</dt><dd>The AdaptiveEngineViewScratchPad stores:<ul>
<li>The set of currently active species in the adaptive network</li>
<li>The set of currently active reactions based on network topology</li>
<li>Initialization state to track whether the scratchpad is ready for use</li>
</ul>
</dd></dl>
<dl class="section user"><dt>Examples</dt><dd><div class="fragment"><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="engine__adaptive__scratchpad_8h.html">gridfire/engine/scratchpads/engine_adaptive_scratchpad.h</a>&quot;</span></div>
<div class="line"><span class="preprocessor">#include &quot;<a class="code" href="engine__adaptive_8h.html">gridfire/engine/views/engine_adaptive.h</a>&quot;</span></div>
<div class="line"> </div>
<div class="line"><span class="comment">// Create and initialize the scratchpad from an AdaptiveEngineView</span></div>
<div class="line"><a class="code hl_struct" href="structgridfire_1_1engine_1_1scratch_1_1_adaptive_engine_view_scratch_pad.html">gridfire::engine::scratch::AdaptiveEngineViewScratchPad</a> scratch;</div>
<div class="line">AdaptiveEngineView engine = create_adaptive_engine();</div>
<div class="line">scratch.<a class="code hl_function" href="structgridfire_1_1engine_1_1scratch_1_1_adaptive_engine_view_scratch_pad.html#a8fc25bac8529777504a206fc9fa2a5d6">initialize</a>(engine);</div>
<div class="line"> </div>
<div class="line"><span class="keywordflow">if</span> (scratch.<a class="code hl_function" href="structgridfire_1_1engine_1_1scratch_1_1_adaptive_engine_view_scratch_pad.html#a2ad134e1451dc0b5544f293d142c8c71">is_initialized</a>()) {</div>
<div class="line"> <span class="comment">// Access active species for computation</span></div>
<div class="line"> <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>&amp; species : scratch.<a class="code hl_variable" href="structgridfire_1_1engine_1_1scratch_1_1_adaptive_engine_view_scratch_pad.html#acedd3559de9a91a14f8ddfbf14897d9c">active_species</a>) {</div>
<div class="line"> <span class="comment">// Process each active species</span></div>
<div class="line"> }</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Clone for parallel execution</span></div>
<div class="line"><span class="keyword">auto</span> worker_scratch = scratch.<a class="code hl_function" href="structgridfire_1_1engine_1_1scratch_1_1_adaptive_engine_view_scratch_pad.html#ae2cd00926412c7ef78dbfb4647cc2495">clone</a>();</div>
<div class="ttc" id="aengine__adaptive_8h_html"><div class="ttname"><a href="engine__adaptive_8h.html">engine_adaptive.h</a></div></div>
<div class="ttc" id="aengine__adaptive__scratchpad_8h_html"><div class="ttname"><a href="engine__adaptive__scratchpad_8h.html">engine_adaptive_scratchpad.h</a></div><div class="ttdoc">Scratchpad implementation for the AdaptiveEngineView.</div></div>
<div class="ttc" id="astructgridfire_1_1engine_1_1scratch_1_1_adaptive_engine_view_scratch_pad_html"><div class="ttname"><a href="structgridfire_1_1engine_1_1scratch_1_1_adaptive_engine_view_scratch_pad.html">gridfire::engine::scratch::AdaptiveEngineViewScratchPad</a></div><div class="ttdoc">Scratchpad for storing working memory used by AdaptiveEngineView computations.</div><div class="ttdef"><b>Definition</b> engine_adaptive_scratchpad.h:66</div></div>
<div class="ttc" id="astructgridfire_1_1engine_1_1scratch_1_1_adaptive_engine_view_scratch_pad_html_a2ad134e1451dc0b5544f293d142c8c71"><div class="ttname"><a href="structgridfire_1_1engine_1_1scratch_1_1_adaptive_engine_view_scratch_pad.html#a2ad134e1451dc0b5544f293d142c8c71">gridfire::engine::scratch::AdaptiveEngineViewScratchPad::is_initialized</a></div><div class="ttdeci">bool is_initialized() const override</div><div class="ttdoc">Check whether the scratchpad has been initialized.</div><div class="ttdef"><b>Definition</b> engine_adaptive_scratchpad.h:84</div></div>
<div class="ttc" id="astructgridfire_1_1engine_1_1scratch_1_1_adaptive_engine_view_scratch_pad_html_a8fc25bac8529777504a206fc9fa2a5d6"><div class="ttname"><a href="structgridfire_1_1engine_1_1scratch_1_1_adaptive_engine_view_scratch_pad.html#a8fc25bac8529777504a206fc9fa2a5d6">gridfire::engine::scratch::AdaptiveEngineViewScratchPad::initialize</a></div><div class="ttdeci">void initialize(const AdaptiveEngineView &amp;engine)</div><div class="ttdoc">Initialize the scratchpad from an AdaptiveEngineView.</div><div class="ttdef"><b>Definition</b> engine_adaptive_scratchpad.h:102</div></div>
<div class="ttc" id="astructgridfire_1_1engine_1_1scratch_1_1_adaptive_engine_view_scratch_pad_html_acedd3559de9a91a14f8ddfbf14897d9c"><div class="ttname"><a href="structgridfire_1_1engine_1_1scratch_1_1_adaptive_engine_view_scratch_pad.html#acedd3559de9a91a14f8ddfbf14897d9c">gridfire::engine::scratch::AdaptiveEngineViewScratchPad::active_species</a></div><div class="ttdeci">std::vector&lt; fourdst::atomic::Species &gt; active_species</div><div class="ttdoc">Vector of species currently active in the adaptive network.</div><div class="ttdef"><b>Definition</b> engine_adaptive_scratchpad.h:75</div></div>
<div class="ttc" id="astructgridfire_1_1engine_1_1scratch_1_1_adaptive_engine_view_scratch_pad_html_ae2cd00926412c7ef78dbfb4647cc2495"><div class="ttname"><a href="structgridfire_1_1engine_1_1scratch_1_1_adaptive_engine_view_scratch_pad.html#ae2cd00926412c7ef78dbfb4647cc2495">gridfire::engine::scratch::AdaptiveEngineViewScratchPad::clone</a></div><div class="ttdeci">std::unique_ptr&lt; AbstractScratchPad &gt; clone() const override</div><div class="ttdoc">Create a deep copy of this scratchpad.</div><div class="ttdef"><b>Definition</b> engine_adaptive_scratchpad.h:127</div></div>
</div><!-- fragment --></dd></dl>
<dl class="section user"><dt>Thread Safety</dt><dd>This class is <b>not thread-safe</b>. Each thread should have its own instance of AdaptiveEngineViewScratchPad. Use clone() to create independent copies for parallel workers.</dd></dl>
<dl class="section see"><dt>See also</dt><dd>AbstractScratchPad </dd>
<dd>
AdaptiveEngineView </dd></dl>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_b0856f6b0d80ccb263b2f415c91f9e17.html">include</a></li><li class="navelem"><a class="el" href="dir_3626e0c0e3c5d7812d6b277dfa4ec364.html">gridfire</a></li><li class="navelem"><a class="el" href="dir_aff155d61c3b73b9ab7dcdc908c4d49e.html">engine</a></li><li class="navelem"><a class="el" href="dir_65a5f8f804465673712f6f1daa9f9ade.html">scratchpads</a></li><li class="navelem"><a class="el" href="engine__adaptive__scratchpad_8h.html">engine_adaptive_scratchpad.h</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.2 </li>
</ul>
</div>
</body>
</html>