diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-12-19 13:31:59 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-12-19 13:36:53 +0200 |
commit | eee97f4bb3cfe1ed88f9d939e213ebb2fc052ea4 (patch) | |
tree | 34675a4db0adf972abe8c8e51b9f3ae111431896 | |
parent | d41bc0f7b328ed6c69b2c2822de00165cdc62c61 (diff) |
Kill pointless formulagroupcl_public.hxx, inline in only place where included
Change-Id: I344322736604c5cf5f471eed1abd1205a4c5d96a
-rw-r--r-- | sc/source/core/opencl/formulagroupcl.cxx | 24 | ||||
-rw-r--r-- | sc/source/core/opencl/formulagroupcl_public.hxx | 37 |
2 files changed, 23 insertions, 38 deletions
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx index c3ee9323c3d2..2c77ee4b2805 100644 --- a/sc/source/core/opencl/formulagroupcl.cxx +++ b/sc/source/core/opencl/formulagroupcl.cxx @@ -29,12 +29,34 @@ #include "op_array.hxx" #include "op_spreadsheet.hxx" #include "op_addin.hxx" + /// CONFIGURATIONS // Comment out this to turn off FMIN and FMAX intrinsics #define USE_FMIN_FMAX 1 #define REDUCE_THRESHOLD 201 // set to 4 for correctness testing. priority 1 #define UNROLLING_FACTOR 16 // set to 4 for correctness testing (if no reduce) -#include "formulagroupcl_public.hxx" + +static const char* publicFunc = + "int isNan(double a) { return isnan(a); }\n" + "double fsum_count(double a, double b, __private int *p) {\n" + " bool t = isNan(a);\n" + " (*p) += t?0:1;\n" + " return t?b:a+b;\n" + "}\n" + "double fsum(double a, double b) { return isNan(a)?b:a+b; }\n" + "double legalize(double a, double b) { return isNan(a)?b:a;}\n" + "double fsub(double a, double b) { return a-b; }\n" + "double fdiv(double a, double b) { return a/b; }\n" + "double strequal(unsigned a, unsigned b) { return (a==b)?1.0:0; }\n" +#ifdef USE_FMIN_FMAX + "double mcw_fmin(double a, double b) { return fmin(a, b); }\n" + "double mcw_fmax(double a, double b) { return fmax(a, b); }\n" +#else + "double mcw_fmin(double a, double b) { return a>b?b:a; }\n" + "double mcw_fmax(double a, double b) { return a>b?a:b; }\n" +#endif + ; + #ifdef WIN32 #ifndef NAN namespace { diff --git a/sc/source/core/opencl/formulagroupcl_public.hxx b/sc/source/core/opencl/formulagroupcl_public.hxx deleted file mode 100644 index 3b36770e6014..000000000000 --- a/sc/source/core/opencl/formulagroupcl_public.hxx +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#ifndef INCLUDED_SC_SOURCE_CORE_OPENCL_FORMULAGROUPCL_PUBLIC_HXX -#define INCLUDED_SC_SOURCE_CORE_OPENCL_FORMULAGROUPCL_PUBLIC_HXX - -const char* publicFunc = - "int isNan(double a) { return isnan(a); }\n" - "double fsum_count(double a, double b, __private int *p) {\n" - " bool t = isNan(a);\n" - " (*p) += t?0:1;\n" - " return t?b:a+b;\n" - "}\n" - "double fsum(double a, double b) { return isNan(a)?b:a+b; }\n" - "double legalize(double a, double b) { return isNan(a)?b:a;}\n" - "double fsub(double a, double b) { return a-b; }\n" - "double fdiv(double a, double b) { return a/b; }\n" - "double strequal(unsigned a, unsigned b) { return (a==b)?1.0:0; }\n" -#ifdef USE_FMIN_FMAX - "double mcw_fmin(double a, double b) { return fmin(a, b); }\n" - "double mcw_fmax(double a, double b) { return fmax(a, b); }\n" -#else - "double mcw_fmin(double a, double b) { return a>b?b:a; }\n" - "double mcw_fmax(double a, double b) { return a>b?a:b; }\n" -#endif - - ; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |