FLAMEGPU / FLAMEGPU2

FLAME GPU 2 is a GPU accelerated agent based modelling framework for CUDA C++ and Python
https://flamegpu.com
MIT License
105 stars 20 forks source link

BugFix: PyNative would fail to translate math fns inside message loops. #1077

Closed Robadob closed 1 year ago

Robadob commented 1 year ago

This affected the pynative tutorial from the documentation.

The prior code

            # message input iterator arg
            elif self._message_iterator_var:
                if t.value.id == self._message_iterator_var:

Would cause the branch to be taken if inside a message loop, but then if the message iterator var was not being used, it would break from that branch and fail to check the other conditions. Hence math and other functions inside message loops would not be translated.

Related: https://github.com/FLAMEGPU/FLAMEGPU2-docs/pull/150