viff

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 diff
     1.1 --- a/apps/benchmark.py	Fri Oct 30 12:23:46 2009 +0100
     1.2 +++ b/apps/benchmark.py	Mon Nov 02 13:45:36 2009 +0100
     1.3 @@ -87,8 +87,10 @@
     1.4  last_timestamp = time.time()
     1.5  
     1.6  operations = {"mul"       : ("mul", [], BinaryOperation),
     1.7 -              "compToft05": ("ge", [ComparisonToft05Mixin], BinaryOperation),
     1.8 -              "compToft07": ("ge", [ComparisonToft07Mixin], BinaryOperation),
     1.9 +              "compToft05": ("greater_than_equal",
    1.10 +                             [ComparisonToft05Mixin], BinaryOperation),
    1.11 +              "compToft07": ("greater_than_equal",
    1.12 +                             [ComparisonToft07Mixin], BinaryOperation),
    1.13                "eq"        : ("eq", [ProbabilisticEqualityMixin], BinaryOperation),
    1.14                "triple_gen": ("triple_gen", [], NullaryOperation)}
    1.15  
     2.1 --- a/apps/benchutil.py	Fri Oct 30 12:23:46 2009 +0100
     2.2 +++ b/apps/benchutil.py	Mon Nov 02 13:45:36 2009 +0100
     2.3 @@ -80,11 +80,11 @@
     2.4          self.rt.schedule_callback(d, self.finished, termination_function)
     2.5          return d
     2.6  
     2.7 -    def sync_test(self, x):
     2.8 +    def sync_test(self, preprocessed_data):
     2.9          print "Synchronizing test start."
    2.10          sys.stdout.flush()
    2.11          sync = self.rt.synchronize()
    2.12 -        self.rt.schedule_callback(sync, lambda y: x)
    2.13 +        self.rt.schedule_callback(sync, lambda _: preprocessed_data)
    2.14          return sync
    2.15  
    2.16      def run_test(self, _):
     3.1 --- a/viff/runtime.py	Fri Oct 30 12:23:46 2009 +0100
     3.2 +++ b/viff/runtime.py	Mon Nov 02 13:45:36 2009 +0100
     3.3 @@ -940,9 +940,11 @@
     3.4      if mixins is None:
     3.5          return runtime_class
     3.6      else:
     3.7 -        # We must include at least one new-style class in bases. We
     3.8 -        # include it last to avoid overriding __init__ from the other
     3.9 -        # base classes.
    3.10 +        # The order is important: we want the most specific classes to
    3.11 +        # go first so that they can override methods from later
    3.12 +        # classes. We must also include at least one new-style class
    3.13 +        # in bases -- we include it last to avoid overriding __init__
    3.14 +        # from the other base classes.
    3.15          bases = tuple(mixins) + (runtime_class, object)
    3.16          return type("ExtendedRuntime", bases, {})
    3.17