From 8664b871e3dfcc1515dd4909765c3fad51a91f5f Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 18 Apr 2022 19:51:17 -0500 Subject: [PATCH] Implement _with_new_tags in DistributedSend --- pytato/distributed.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pytato/distributed.py b/pytato/distributed.py index 6c52ccf..b420207 100644 --- a/pytato/distributed.py +++ b/pytato/distributed.py @@ -152,6 +152,13 @@ class DistributedSend(Taggable): and self.comm_tag == other.comm_tag and self.tags == other.tags) + def _with_new_tags(self, tags: FrozenSet[Tag]) -> DistributedSend: + return DistributedSend( + data=self.data, + dest_rank=self.dest_rank, + comm_tag=self.comm_tag, + tags=tags) + def copy(self, **kwargs: Any) -> DistributedSend: data: Optional[Array] = kwargs.get("data") dest_rank: Optional[int] = kwargs.get("dest_rank") -- GitLab