sc/source/core/opencl/formulagroupcl.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit 87dc0ee13feb8f1d6031ac77465141b9636c18d6 Author: Tor Lillqvist <t...@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 Reviewed-on: https://gerrit.libreoffice.org/14366 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx index 948b4ab..1348876 100644 --- a/sc/source/core/opencl/formulagroupcl.cxx +++ b/sc/source/core/opencl/formulagroupcl.cxx @@ -336,6 +336,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\ @@ -633,6 +637,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\
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits