You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h4><ahref="https://julialang.zulipchat.com#narrow/stream/274208-helpdesk%20%28published%29/topic/%22Broadcast%20foreach%22%3F/near/262235042" class="zl"><imgsrc="https://juliacommunity.github.io/zulip-archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Philipp Gabler <ahref="https://juliacommunity.github.io/zulip-archive/stream/274208-helpdesk-.28published.29/topic/.22Broadcast.20foreach.22.3F.html#262235042">(Nov 21 2021 at 11:06)</a>:</h4>
14
+
<p>Is there an established pattern to "broadcast" a function, but without allocation of output? Just for the sake of side-effects. I.e., <code>map</code> is to <code>broadcast</code> as <code>foreach</code> is to what?</p>
<p>but not knowing as much about broadcasting machinery as I'd like to, there might be something existing I am overlooking.</p>
44
+
45
+
46
+
47
+
<aname="262254718"></a>
48
+
<h4><ahref="https://julialang.zulipchat.com#narrow/stream/274208-helpdesk%20%28published%29/topic/%22Broadcast%20foreach%22%3F/near/262254718" class="zl"><imgsrc="https://juliacommunity.github.io/zulip-archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mason Protter <ahref="https://juliacommunity.github.io/zulip-archive/stream/274208-helpdesk-.28published.29/topic/.22Broadcast.20foreach.22.3F.html#262254718">(Nov 21 2021 at 18:57)</a>:</h4>
49
+
<p>One approach you could take is making a struct <code>Null</code> such that writing data to it just throws away the data. Then you could do something like<br>
50
+
<code>Null() .= f.(x)</code> and broadcast Fusion should take care of everything.</p>
51
+
52
+
53
+
54
+
<aname="262319796"></a>
55
+
<h4><ahref="https://julialang.zulipchat.com#narrow/stream/274208-helpdesk%20%28published%29/topic/%22Broadcast%20foreach%22%3F/near/262319796" class="zl"><imgsrc="https://juliacommunity.github.io/zulip-archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Philipp Gabler <ahref="https://juliacommunity.github.io/zulip-archive/stream/274208-helpdesk-.28published.29/topic/.22Broadcast.20foreach.22.3F.html#262319796">(Nov 22 2021 at 13:44)</a>:</h4>
56
+
<p>I was thinking about that, too, but didn't know how to proceed. Some issues with broadcast style (I guess?):</p>
<h4><ahref="https://julialang.zulipchat.com#narrow/stream/274208-helpdesk%20%28published%29/topic/%22Broadcast%20foreach%22%3F/near/262359734" class="zl"><imgsrc="https://juliacommunity.github.io/zulip-archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Michael Abbott <ahref="https://juliacommunity.github.io/zulip-archive/stream/274208-helpdesk-.28published.29/topic/.22Broadcast.20foreach.22.3F.html#262359734">(Nov 22 2021 at 18:35)</a>:</h4>
<h4><ahref="https://julialang.zulipchat.com#narrow/stream/274208-helpdesk%20%28published%29/topic/%22Broadcast%20foreach%22%3F/near/262360772" class="zl"><imgsrc="https://juliacommunity.github.io/zulip-archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Michael Abbott <ahref="https://juliacommunity.github.io/zulip-archive/stream/274208-helpdesk-.28published.29/topic/.22Broadcast.20foreach.22.3F.html#262360772">(Nov 22 2021 at 18:44)</a>:</h4>
84
+
<p>It is not quite as efficient as ordinary broadcasting. IIRC there were some such issues with <code>sum(::Broadcasted)</code>:</p>
<h4><ahref="https://julialang.zulipchat.com#narrow/stream/274208-helpdesk%20%28published%29/topic/%22Broadcast%20foreach%22%3F/near/262499866" class="zl"><imgsrc="https://juliacommunity.github.io/zulip-archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mason Protter <ahref="https://juliacommunity.github.io/zulip-archive/stream/274208-helpdesk-.28published.29/topic/.22Broadcast.20foreach.22.3F.html#262499866">(Nov 23 2021 at 19:08)</a>:</h4>
98
+
<p>Hm. I would have thought that <code>Broadcast.instantiate(bc)</code> would have fixed it but it didn't</p>
0 commit comments