summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2015-01-08 14:39:31 +0200
committerTor Lillqvist <tml@collabora.com>2015-01-08 15:15:37 +0200
commit8e6514f9ca319a74f156f23023a35fd99761e9a2 (patch)
treebef193592f1ecd0b332a75f97b24515adfdd866f /sc
parent4188576f9368b689ae7cfa4cd3fdd17318605d85 (diff)
Bin obsolete conditional compilation
USE_FMIN_FMAX has been defined a long time. There is no information in any comment or in the commit that introduced it why one would not want to use the OpenCL fmin() and fmax() built-in functions (intrinsics). Keeping such stuff in the source code (and in the generated OpenCL code) is pointless and just makes it harder to read. Change-Id: Ibc0b950c0f16872867eb5eff089b33b00cb95028
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/opencl/formulagroupcl.cxx13
1 files changed, 2 insertions, 11 deletions
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index 07a283d6ca89..0fd192fb6678 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -31,8 +31,6 @@
#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)
@@ -48,13 +46,6 @@ static const char* publicFunc =
"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
@@ -1882,7 +1873,7 @@ public:
virtual std::string GetBottom() SAL_OVERRIDE { return "MAXFLOAT"; }
virtual std::string Gen2( const std::string& lhs, const std::string& rhs ) const SAL_OVERRIDE
{
- return "mcw_fmin(" + lhs + "," + rhs + ")";
+ return "fmin(" + lhs + "," + rhs + ")";
}
virtual std::string BinFuncName() const SAL_OVERRIDE { return "min"; }
};
@@ -1895,7 +1886,7 @@ public:
virtual std::string GetBottom() SAL_OVERRIDE { return "-MAXFLOAT"; }
virtual std::string Gen2( const std::string& lhs, const std::string& rhs ) const SAL_OVERRIDE
{
- return "mcw_fmax(" + lhs + "," + rhs + ")";
+ return "fmax(" + lhs + "," + rhs + ")";
}
virtual std::string BinFuncName() const SAL_OVERRIDE { return "max"; }
};