Skip to content
Snippets Groups Projects
Commit 427e5344 authored by Richard Angersbach's avatar Richard Angersbach
Browse files

Remove more parts of reduction_assignment_from_str

parent f7142b16
No related branches found
No related tags found
1 merge request!438Reduction Support
......@@ -66,17 +66,8 @@ _reduction_assignment_classes = {
]
}
# Mapping from ReductionOp str to ReductionAssigment classes
_reduction_assignment_classes_for_str = {
cls.value: cls for cls in _reduction_assignment_classes
}
def reduction_assignment(lhs, op: ReductionOp, rhs):
if op not in _reduction_assignment_classes:
raise ValueError("Unrecognized operator %s" % op)
return _reduction_assignment_classes[op](lhs, rhs)
def reduction_assignment_from_str(lhs, op: str, rhs):
return reduction_assignment(lhs, _reduction_assignment_classes_for_str[op], rhs)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment