changeset 1378:57b5234df725

Merged.
author Martin Geisler <mg@cs.au.dk>
date Mon, 02 Nov 2009 13:45:36 +0100
parents 8144c02c12f6 73a79bf6c5d0
children a084a491dff7
files viff/runtime.py
diffstat 3 files changed, 11 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/apps/benchmark.py	Fri Oct 30 12:23:46 2009 +0100
+++ b/apps/benchmark.py	Mon Nov 02 13:45:36 2009 +0100
@@ -87,8 +87,10 @@
 last_timestamp = time.time()
 
 operations = {"mul"       : ("mul", [], BinaryOperation),
-              "compToft05": ("ge", [ComparisonToft05Mixin], BinaryOperation),
-              "compToft07": ("ge", [ComparisonToft07Mixin], BinaryOperation),
+              "compToft05": ("greater_than_equal",
+                             [ComparisonToft05Mixin], BinaryOperation),
+              "compToft07": ("greater_than_equal",
+                             [ComparisonToft07Mixin], BinaryOperation),
               "eq"        : ("eq", [ProbabilisticEqualityMixin], BinaryOperation),
               "triple_gen": ("triple_gen", [], NullaryOperation)}
 
--- a/apps/benchutil.py	Fri Oct 30 12:23:46 2009 +0100
+++ b/apps/benchutil.py	Mon Nov 02 13:45:36 2009 +0100
@@ -80,11 +80,11 @@
         self.rt.schedule_callback(d, self.finished, termination_function)
         return d
 
-    def sync_test(self, x):
+    def sync_test(self, preprocessed_data):
         print "Synchronizing test start."
         sys.stdout.flush()
         sync = self.rt.synchronize()
-        self.rt.schedule_callback(sync, lambda y: x)
+        self.rt.schedule_callback(sync, lambda _: preprocessed_data)
         return sync
 
     def run_test(self, _):
--- a/viff/runtime.py	Fri Oct 30 12:23:46 2009 +0100
+++ b/viff/runtime.py	Mon Nov 02 13:45:36 2009 +0100
@@ -940,9 +940,11 @@
     if mixins is None:
         return runtime_class
     else:
-        # We must include at least one new-style class in bases. We
-        # include it last to avoid overriding __init__ from the other
-        # base classes.
+        # The order is important: we want the most specific classes to
+        # go first so that they can override methods from later
+        # classes. We must also include at least one new-style class
+        # in bases -- we include it last to avoid overriding __init__
+        # from the other base classes.
         bases = tuple(mixins) + (runtime_class, object)
         return type("ExtendedRuntime", bases, {})