Skip to content

Commit

Permalink
Update create_component_bucket.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjl10 authored Dec 23, 2024
1 parent 8f9b257 commit 5f3d791
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl WriteWasm for CreateCmpBucket {
if self.number_of_cmp == 1 {
instructions.push(call(&format!("${}_create", self.symbol)));
if !self.has_inputs {
instructions.push(tee_local(producer.get_temp_tag())); //here we use $temp to keep the offset created subcomponet
instructions.push(tee_local(producer.get_temp_tag())); //here we use $temp to keep the offset created subcomponent
instructions.push(store32(None)); //store the offset given by create in the subcomponent address
instructions.push(get_local(producer.get_temp_tag()));
instructions.push(call(&format!("${}_run", self.symbol)));
Expand Down Expand Up @@ -120,7 +120,7 @@ impl WriteWasm for CreateCmpBucket {
//sub_component signal address start
instructions.push(call(&format!("${}_create", self.symbol)));
if !self.has_inputs {
instructions.push(tee_local(producer.get_temp_tag())); //here we use $temp to keep the offset created subcomponet
instructions.push(tee_local(producer.get_temp_tag())); //here we use $temp to keep the offset created subcomponent
instructions.push(store32(None)); //store the offset given by create in the subcomponent address
instructions.push(get_local(producer.get_temp_tag()));
instructions.push(call(&format!("${}_run", self.symbol)));
Expand Down Expand Up @@ -226,7 +226,7 @@ impl WriteC for CreateCmpBucket {
// if the array is complete traverse all its positions
if complete_array {
instructions.push(format!("for (uint i = 0; i < {}; i++) {{", self.number_of_cmp));
// update the value of the the parallel status if it is not uniform parallel using the array aux_parallel
// update the value of the parallel status if it is not uniform parallel using the array aux_parallel
if self.uniform_parallel.is_none(){
instructions.push(format!("bool status_parallel = aux_parallel[i];"));
}
Expand All @@ -237,7 +237,7 @@ impl WriteC for CreateCmpBucket {
instructions.push(format!("uint aux_positions [{}]= {};", self.defined_positions.len(), set_list(self.defined_positions.iter().map(|(x, _y)| *x).collect())));
instructions.push(format!("for (uint i_aux = 0; i_aux < {}; i_aux++) {{", self.defined_positions.len()));
instructions.push(format!("uint i = aux_positions[i_aux];"));
// update the value of the the parallel status if it is not uniform parallel using the array aux_parallel
// update the value of the parallel status if it is not uniform parallel using the array aux_parallel
if self.uniform_parallel.is_none(){
instructions.push(format!("bool status_parallel = aux_parallel[i_aux];"));
}
Expand Down

0 comments on commit 5f3d791

Please sign in to comment.