Skip to content
Snippets Groups Projects
Commit 9ecd2191 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

Make order of assembly methods deterministic

parent b01eda93
No related branches found
No related tags found
No related merge requests found
...@@ -625,6 +625,8 @@ class TimerMethod(ClassMember): ...@@ -625,6 +625,8 @@ class TimerMethod(ClassMember):
class LoopyKernelMethod(ClassMember): class LoopyKernelMethod(ClassMember):
def __init__(self, signature, kernel, add_timings=True, initializer_list=[]): def __init__(self, signature, kernel, add_timings=True, initializer_list=[]):
self.name = kernel.name
from loopy import generate_body from loopy import generate_body
from cgen import LiteralLines, Block from cgen import LiteralLines, Block
content = signature content = signature
...@@ -671,6 +673,10 @@ class LoopyKernelMethod(ClassMember): ...@@ -671,6 +673,10 @@ class LoopyKernelMethod(ClassMember):
def cgen_class_from_cache(tag, members=[]): def cgen_class_from_cache(tag, members=[]):
from dune.perftool.generation import retrieve_cache_items from dune.perftool.generation import retrieve_cache_items
# Sort the given member functions by their name to help debugging by fixing
# the order
members = sorted(members, key=lambda m: m.name)
# Generate the name by concatenating basename and template parameters # Generate the name by concatenating basename and template parameters
basename, fullname = class_type_from_cache(tag) basename, fullname = class_type_from_cache(tag)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment