summaryrefslogtreecommitdiff
path: root/sc/source/core/tool/arraysumSSE2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/tool/arraysumSSE2.cxx')
-rw-r--r--sc/source/core/tool/arraysumSSE2.cxx21
1 files changed, 11 insertions, 10 deletions
diff --git a/sc/source/core/tool/arraysumSSE2.cxx b/sc/source/core/tool/arraysumSSE2.cxx
index b4edb98286f9..1a5cc2f00dfe 100644
--- a/sc/source/core/tool/arraysumSSE2.cxx
+++ b/sc/source/core/tool/arraysumSSE2.cxx
@@ -20,7 +20,9 @@
namespace sc::op
{
-#ifdef LO_SSE2_AVAILABLE // Old processors
+#ifdef LO_SSE2_AVAILABLE
+
+bool hasSSE2Code() { return true; }
using namespace SSE2;
@@ -47,13 +49,10 @@ static inline void sumSSE2(__m128d& sum, __m128d& err, const __m128d& value)
sum = t;
}
-#endif
-
/** Execute Kahan sum with SSE2.
*/
KahanSumSimple executeSSE2(size_t& i, size_t nSize, const double* pCurrent)
{
-#ifdef LO_SSE2_AVAILABLE
// Make sure we don't fall out of bounds.
// This works by sums of 8 terms.
// So the 8'th term is i+7
@@ -120,13 +119,15 @@ KahanSumSimple executeSSE2(size_t& i, size_t nSize, const double* pCurrent)
return { sums[0], errs[0] };
}
return { 0.0, 0.0 };
-#else
- (void)i;
- (void)nSize;
- (void)pCurrent;
- abort();
-#endif
}
+
+#else // LO_SSE2_AVAILABLE
+
+bool hasSSE2Code() { return false; }
+
+KahanSumSimple executeSSE2(size_t&, size_t, const double*) { abort(); }
+
+#endif
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */