Skip to content

Commit 4c1f0ef

Browse files
committed
fix porting
1 parent d4aaa1a commit 4c1f0ef

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

pytential/unregularized.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
from meshmode.dof_array import DOFArray
3434
from pytools import memoize_method
3535

36-
from pytential.array_context import PyOpenCLArrayContext
36+
from pytential.array_context import PyOpenCLArrayContext, dataclass_array_container
3737
from pytential.source import LayerPotentialSourceBase
3838

3939
logger = logging.getLogger(__name__)
@@ -322,7 +322,7 @@ def copy_targets_kernel(self):
322322
knl = lp.tag_array_axes(knl, "targets", "stride:auto, stride:1")
323323
knl = lp.tag_inames(knl, {"dim": "ilp"})
324324

325-
return knl.executor(self.cl_context)
325+
return knl.executor(self.array_context.context)
326326

327327
@property
328328
@memoize_method
@@ -337,6 +337,7 @@ def build_traversal(self):
337337
return FMMTraversalBuilder(self.array_context)
338338

339339

340+
@dataclass_array_container
340341
@dataclass(frozen=True)
341342
class _TargetInfo:
342343
"""

test/test_cost_model.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -383,21 +383,21 @@ def test_cost_model(actx_factory, dim, use_target_specific_qbx, per_box):
383383
op_S = bind(places, sym_op_S)
384384

385385
if per_box:
386-
cost_S, _ = op_S.cost_per_box("constant_one", sigma=sigma)
386+
_cost_S, _ = op_S.cost_per_box("constant_one", sigma=sigma)
387387
else:
388-
cost_S, _ = op_S.cost_per_stage("constant_one", sigma=sigma)
388+
_cost_S, _ = op_S.cost_per_stage("constant_one", sigma=sigma)
389389

390390
sym_op_S_plus_D = (
391391
sym.S(k_sym, sigma_sym, qbx_forced_limit=+1)
392392
+ sym.D(k_sym, sigma_sym, qbx_forced_limit="avg"))
393393
op_S_plus_D = bind(places, sym_op_S_plus_D)
394394

395395
if per_box:
396-
cost_S_plus_D, _ = op_S_plus_D.cost_per_box(
396+
_cost_S_plus_D, _ = op_S_plus_D.cost_per_box(
397397
"constant_one", sigma=sigma
398398
)
399399
else:
400-
cost_S_plus_D, _ = op_S_plus_D.cost_per_stage(
400+
_cost_S_plus_D, _ = op_S_plus_D.cost_per_stage(
401401
"constant_one", sigma=sigma
402402
)
403403

0 commit comments

Comments
 (0)