Skip to content

Commit

Permalink
Merge pull request #5 from firedrakeproject/fix-literals
Browse files Browse the repository at this point in the history
Symbolic: Fix handling of Literals.
  • Loading branch information
kaushikcfd authored Jul 14, 2020
2 parents cf0a082 + 1e2f80a commit 83c0ce0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions loopy/symbolic.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,9 @@ def map_type_cast(self, expr, *args, **kwargs):
def map_resolved_function(self, expr):
return self.rec(expr.function)

def map_literal(self, expr):
return set()


class SubstitutionRuleExpander(IdentityMapper):
def __init__(self, rules):
Expand Down Expand Up @@ -1644,6 +1647,10 @@ def map_remainder(self, expr):

return num.mod_val(denom)

def map_literal(self, expr):
raise TypeError("literal '%s' not supported "
"for as-pwaff evaluation" % expr)


def aff_from_expr(space, expr, vars_to_zero=None):
if vars_to_zero is None:
Expand Down

0 comments on commit 83c0ce0

Please sign in to comment.