Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix[next][dace]: use logical and/or/xor operators, not bitwise #1872

Merged
merged 1 commit into from
Feb 18, 2025

Conversation

edopao
Copy link
Contributor

@edopao edopao commented Feb 17, 2025

The current mapping from GTIR logical operators to python code was inconsistent. The mapping was using bitwise operators instead of logical ones. This still resulted in functionally correct code because the boolean type has an integer representation in python language. This PR introduces the correct mapping, and leaves the dace toolchain and target compiler the possibility to generate optimized code.

@edopao edopao force-pushed the gtir-dace-logic_bool_operators branch from c8c5872 to 4f6dd88 Compare February 17, 2025 16:15
@edopao edopao changed the title feat[next][dace]: use logical and/or/xor operators, not bitwise fix[next][dace]: use logical and/or/xor operators, not bitwise Feb 18, 2025
Copy link
Contributor

@philip-paul-mueller philip-paul-mueller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@edopao edopao merged commit 0d65ae9 into GridTools:main Feb 18, 2025
23 checks passed
@edopao edopao deleted the gtir-dace-logic_bool_operators branch February 18, 2025 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants