MCPcopy Create free account
hub / github.com/devosoft/avida / BroadcastX

Method BroadcastX

avida-core/source/cpu/cHardwareCPU.cc:9838–9847  ·  view source on GitHub ↗

! A generic broadcast method, to simplify the development of different range broadcasts. */

Source from the content-addressed store, hash-verified

9836 broadcasts.
9837 */
9838bool cHardwareCPU::BroadcastX(cAvidaContext& ctx, int depth)
9839{
9840 const int label_reg = FindModifiedRegister(REG_BX);
9841 const int data_reg = FindNextRegister(label_reg);
9842
9843 cOrgMessage msg = cOrgMessage(m_organism);
9844 msg.SetLabel(GetRegister(label_reg));
9845 msg.SetData(GetRegister(data_reg));
9846 return m_organism->BroadcastMessage(ctx, msg, depth);
9847}
9848
9849
9850/*! A single-hop broadcast instruction - send a message to all 1-hop neighbors

Callers

nothing calls this directly

Calls 4

SetLabelMethod · 0.80
SetDataMethod · 0.80
cOrgMessageClass · 0.50
BroadcastMessageMethod · 0.45

Tested by

no test coverage detected