Kaydet (Commit) b15ded2e authored tarafından Luboš Luňák's avatar Luboš Luňák

work around nan() not propagating its argument with nVidia OpenCL

And added a check for this to cl-test.ods .

Change-Id: I9b62f2cbef46d5b3dc0adda2b97dda9b8465fe88
Reviewed-on: https://gerrit.libreoffice.org/63174
Tested-by: Jenkins
Reviewed-by: 's avatarLuboš Luňák <l.lunak@collabora.com>
üst e3290499
......@@ -47,6 +47,13 @@ static const char* const publicFunc =
"\n"
"double CreateDoubleError(ulong nErr)\n"
"{\n"
// nVidia OpenCL, at least on Linux, seems to ignore the argument to nan(),
// so using that would not propagate the type of error, work that around
// by directly constructing the proper IEEE double NaN value
// TODO: maybe use a better way to detect such systems?
"#ifdef cl_nv_pragma_unroll\n"
" return as_double(0x7FF8000000000000+nErr);\n"
"#endif\n"
" return nan(nErr);\n"
"}\n"
"\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment