about summary refs log tree commit diff stats
path: root/html/024compare.cc.html
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-05-25 22:27:19 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-05-25 22:27:19 -0700
commitc5ffb6e1cc9c5ff880d037c53b8ebc8562be0008 (patch)
tree2d05d987ec3c81bfbb0c1f598966d9d1b16e9b1f /html/024compare.cc.html
parentb2757892d553352feb59d70b1e7241ccdafa6905 (diff)
downloadmu-c5ffb6e1cc9c5ff880d037c53b8ebc8562be0008.tar.gz
1459
Diffstat (limited to 'html/024compare.cc.html')
-rw-r--r--html/024compare.cc.html96
1 files changed, 14 insertions, 82 deletions
diff --git a/html/024compare.cc.html b/html/024compare.cc.html
index 56449547..a5063846 100644
--- a/html/024compare.cc.html
+++ b/html/024compare.cc.html
@@ -2,7 +2,7 @@
 <html>
 <head>
 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
-<title>~/Desktop/s/mu/024compare.cc</title>
+<title>024compare.cc</title>
 <meta name="Generator" content="Vim/7.4">
 <meta name="plugin-version" content="vim7.4_v1">
 <meta name="syntax" content="cpp">
@@ -40,7 +40,7 @@ Recipe_number[<span class="Constant">&quot;equal&quot;</span>] = EQUAL<span clas
 case EQUAL: <span class="Delimiter">{</span>
   vector&lt;double&gt;&amp; exemplar = ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span>
   bool result = <span class="Constant">true</span><span class="Delimiter">;</span>
-  for <span class="Delimiter">(</span>index_t i = <span class="Constant">1</span><span class="Delimiter">;</span> i &lt; ingredients<span class="Delimiter">.</span>size<span class="Delimiter">();</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+  for <span class="Delimiter">(</span>long long int i = <span class="Constant">1</span><span class="Delimiter">;</span> i &lt; SIZE<span class="Delimiter">(</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
     if <span class="Delimiter">(</span>!equal<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>begin<span class="Delimiter">(),</span> ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>end<span class="Delimiter">(),</span> exemplar<span class="Delimiter">.</span>begin<span class="Delimiter">()))</span> <span class="Delimiter">{</span>
       result = <span class="Constant">false</span><span class="Delimiter">;</span>
       <span class="Identifier">break</span><span class="Delimiter">;</span>
@@ -57,12 +57,8 @@ recipe main [
   <span class="Constant">2</span>:number<span class="Special"> &lt;- </span>copy <span class="Constant">33</span>:literal
   <span class="Constant">3</span>:number<span class="Special"> &lt;- </span>equal <span class="Constant">1</span>:number<span class="Delimiter">,</span> <span class="Constant">2</span>:number
 ]
-<span class="traceContains">+run: instruction main/2</span>
-<span class="traceContains">+run: ingredient 0 is 1</span>
 <span class="traceContains">+mem: location 1 is 34</span>
-<span class="traceContains">+run: ingredient 1 is 2</span>
 <span class="traceContains">+mem: location 2 is 33</span>
-<span class="traceContains">+run: product 0 is 3</span>
 <span class="traceContains">+mem: storing 0 in location 3</span>
 
 <span class="Delimiter">:(scenario equal2)</span>
@@ -71,12 +67,8 @@ recipe main [
   <span class="Constant">2</span>:number<span class="Special"> &lt;- </span>copy <span class="Constant">34</span>:literal
   <span class="Constant">3</span>:number<span class="Special"> &lt;- </span>equal <span class="Constant">1</span>:number<span class="Delimiter">,</span> <span class="Constant">2</span>:number
 ]
-<span class="traceContains">+run: instruction main/2</span>
-<span class="traceContains">+run: ingredient 0 is 1</span>
 <span class="traceContains">+mem: location 1 is 34</span>
-<span class="traceContains">+run: ingredient 1 is 2</span>
 <span class="traceContains">+mem: location 2 is 34</span>
-<span class="traceContains">+run: product 0 is 3</span>
 <span class="traceContains">+mem: storing 1 in location 3</span>
 
 <span class="Delimiter">:(scenario equal_multiple)</span>
@@ -98,10 +90,10 @@ Recipe_number[<span class="Constant">&quot;greater-than&quot;</span>] = GREATER_
 <span class="Delimiter">:(before &quot;End Primitive Recipe Implementations&quot;)</span>
 case GREATER_THAN: <span class="Delimiter">{</span>
   bool result = <span class="Constant">true</span><span class="Delimiter">;</span>
-  for <span class="Delimiter">(</span>index_t i = <span class="Constant">0</span><span class="Delimiter">;</span> i &lt; ingredients<span class="Delimiter">.</span>size<span class="Delimiter">();</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
-    assert<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>size<span class="Delimiter">()</span> == <span class="Constant">1</span><span class="Delimiter">);</span>  <span class="Comment">// scalar</span>
+  for <span class="Delimiter">(</span>long long int i = <span class="Constant">0</span><span class="Delimiter">;</span> i &lt; SIZE<span class="Delimiter">(</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+    assert<span class="Delimiter">(</span>scalar<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)));</span>
   <span class="Delimiter">}</span>
-  for <span class="Delimiter">(</span>index_t i = <span class="Comment">/**/</span><span class="Constant">1</span><span class="Delimiter">;</span> i &lt; ingredients<span class="Delimiter">.</span>size<span class="Delimiter">();</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+  for <span class="Delimiter">(</span>long long int i = <span class="Comment">/**/</span><span class="Constant">1</span><span class="Delimiter">;</span> i &lt; SIZE<span class="Delimiter">(</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
     if <span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i-<span class="Constant">1</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)</span> &lt;= ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">))</span> <span class="Delimiter">{</span>
       result = <span class="Constant">false</span><span class="Delimiter">;</span>
     <span class="Delimiter">}</span>
@@ -117,12 +109,6 @@ recipe main [
   <span class="Constant">2</span>:number<span class="Special"> &lt;- </span>copy <span class="Constant">33</span>:literal
   <span class="Constant">3</span>:boolean<span class="Special"> &lt;- </span>greater-than <span class="Constant">1</span>:number<span class="Delimiter">,</span> <span class="Constant">2</span>:number
 ]
-<span class="traceContains">+run: instruction main/2</span>
-<span class="traceContains">+run: ingredient 0 is 1</span>
-<span class="traceContains">+mem: location 1 is 34</span>
-<span class="traceContains">+run: ingredient 1 is 2</span>
-<span class="traceContains">+mem: location 2 is 33</span>
-<span class="traceContains">+run: product 0 is 3</span>
 <span class="traceContains">+mem: storing 1 in location 3</span>
 
 <span class="Delimiter">:(scenario greater_than2)</span>
@@ -131,12 +117,6 @@ recipe main [
   <span class="Constant">2</span>:number<span class="Special"> &lt;- </span>copy <span class="Constant">34</span>:literal
   <span class="Constant">3</span>:boolean<span class="Special"> &lt;- </span>greater-than <span class="Constant">1</span>:number<span class="Delimiter">,</span> <span class="Constant">2</span>:number
 ]
-<span class="traceContains">+run: instruction main/2</span>
-<span class="traceContains">+run: ingredient 0 is 1</span>
-<span class="traceContains">+mem: location 1 is 34</span>
-<span class="traceContains">+run: ingredient 1 is 2</span>
-<span class="traceContains">+mem: location 2 is 34</span>
-<span class="traceContains">+run: product 0 is 3</span>
 <span class="traceContains">+mem: storing 0 in location 3</span>
 
 <span class="Delimiter">:(scenario greater_than_multiple)</span>
@@ -158,10 +138,10 @@ Recipe_number[<span class="Constant">&quot;lesser-than&quot;</span>] = LESSER_TH
 <span class="Delimiter">:(before &quot;End Primitive Recipe Implementations&quot;)</span>
 case LESSER_THAN: <span class="Delimiter">{</span>
   bool result = <span class="Constant">true</span><span class="Delimiter">;</span>
-  for <span class="Delimiter">(</span>index_t i = <span class="Constant">0</span><span class="Delimiter">;</span> i &lt; ingredients<span class="Delimiter">.</span>size<span class="Delimiter">();</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
-    assert<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>size<span class="Delimiter">()</span> == <span class="Constant">1</span><span class="Delimiter">);</span>  <span class="Comment">// scalar</span>
+  for <span class="Delimiter">(</span>long long int i = <span class="Constant">0</span><span class="Delimiter">;</span> i &lt; SIZE<span class="Delimiter">(</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+    assert<span class="Delimiter">(</span>scalar<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)));</span>
   <span class="Delimiter">}</span>
-  for <span class="Delimiter">(</span>index_t i = <span class="Comment">/**/</span><span class="Constant">1</span><span class="Delimiter">;</span> i &lt; ingredients<span class="Delimiter">.</span>size<span class="Delimiter">();</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+  for <span class="Delimiter">(</span>long long int i = <span class="Comment">/**/</span><span class="Constant">1</span><span class="Delimiter">;</span> i &lt; SIZE<span class="Delimiter">(</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
     if <span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i-<span class="Constant">1</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)</span> &gt;= ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">))</span> <span class="Delimiter">{</span>
       result = <span class="Constant">false</span><span class="Delimiter">;</span>
     <span class="Delimiter">}</span>
@@ -177,12 +157,6 @@ recipe main [
   <span class="Constant">2</span>:number<span class="Special"> &lt;- </span>copy <span class="Constant">33</span>:literal
   <span class="Constant">3</span>:boolean<span class="Special"> &lt;- </span>lesser-than <span class="Constant">1</span>:number<span class="Delimiter">,</span> <span class="Constant">2</span>:number
 ]
-<span class="traceContains">+run: instruction main/2</span>
-<span class="traceContains">+run: ingredient 0 is 1</span>
-<span class="traceContains">+mem: location 1 is 32</span>
-<span class="traceContains">+run: ingredient 1 is 2</span>
-<span class="traceContains">+mem: location 2 is 33</span>
-<span class="traceContains">+run: product 0 is 3</span>
 <span class="traceContains">+mem: storing 1 in location 3</span>
 
 <span class="Delimiter">:(scenario lesser_than2)</span>
@@ -191,12 +165,6 @@ recipe main [
   <span class="Constant">2</span>:number<span class="Special"> &lt;- </span>copy <span class="Constant">33</span>:literal
   <span class="Constant">3</span>:boolean<span class="Special"> &lt;- </span>lesser-than <span class="Constant">1</span>:number<span class="Delimiter">,</span> <span class="Constant">2</span>:number
 ]
-<span class="traceContains">+run: instruction main/2</span>
-<span class="traceContains">+run: ingredient 0 is 1</span>
-<span class="traceContains">+mem: location 1 is 34</span>
-<span class="traceContains">+run: ingredient 1 is 2</span>
-<span class="traceContains">+mem: location 2 is 33</span>
-<span class="traceContains">+run: product 0 is 3</span>
 <span class="traceContains">+mem: storing 0 in location 3</span>
 
 <span class="Delimiter">:(scenario lesser_than_multiple)</span>
@@ -218,10 +186,10 @@ Recipe_number[<span class="Constant">&quot;greater-or-equal&quot;</span>] = GREA
 <span class="Delimiter">:(before &quot;End Primitive Recipe Implementations&quot;)</span>
 case GREATER_OR_EQUAL: <span class="Delimiter">{</span>
   bool result = <span class="Constant">true</span><span class="Delimiter">;</span>
-  for <span class="Delimiter">(</span>index_t i = <span class="Constant">0</span><span class="Delimiter">;</span> i &lt; ingredients<span class="Delimiter">.</span>size<span class="Delimiter">();</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
-    assert<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>size<span class="Delimiter">()</span> == <span class="Constant">1</span><span class="Delimiter">);</span>  <span class="Comment">// scalar</span>
+  for <span class="Delimiter">(</span>long long int i = <span class="Constant">0</span><span class="Delimiter">;</span> i &lt; SIZE<span class="Delimiter">(</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+    assert<span class="Delimiter">(</span>scalar<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)));</span>
   <span class="Delimiter">}</span>
-  for <span class="Delimiter">(</span>index_t i = <span class="Comment">/**/</span><span class="Constant">1</span><span class="Delimiter">;</span> i &lt; ingredients<span class="Delimiter">.</span>size<span class="Delimiter">();</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+  for <span class="Delimiter">(</span>long long int i = <span class="Comment">/**/</span><span class="Constant">1</span><span class="Delimiter">;</span> i &lt; SIZE<span class="Delimiter">(</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
     if <span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i-<span class="Constant">1</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)</span> &lt; ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">))</span> <span class="Delimiter">{</span>
       result = <span class="Constant">false</span><span class="Delimiter">;</span>
     <span class="Delimiter">}</span>
@@ -237,12 +205,6 @@ recipe main [
   <span class="Constant">2</span>:number<span class="Special"> &lt;- </span>copy <span class="Constant">33</span>:literal
   <span class="Constant">3</span>:boolean<span class="Special"> &lt;- </span>greater-or-equal <span class="Constant">1</span>:number<span class="Delimiter">,</span> <span class="Constant">2</span>:number
 ]
-<span class="traceContains">+run: instruction main/2</span>
-<span class="traceContains">+run: ingredient 0 is 1</span>
-<span class="traceContains">+mem: location 1 is 34</span>
-<span class="traceContains">+run: ingredient 1 is 2</span>
-<span class="traceContains">+mem: location 2 is 33</span>
-<span class="traceContains">+run: product 0 is 3</span>
 <span class="traceContains">+mem: storing 1 in location 3</span>
 
 <span class="Delimiter">:(scenario greater_or_equal2)</span>
@@ -251,12 +213,6 @@ recipe main [
   <span class="Constant">2</span>:number<span class="Special"> &lt;- </span>copy <span class="Constant">34</span>:literal
   <span class="Constant">3</span>:boolean<span class="Special"> &lt;- </span>greater-or-equal <span class="Constant">1</span>:number<span class="Delimiter">,</span> <span class="Constant">2</span>:number
 ]
-<span class="traceContains">+run: instruction main/2</span>
-<span class="traceContains">+run: ingredient 0 is 1</span>
-<span class="traceContains">+mem: location 1 is 34</span>
-<span class="traceContains">+run: ingredient 1 is 2</span>
-<span class="traceContains">+mem: location 2 is 34</span>
-<span class="traceContains">+run: product 0 is 3</span>
 <span class="traceContains">+mem: storing 1 in location 3</span>
 
 <span class="Delimiter">:(scenario greater_or_equal3)</span>
@@ -265,12 +221,6 @@ recipe main [
   <span class="Constant">2</span>:number<span class="Special"> &lt;- </span>copy <span class="Constant">35</span>:literal
   <span class="Constant">3</span>:boolean<span class="Special"> &lt;- </span>greater-or-equal <span class="Constant">1</span>:number<span class="Delimiter">,</span> <span class="Constant">2</span>:number
 ]
-<span class="traceContains">+run: instruction main/2</span>
-<span class="traceContains">+run: ingredient 0 is 1</span>
-<span class="traceContains">+mem: location 1 is 34</span>
-<span class="traceContains">+run: ingredient 1 is 2</span>
-<span class="traceContains">+mem: location 2 is 35</span>
-<span class="traceContains">+run: product 0 is 3</span>
 <span class="traceContains">+mem: storing 0 in location 3</span>
 
 <span class="Delimiter">:(scenario greater_or_equal_multiple)</span>
@@ -292,10 +242,10 @@ Recipe_number[<span class="Constant">&quot;lesser-or-equal&quot;</span>] = LESSE
 <span class="Delimiter">:(before &quot;End Primitive Recipe Implementations&quot;)</span>
 case LESSER_OR_EQUAL: <span class="Delimiter">{</span>
   bool result = <span class="Constant">true</span><span class="Delimiter">;</span>
-  for <span class="Delimiter">(</span>index_t i = <span class="Constant">0</span><span class="Delimiter">;</span> i &lt; ingredients<span class="Delimiter">.</span>size<span class="Delimiter">();</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
-    assert<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>size<span class="Delimiter">()</span> == <span class="Constant">1</span><span class="Delimiter">);</span>  <span class="Comment">// scalar</span>
+  for <span class="Delimiter">(</span>long long int i = <span class="Constant">0</span><span class="Delimiter">;</span> i &lt; SIZE<span class="Delimiter">(</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+    assert<span class="Delimiter">(</span>scalar<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)));</span>
   <span class="Delimiter">}</span>
-  for <span class="Delimiter">(</span>index_t i = <span class="Comment">/**/</span><span class="Constant">1</span><span class="Delimiter">;</span> i &lt; ingredients<span class="Delimiter">.</span>size<span class="Delimiter">();</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+  for <span class="Delimiter">(</span>long long int i = <span class="Comment">/**/</span><span class="Constant">1</span><span class="Delimiter">;</span> i &lt; SIZE<span class="Delimiter">(</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
     if <span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i-<span class="Constant">1</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)</span> &gt; ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">))</span> <span class="Delimiter">{</span>
       result = <span class="Constant">false</span><span class="Delimiter">;</span>
     <span class="Delimiter">}</span>
@@ -311,12 +261,6 @@ recipe main [
   <span class="Constant">2</span>:number<span class="Special"> &lt;- </span>copy <span class="Constant">33</span>:literal
   <span class="Constant">3</span>:boolean<span class="Special"> &lt;- </span>lesser-or-equal <span class="Constant">1</span>:number<span class="Delimiter">,</span> <span class="Constant">2</span>:number
 ]
-<span class="traceContains">+run: instruction main/2</span>
-<span class="traceContains">+run: ingredient 0 is 1</span>
-<span class="traceContains">+mem: location 1 is 32</span>
-<span class="traceContains">+run: ingredient 1 is 2</span>
-<span class="traceContains">+mem: location 2 is 33</span>
-<span class="traceContains">+run: product 0 is 3</span>
 <span class="traceContains">+mem: storing 1 in location 3</span>
 
 <span class="Delimiter">:(scenario lesser_or_equal2)</span>
@@ -325,12 +269,6 @@ recipe main [
   <span class="Constant">2</span>:number<span class="Special"> &lt;- </span>copy <span class="Constant">33</span>:literal
   <span class="Constant">3</span>:boolean<span class="Special"> &lt;- </span>lesser-or-equal <span class="Constant">1</span>:number<span class="Delimiter">,</span> <span class="Constant">2</span>:number
 ]
-<span class="traceContains">+run: instruction main/2</span>
-<span class="traceContains">+run: ingredient 0 is 1</span>
-<span class="traceContains">+mem: location 1 is 33</span>
-<span class="traceContains">+run: ingredient 1 is 2</span>
-<span class="traceContains">+mem: location 2 is 33</span>
-<span class="traceContains">+run: product 0 is 3</span>
 <span class="traceContains">+mem: storing 1 in location 3</span>
 
 <span class="Delimiter">:(scenario lesser_or_equal3)</span>
@@ -339,12 +277,6 @@ recipe main [
   <span class="Constant">2</span>:number<span class="Special"> &lt;- </span>copy <span class="Constant">33</span>:literal
   <span class="Constant">3</span>:boolean<span class="Special"> &lt;- </span>lesser-or-equal <span class="Constant">1</span>:number<span class="Delimiter">,</span> <span class="Constant">2</span>:number
 ]
-<span class="traceContains">+run: instruction main/2</span>
-<span class="traceContains">+run: ingredient 0 is 1</span>
-<span class="traceContains">+mem: location 1 is 34</span>
-<span class="traceContains">+run: ingredient 1 is 2</span>
-<span class="traceContains">+mem: location 2 is 33</span>
-<span class="traceContains">+run: product 0 is 3</span>
 <span class="traceContains">+mem: storing 0 in location 3</span>
 
 <span class="Delimiter">:(scenario lesser_or_equal_multiple)</span>