diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-11-29 14:18:52 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-11-29 14:18:52 -0800 |
commit | db1f56c8449d2ea3d158753fe37bac5a750a2566 (patch) | |
tree | 508a24c522c040498dbe7d60036035f3c4ae440a /html/020run.cc.html | |
parent | 3670fb87f6d38c9ba4fcbb1eaa6439b4007a194e (diff) | |
download | mu-db1f56c8449d2ea3d158753fe37bac5a750a2566.tar.gz |
2611
Diffstat (limited to 'html/020run.cc.html')
-rw-r--r-- | html/020run.cc.html | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/html/020run.cc.html b/html/020run.cc.html index 38ffeb73..e5ee3061 100644 --- a/html/020run.cc.html +++ b/html/020run.cc.html @@ -104,9 +104,7 @@ void run_current_routine<span class="Delimiter">()</span> raise_error << <span class="Constant">"something wrote to location 0; this should never happen</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> put<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> <span class="Constant">0</span><span class="Delimiter">,</span> <span class="Constant">0</span><span class="Delimiter">);</span> <span class="Delimiter">}</span> - <span class="Comment">// Read all ingredients from memory.</span> - <span class="Comment">// Each ingredient loads a vector of values rather than a single value; mu</span> - <span class="Comment">// permits operating on reagents spanning multiple locations.</span> + <span class="Comment">// read all ingredients from memory, each potentially spanning multiple locations</span> vector<vector<double> > ingredients<span class="Delimiter">;</span> if <span class="Delimiter">(</span>should_copy_ingredients<span class="Delimiter">())</span> <span class="Delimiter">{</span> for <span class="Delimiter">(</span>long long int i = <span class="Constant">0</span><span class="Delimiter">;</span> i < SIZE<span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> @@ -115,7 +113,7 @@ void run_current_routine<span class="Delimiter">()</span> <span class="CommentedCode">//? Locations_read_by_instruction[current_instruction().name] += SIZE(ingredients.back());</span> <span class="Delimiter">}</span> <span class="Delimiter">}</span> - <span class="Comment">// Instructions below will write to 'products'.</span> + <span class="Comment">// instructions below will write to 'products'</span> vector<vector<double> > products<span class="Delimiter">;</span> switch <span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>operation<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span class="Comment">// Primitive Recipe Implementations</span> @@ -191,14 +189,14 @@ if <span class="Delimiter">(</span>argc > <span class="Constant">1</span><spa <span class="Delimiter">}</span> transform_all<span class="Delimiter">();</span> <span class="CommentedCode">//? dump_recipe("handle-keyboard-event"), exit(0);</span> - if <span class="Delimiter">(</span>Run_tests<span class="Delimiter">)</span> Recipe<span class="Delimiter">.</span>erase<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> string<span class="Delimiter">(</span><span class="Constant">"main"</span><span class="Delimiter">)));</span> + if <span class="Delimiter">(</span>Run_tests<span class="Delimiter">)</span> Recipe<span class="Delimiter">.</span>erase<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">"main"</span><span class="Delimiter">));</span> <span class="Comment">// End Loading .mu Files</span> <span class="Delimiter">}</span> <span class="Comment">//: Step 3: if we aren't running tests, locate a recipe called 'main' and</span> <span class="Comment">//: start running it.</span> <span class="Delimiter">:(before "End Main")</span> -if <span class="Delimiter">(</span>!Run_tests && contains_key<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> string<span class="Delimiter">(</span><span class="Constant">"main"</span><span class="Delimiter">))</span> && contains_key<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> get<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> string<span class="Delimiter">(</span><span class="Constant">"main"</span><span class="Delimiter">))))</span> <span class="Delimiter">{</span> +if <span class="Delimiter">(</span>!Run_tests && contains_key<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">"main"</span><span class="Delimiter">)</span> && contains_key<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> get<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">"main"</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> setup<span class="Delimiter">();</span> <span class="CommentedCode">//? Trace_file = "interactive";</span> <span class="CommentedCode">//? START_TRACING_UNTIL_END_OF_SCOPE;</span> @@ -209,7 +207,7 @@ if <span class="Delimiter">(</span>!Run_tests && contains_key<span class <span class="Delimiter">:(code)</span> void run_main<span class="Delimiter">(</span>int argc<span class="Delimiter">,</span> char* argv[]<span class="Delimiter">)</span> <span class="Delimiter">{</span> - recipe_ordinal r = get<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> string<span class="Delimiter">(</span><span class="Constant">"main"</span><span class="Delimiter">));</span> + recipe_ordinal r = get<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">"main"</span><span class="Delimiter">);</span> if <span class="Delimiter">(</span>r<span class="Delimiter">)</span> run<span class="Delimiter">(</span>r<span class="Delimiter">);</span> <span class="Delimiter">}</span> |