MCPcopy Create free account
hub / github.com/BirolLab/abyss / parseControlMessage

Method parseControlMessage

Parallel/NetworkSequenceCollection.cpp:784–824  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

782}
783
784void NetworkSequenceCollection::parseControlMessage(int source)
785{
786 ControlMessage controlMsg = m_comm.receiveControlMessage();
787 switch(controlMsg.msgType)
788 {
789 case APC_SET_STATE:
790 SetState(NetworkAssemblyState(controlMsg.argument));
791 break;
792 case APC_CHECKPOINT:
793 logger(4) << "checkpoint from " << source << ": "
794 << controlMsg.argument << '\n';
795 m_numReachedCheckpoint++;
796 m_checkpointSum += controlMsg.argument;
797 break;
798 case APC_WAIT:
799 SetState(NAS_WAITING);
800 m_comm.barrier();
801 break;
802 case APC_BARRIER:
803 assert(m_state == NAS_WAITING);
804 m_comm.barrier();
805 break;
806 case APC_TRIM:
807 m_trimStep = controlMsg.argument;
808 SetState(NAS_TRIM);
809 break;
810 case APC_ERODE_COMPLETE:
811 assert(m_state == NAS_ERODE_WAITING);
812 m_comm.flush();
813 SetState(NAS_ERODE_COMPLETE);
814 break;
815 case APC_POPBUBBLE:
816 m_numPopped = controlMsg.argument;
817 SetState(NAS_POPBUBBLE);
818 break;
819 case APC_ASSEMBLE:
820 m_numAssembled = controlMsg.argument;
821 SetState(NAS_ASSEMBLE);
822 break;
823 }
824}
825
826void NetworkSequenceCollection::handle(
827 int senderID, const SeqDataRequest& message)

Callers

nothing calls this directly

Calls 4

receiveControlMessageMethod · 0.80
barrierMethod · 0.80
flushMethod · 0.80

Tested by

no test coverage detected