[Libreoffice-commits] core.git: sc/source
Tor Lillqvist
tml at collabora.com
Sun Feb 8 01:06:17 PST 2015
sc/source/core/opencl/formulagroupcl.cxx | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 61f3f968f3c59608a17b3410630352ab0f70b4a5
Author: Tor Lillqvist <tml at collabora.com>
Date: Sun Feb 8 11:04:13 2015 +0200
Avoid OpenCL compilation error when multiple RAND() calls in a formula
Simply surround the Random123 code snippet with an ifdef guard.
Change-Id: I370a3c37226d31bfbe703e5b7936b2180aee1784
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index 993bd53..df56591 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -415,6 +415,10 @@ public:
// of course. Only the code that calculates the counter-based
// random number and what it needs is left.
ss << "\
+\n\
+#ifndef DEFINED_RANDOM123_STUFF\n\
+#define DEFINED_RANDOM123_STUFF\n\
+\n\
/*\n\
Copyright 2010-2011, D. E. Shaw Research.\n\
All rights reserved.\n\
@@ -712,6 +716,7 @@ threefry2x32 (threefry2x32_ctr_t in, threefry2x32_key_t k)\n\
{\n\
return threefry2x32_R (threefry2x32_rounds, in, k);\n\
}\n\
+#endif\n\
\n\
";
ss << "double " << mSymName << "_Random (int seed)\n\
More information about the Libreoffice-commits
mailing list