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

opencl rastercalc fix int input rasters and cast to float #8666

Merged
merged 1 commit into from Dec 14, 2018

Conversation

elpaso
Copy link
Contributor

@elpaso elpaso commented Dec 13, 2018

Cast to float all math operations because when the
input is not a float or a double opencl raises
an error regarding which override should pick.

By casting to float we are sure that the right
function will be called.

This patch also fixes the buffer sizes for short (16bit)
and int (32bit) and asserts that size of float is 32bit.

Also fixes the case when there is no input raster at all
and the calculation is only expression based.

Cast to float all math operations because when the
input is not a float or a double opencl raises
an error regarding which override should pick.

By casting to float we are sure that the right
function will be called.

This patch also fixes the buffer sizes for short (16bit)
and int (32bit) and asserts that siexe of float is 32bit.
@elpaso elpaso merged commit e58abfd into qgis:master Dec 14, 2018
@elpaso elpaso deleted the opencl-rastercalc-float-cast branch December 14, 2018 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant