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

Disable casting in parblockencoder #660

Merged
merged 2 commits into from
Sep 26, 2022
Merged

Conversation

bobismijnnaam
Copy link
Contributor

@bobismijnnaam bobismijnnaam commented Jul 14, 2021

Parblockencoder inserts a cast like ((int) 0) for some examples (in particular, summation.c). Since floats are not supported, this cast is unnecessary, so it can be removed. This cast triggers also some inheritance code logic, which results in a broken program. To avoid that problem for now, the cast is also best removed. Hopefully in the future when the inheritance logic is better maybe the cast can be enabled again, such that if we want to also support floats for this we can implement it.

This PR relies on a fix in #658 (namely, trigger generation for programs using Reducible is not correct). When that PR is merged, this PR will start succeeding, and then this can be merged.

We sum with int instead of float in summation.c, since float hasn't been
support for a while. Since we only support int, casting is not
necessary. This also happens to avoid triggering some java type logic
which is interfering.
@bobismijnnaam bobismijnnaam temporarily deployed to Default July 14, 2021 12:15 Inactive
@bobismijnnaam bobismijnnaam marked this pull request as draft July 14, 2021 12:35
@bobismijnnaam bobismijnnaam temporarily deployed to Default July 14, 2021 12:49 Inactive
@bobismijnnaam bobismijnnaam temporarily deployed to Default July 14, 2021 12:49 Inactive
@pieter-bos pieter-bos marked this pull request as ready for review September 26, 2022 14:06
@pieter-bos pieter-bos merged commit 7fb0296 into dev Sep 26, 2022
@pieter-bos pieter-bos deleted the no-cast-in-parblockencoder branch September 27, 2022 11:45
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