[Libreoffice-commits] core.git: sc/source
Tor Lillqvist
tml at collabora.com
Fri Dec 19 03:45:29 PST 2014
sc/source/core/opencl/formulagroupcl.cxx | 24 ++++++++++++++-
sc/source/core/opencl/formulagroupcl_public.hxx | 37 ------------------------
2 files changed, 23 insertions(+), 38 deletions(-)
New commits:
commit eee97f4bb3cfe1ed88f9d939e213ebb2fc052ea4
Author: Tor Lillqvist <tml at collabora.com>
Date: Fri Dec 19 13:31:59 2014 +0200
Kill pointless formulagroupcl_public.hxx, inline in only place where included
Change-Id: I344322736604c5cf5f471eed1abd1205a4c5d96a
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index c3ee932..2c77ee4 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 3b36770e..0000000
--- 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: */
More information about the Libreoffice-commits
mailing list