Changeset - 71bf91201a18
[Not reviewed]
0 1 0
Christopher Esterhuyse - 5 years ago 2020-02-21 17:24:08
christopher.esterhuyse@gmail.com
laying out communications with bitmatrix
1 file changed with 8 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/runtime/experimental/api.rs
Show inline comments
 
@@ -592,17 +592,23 @@ impl Connected {
 

	
 
        // from back to front, swap_remove all machines with PROP_TO_REMOVE
 
        let machine_index_iter = self
 
            .ephemeral
 
            .bit_matrix
 
            .iter_entities_where_rev(&mut usize_buf, move |p| p[PROP_TO_REMOVE]);
 
        self.ephemeral.bit_matrix = Default::default(); // clear matrix
 
        for machine_index in machine_index_iter {
 
            self.ephemeral.machines.swap_remove(machine_index as usize);
 
            let machine = self.ephemeral.machines.swap_remove(machine_index as usize);
 
            drop(machine);
 
        }
 

	
 
        // from now on, the number
 
        let matrix_bounds = Pair { entity: self.ephemeral.machines.len() as u32 * 2, property: 8 };
 
        self.ephemeral.bit_matrix = BitMatrix::new(matrix_bounds); // clear propertties
 

	
 
        // !!! TODO poly run until solution is found
 

	
 
        // logically destructure self so we can read and write to different fields interleaved...
 
        let solution_assignments: Vec<(ChannelId, bool)> = vec![];
 
        let Self {
 
            components,
 
            ephemeral: Ephemeral { bit_matrix, assignment_to_bit_property, usize_buf, machines },
 
            ..
0 comments (0 inline, 0 general)