Open dyingstraw opened 5 months ago
I just Implement for each just belows,but it does not work。
just like execute first set_interface here.
for_block = Block(name='For') for_block.add_input(name="for_array") for_block.add_output(name="for_out") for_block.add_output(name="for_index") for_block.add_output(name="for_final") def foreach_fn(self): array = self.get_interface("for_array") print("enter for:{}",array) for index,item in enumerate(array): print("enter for item:{}",item) **self.set_interface(name="for_out",value=item)** # just here self.set_interface(name="for_inex",value=index) self.set_interface(name="for_final",value=None) for_block.add_compute(foreach_fn)
Maybe I can modify the ComputeEngine?
do you want to add a switch statement as a block?
I just Implement for each just belows,but it does not work。
just like execute first set_interface here.
Maybe I can modify the ComputeEngine?