about summary refs log tree commit diff stats
path: root/html/074deep_copy.cc.html
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-08-17 19:04:35 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-08-17 19:04:35 -0700
commitd990e8f07aee36f68bcd270889d20c2d22b9aa0b (patch)
tree07a624ea81f2974e1bb038462f4d0607237ea431 /html/074deep_copy.cc.html
parentcb159b8c8a888f089676a63273b76b641e860d88 (diff)
downloadmu-d990e8f07aee36f68bcd270889d20c2d22b9aa0b.tar.gz
3219
Trying keeping html in the master branch:
  https://github.com/blog/2228-simpler-github-pages-publishing

Let's see if https://akkartik.github.io/mu updates after I push this
commit to just the master branch.
Diffstat (limited to 'html/074deep_copy.cc.html')
-rw-r--r--html/074deep_copy.cc.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/html/074deep_copy.cc.html b/html/074deep_copy.cc.html
index 1a352a85..4a520023 100644
--- a/html/074deep_copy.cc.html
+++ b/html/074deep_copy.cc.html
@@ -248,7 +248,7 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span
   <span class="Comment">// allocate a tiny bit of temporary space for deep_copy()</span>
   trace<span class="Delimiter">(</span><span class="Constant">9991</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;deep-copy: allocating space for temporary&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
   reagent tmp<span class="Delimiter">(</span><span class="Constant">&quot;tmp:address:number&quot;</span><span class="Delimiter">);</span>
-  tmp<span class="Delimiter">.</span>value = allocate<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span>
+  tmp<span class="Delimiter">.</span>set_value<span class="Delimiter">(</span>allocate<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">));</span>
   products<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>deep_copy<span class="Delimiter">(</span>input<span class="Delimiter">,</span> tmp<span class="Delimiter">));</span>
   <span class="Comment">// reclaim Mu memory allocated for tmp</span>
   trace<span class="Delimiter">(</span><span class="Constant">9991</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;deep-copy: reclaiming temporary&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
@@ -295,10 +295,10 @@ vector&lt;<span class="Normal">double</span>&gt; deep_copy<span class="Delimiter
   <span class="Comment">// a temporary location to help copy the payload.</span>
   trace<span class="Delimiter">(</span><span class="Constant">9991</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;deep-copy: writing temporary &quot;</span> &lt;&lt; tmp<span class="Delimiter">.</span>value &lt;&lt; <span class="Constant">&quot;: &quot;</span> &lt;&lt; out &lt;&lt; end<span class="Delimiter">();</span>
   put<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> tmp<span class="Delimiter">.</span>value<span class="Delimiter">,</span> out<span class="Delimiter">);</span>
-  payload<span class="Delimiter">.</span>value = tmp<span class="Delimiter">.</span>value<span class="Delimiter">;</span>  <span class="Comment">// now modified for output</span>
+  payload<span class="Delimiter">.</span>set_value<span class="Delimiter">(</span>tmp<span class="Delimiter">.</span>value<span class="Delimiter">);</span>  <span class="Comment">// now modified for output</span>
   vector&lt;<span class="Normal">double</span>&gt; old_data = read_memory<span class="Delimiter">(</span>payload<span class="Delimiter">);</span>
   trace<span class="Delimiter">(</span><span class="Constant">9991</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;deep-copy: really writing to &quot;</span> &lt;&lt; payload<span class="Delimiter">.</span>value &lt;&lt; <span class="Constant">' '</span> &lt;&lt; to_string<span class="Delimiter">(</span>payload<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot; (old value &quot;</span> &lt;&lt; to_string<span class="Delimiter">(</span>old_data<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot; new value &quot;</span> &lt;&lt; to_string<span class="Delimiter">(</span>data<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;)&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
-  write_memory<span class="Delimiter">(</span>payload<span class="Delimiter">,</span> data<span class="Delimiter">,</span> -<span class="Constant">1</span><span class="Delimiter">);</span>
+  write_memory<span class="Delimiter">(</span>payload<span class="Delimiter">,</span> data<span class="Delimiter">);</span>
   trace<span class="Delimiter">(</span><span class="Constant">9991</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;deep-copy: output is &quot;</span> &lt;&lt; to_string<span class="Delimiter">(</span>data<span class="Delimiter">)</span> &lt;&lt; end<span class="Delimiter">();</span>
   <span class="Identifier">return</span> out<span class="Delimiter">;</span>
 <span class="Delimiter">}</span>