Changeset - fb30764be5c3
[Not reviewed]
0 2 0
MH - 3 years ago 2022-03-04 19:06:46
contact@maxhenger.nl
Fix matched channel counting bug
2 files changed with 9 insertions and 7 deletions:
0 comments (0 inline, 0 general)
src/runtime2/component/consensus.rs
Show inline comments
 
@@ -79,7 +79,6 @@ impl SolutionCombiner {
 
            let channel_index = if entry.getter.is_some() && entry.putter.is_some() {
 
                let channel_index = self.solution.channel_mapping.len();
 
                self.solution.channel_mapping.push(entry);
 
                self.matched_channels += 1;
 

	
 
                channel_index
 
            } else if let Some(putter) = entry.putter {
 
@@ -423,7 +422,7 @@ impl Consensus {
 
                    }
 
                },
 
                PortAnnotationKind::Getter(peer_port) => {
 
                    if peer_port.peer_comp_id != comp_ctx.id {
 
                    if peer_port.peer_comp_id == comp_ctx.id {
 
                        // Peer indicates that we talked to it
 
                        let self_port_handle = comp_ctx.get_port_handle(peer_port.peer_port_id);
 
                        let self_port_index = comp_ctx.get_port_index(self_port_handle);
src/runtime2/tests/mod.rs
Show inline comments
 
@@ -115,18 +115,21 @@ fn test_intermediate_messenger() {
 
        auto num = 0;
 
        channel<T> tx_a -> rx_a;
 
        channel tx_b -> rx_b;
 
        new sender(tx_a, 1);
 
        new middleman(rx_a, tx_b, 2);
 
        new sender(tx_a, 3);
 
        new middleman(rx_a, tx_b, 3);
 
        new receiver(rx_b, 3);
 
    }
 

	
 
    composite constructor() {
 
        new constructor_template<u16>();
 
        // new constructor_template<u32>();
 
        // new constructor_template<u64>();
 
        new constructor_template<u32>();
 
        new constructor_template<u64>();
 
        new constructor_template<s16>();
 
        new constructor_template<s32>();
 
        new constructor_template<s64>();
 
    }
 
    ").expect("compilation");
 
    let rt = Runtime::new(1, true, pd);
 
    let rt = Runtime::new(3, true, pd);
 
    create_component(&rt, "", "constructor", no_args());
 
}
 

	
0 comments (0 inline, 0 general)