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

tier1::multiply_image_and_position_func() implicitly assumes that the position has the same type as the input. #287

Closed
thawn opened this issue Apr 28, 2024 · 1 comment
Labels
bug Something isn't working correctly

Comments

@thawn
Copy link
Collaborator

thawn commented Apr 28, 2024

currently, tier1::multiply_image_and_position_func() implicitly assumes that the position has the same type as the input, while it is actually of type uint32 (or even uint64?).

This is the root cause of bug 164 in pyclesperanto.

@thawn thawn added the bug Something isn't working correctly label Apr 28, 2024
thawn added a commit that referenced this issue Apr 28, 2024
for images of type int8, multiply_image_and_position was limited to positions < 256 (and for int16 to positions < 2^16), because the return type was the same as the image type. However int8 images can have positions larger than that because position indices are of type int32. This commit ensures that the return type is at least int32 so that multiply_image_and_position can handle positions larger than the maximum integer for int8 and int16 images.

closes issue tier1::multiply_image_and_position_func() implicitly assumes that the position has the same type as the input. #287
@StRigaud
Copy link
Member

StRigaud commented May 3, 2024

@StRigaud StRigaud closed this as completed May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

2 participants