BOUT-dev icon indicating copy to clipboard operation
BOUT-dev copied to clipboard

Add .zpm for sign-independent coding

Open dschwoerer opened this issue 1 year ago • 3 comments

dschwoerer avatar Mar 19 '24 14:03 dschwoerer

This is a bit of a frustrating situation, I guess we didn't allow zp(-1) as it would involve extra branching to avoid negative numbers in the mod for periodicity. It would be good to know if this is really still a problem performance-wise.

ZedThree avatar Mar 19 '24 15:03 ZedThree

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] avatar Mar 19 '24 15:03 github-actions[bot]

I think it is not so bad - if you know the sign of the offset, you can pick a specific one, otherwise the other. Even if it is not an issue right now with a specific compiler, it might become one for a different compiler or architecture (e.g. GPUs)

If we allow z splitting, that anyway changes :sweat_smile:

dschwoerer avatar Mar 19 '24 16:03 dschwoerer