Skip to content
Snippets Groups Projects
Commit 0fb2f672 authored by Jammer, Tim's avatar Jammer, Tim
Browse files

efficiency of filtering

parent aaba72de
Branches
No related tags found
No related merge requests found
......@@ -145,23 +145,22 @@ class InvalidComErrorColl(ErrorGenerator):
def generate(self, generate_level, real_world_score_table):
types = predefined_types + user_defined_types
combinations_to_use = []
for f in self.functions_to_use:
for t1 in predefined_types + user_defined_types:
for t2 in predefined_types + user_defined_types:
for comm in predefined_comms + comm_creators + intercomms:
for i, t1 in enumerate(types):
if generate_level == REAL_WORLD_TEST_LEVEL and not is_combination_important(real_world_score_table,
f, datatype=t1.lower(),
communicator=comm):
continue
for t2 in types[i:]:
if generate_level == REAL_WORLD_TEST_LEVEL and not is_combination_important(
real_world_score_table, f, datatype=t2.lower(), communicator=comm):
continue
if is_combination_compatible(t1, t2, f):
combinations_to_use.append((t1, t2, f, comm))
if generate_level == REAL_WORLD_TEST_LEVEL:
combinations_to_use = [(t1, t2, f, comm) for (t1, t2, f, comm) in combinations_to_use if
is_combination_important(real_world_score_table,
f, datatype=t1.lower(),
communicator=comm) and
is_combination_important(real_world_score_table,
f, datatype=t2.lower(),
communicator=comm)]
if generate_level == SUFFICIENT_TEST_LEVEL:
types_checked = set()
combinations_to_use_filtered = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment