diff --git a/sumpy/codegen.py b/sumpy/codegen.py index 905f99e0ef39cea24a27f7d9317f7a608a8f94f8..a232bf58f5831c5a57e961c46dec5803292eff42 100644 --- a/sumpy/codegen.py +++ b/sumpy/codegen.py @@ -437,7 +437,7 @@ def to_loopy_insns(assignments, vector_names=set(), pymbolic_expr_maps=[], import loopy as lp result = [ - lp.Instruction(id=None, + lp.ExpressionInstruction(id=None, assignee=name, expression=convert_expr(name, expr), temp_var_type=lp.auto) for name, expr in assignments] diff --git a/sumpy/p2p.py b/sumpy/p2p.py index ac0f2831212cb0c81f810276b01aea42293491c7..e9433255d7ea1fa4651791a1c280fb1c78c7ac0b 100644 --- a/sumpy/p2p.py +++ b/sumpy/p2p.py @@ -115,7 +115,7 @@ class P2P(KernelComputation): + [ "<> d[idim] = tgt[idim,itgt] - src[idim,isrc] {id=compute_d}", ]+[ - lp.Instruction(id=None, + lp.ExpressionInstruction(id=None, assignee="pair_result_%d" % i, expression=expr, temp_var_type=lp.auto) for i, (expr, dtype) in enumerate(zip(exprs, self.value_dtypes)) diff --git a/sumpy/qbx.py b/sumpy/qbx.py index 3d13ba670886788f45dd4b80d63f093ffc3f3b4d..4cfd3406ac024b411160661f250ad3c8cb7b233a 100644 --- a/sumpy/qbx.py +++ b/sumpy/qbx.py @@ -138,7 +138,7 @@ class LayerPotentialBase(KernelComputation): "<> a[idim] = center[idim,itgt] - src[idim,isrc] {id=compute_a}", "<> b[idim] = tgt[idim,itgt] - center[idim,itgt] {id=compute_b}", ]+self.get_kernel_scaling_assignments()+loopy_insns+[ - lp.Instruction(id=None, + lp.ExpressionInstruction(id=None, assignee="pair_result_%d" % i, expression=expr, temp_var_type=lp.auto) for i, (expr, dtype) in enumerate(zip(exprs, self.value_dtypes)) diff --git a/sumpy/tools.py b/sumpy/tools.py index 140108e53cffb63f72ef753b8d645e9f29fab168..074f2c47ee75e41e840a32f88ca133e46db5fa9b 100644 --- a/sumpy/tools.py +++ b/sumpy/tools.py @@ -182,7 +182,7 @@ class KernelComputation: import loopy as lp return [ - lp.Instruction(id=None, + lp.ExpressionInstruction(id=None, assignee="knl_%d_scaling" % i, expression=ComplexConstantSizer(dtype)( sympy_conv(kernel.get_scaling())),