KhronosGroup / OpenCL-CTS

The OpenCL Conformance Tests
Apache License 2.0
184 stars 196 forks source link

conversions: fix ZeroNanToIntCases from https://github.com/KhronosGroup/OpenCL-CTS/pull/1975 #2030

Closed banan328 closed 1 month ago

banan328 commented 2 months ago

The handling of NaN values in the templated function was incorrect due to improper initialization of the input data source. Specifically, the function ZeroNanToIntCases used a global pointer gIn, which was not correctly set or did not point to the same data as the local input pointer s used in the non-templated implementation.

to solve the issue I updated the templated function ZeroNanToIntCases to take an additional parameter for the input data source. and then passed the correct input data (s) to the templated function during its invocation.