Skip to content

Commit 4a124e6

Browse files
committed
Drop unused ASTSubscriptCollector
1 parent b662a01 commit 4a124e6

1 file changed

Lines changed: 0 additions & 22 deletions

File tree

loopy/target/c/__init__.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -375,26 +375,6 @@ def map_function_decl_wrapper(self, node, *args, **kwargs):
375375
return FunctionDeclarationWrapper(
376376
self.rec(node.subdecl, *args, **kwargs))
377377

378-
379-
class SubscriptSubsetCounter(IdentityMapper):
380-
def __init__(self, subset_counters):
381-
self.subset_counters = subset_counters
382-
383-
384-
class ASTSubscriptCollector(CASTIdentityMapper):
385-
def __init__(self):
386-
self.subset_counters = {}
387-
388-
def map_expression(self, expr):
389-
from pymbolic.primitives import is_constant
390-
if isinstance(expr, CExpression) or is_constant(expr):
391-
return expr
392-
elif isinstance(expr, str):
393-
return expr
394-
else:
395-
raise LoopyError(
396-
"Unexpected expression type: %s" % type(expr).__name__)
397-
398378
# }}}
399379

400380

@@ -1284,8 +1264,6 @@ def emit_if(self, condition_str, ast):
12841264
# }}}
12851265

12861266
def process_ast(self, node):
1287-
sc = ASTSubscriptCollector()
1288-
sc(node)
12891267
return node
12901268

12911269

0 commit comments

Comments
 (0)