Skip to content

Unexpected behaviour working with JITParticles and custom kernels #1232

Discussion options

You must be logged in to vote

Hi @VeckoTheGecko, comments to your two questions below

Using a simple nested if statement in a kernel causes a bugged output file (part of the if statement getting hit regardless of the condition, causing all particles to change instantly), while collapsing the nested if statement to an equivalent and causes no issues

Hmm, nested if-statements are not explicitly implemented in the codeconverter (which converts the python-code in Kernels to JIT-code. So I wouldn't be surprised that this goes wrong. I also don't know how to easily fix this, not how to give an explicit warning. I'll open an Issue and think about it. But much safer to use non-nested-if-statements!

Memory access violation …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by VeckoTheGecko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants