summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2016-07-31 13:36:06 +0200
committerEike Rathke <erack@redhat.com>2016-08-01 13:29:35 +0000
commitd1ffaf5315497140dedbc67c78f14706591b314e (patch)
treee40dad0e14b252e8c0a49cc2a171ec1bf919d543
parent0380a6408030ad9db85b4be81095219d5572749b (diff)
sc: replace NAN macro with rtl::math::setNan
Change-Id: I38f52faf974a3481adbf20a3b2484324d322f5bc Reviewed-on: https://gerrit.libreoffice.org/27747 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
-rw-r--r--sc/source/core/opencl/formulagroupcl.cxx13
1 files changed, 1 insertions, 12 deletions
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index 29dc9f8b3aaf..ef46c4826a2d 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -82,17 +82,6 @@ static const char* publicFunc =
"double strequal(unsigned a, unsigned b) { return (a==b)?1.0:0; }\n"
;
-#ifdef _WIN32
-#ifndef NAN
-namespace {
-
-const unsigned long __nan[2] = {0xffffffff, 0x7fffffff};
-
-}
-#define NAN (*(const double*) __nan)
-#endif
-#endif
-
#include <list>
#include <map>
#include <iostream>
@@ -238,7 +227,7 @@ size_t VectorRef::Marshal( cl_kernel k, int argno, int, cl_program )
throw OpenCLError("clEnqueueMapBuffer", err, __FILE__, __LINE__);
for (size_t i = 0; i < szHostBuffer / sizeof(double); i++)
- pNanBuffer[i] = NAN;
+ rtl::math::setNan(&pNanBuffer[i]);
err = clEnqueueUnmapMemObject(kEnv.mpkCmdQueue, mpClmem,
pNanBuffer, 0, nullptr, nullptr);
// FIXME: Is it intentional to not throw an OpenCLError even if the clEnqueueUnmapMemObject() fails?