From a7dc8f8b6b315cac63db5b4c6d383b4725ca1126 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Wed, 17 Jun 2020 19:41:14 -0500 Subject: [PATCH] use ArrayContext as a code cache in execution --- grudge/execution.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/grudge/execution.py b/grudge/execution.py index 0104584e..3d5f430d 100644 --- a/grudge/execution.py +++ b/grudge/execution.py @@ -118,7 +118,8 @@ class ExecutionMapper(mappers.Evaluator, # {{{ elementwise reductions def _map_elementwise_reduction(self, op_name, field_expr, dd): - @memoize_in(self, "elementwise_%s_prg" % op_name) + @memoize_in(self.array_context, + (ExecutionMapper, "elementwise_%s_prg" % op_name)) def prg(): return make_loopy_program( "{[iel, idof, jdof]: 0<=iel