[Libreoffice-commits] core.git: 2 commits - sc/source

Michael Meeks michael.meeks at collabora.com
Thu Nov 28 18:10:54 PST 2013


 sc/source/core/opencl/opencl_device.cxx |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 773527bad2f8e104fb700d6fa8ddf24790d7e4cc
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Fri Nov 29 02:04:15 2013 +0000

    GPU Calc: reflect the true cost of InterpretTail more accurately.
    
    Change-Id: I7004150569e5329f19d2f08adbd70477bd6252ff

diff --git a/sc/source/core/opencl/opencl_device.cxx b/sc/source/core/opencl/opencl_device.cxx
index 452848f..a91883f 100644
--- a/sc/source/core/opencl/opencl_device.cxx
+++ b/sc/source/core/opencl/opencl_device.cxx
@@ -376,9 +376,17 @@ ds_status evaluateScoreForDevice(ds_device* device, void* evalData)
             testData->output[j] = fAverage + (fMin * fSoP);
         }
 
+        // InterpretTail - the S/W fallback is nothing like as efficient
+        // as any good openCL implementation: no SIMD, tons of branching
+        // in the inner loops etc. Generously characterise it as only 10x
+        // slower than the above.
+        float fInterpretTailFactor = 10.0;
+
         device->score = (void*)new LibreOfficeDeviceScore;
         ((LibreOfficeDeviceScore*)device->score)->fTime = timerCurrent(&kernelTime);
         ((LibreOfficeDeviceScore*)device->score)->bNoCLErrors = true;
+
+        ((LibreOfficeDeviceScore*)device->score)->fTime *= fInterpretTailFactor;
     }
     return DS_SUCCESS;
 }
commit 1d140dc9ea30c7d16738c2dec03756c34fabc7e1
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Fri Nov 29 02:09:36 2013 +0000

    GPU Calc - disable printf console debugging.
    
    Change-Id: I2c9d1a82ec0159fae80a8e146d1218aa98895f65

diff --git a/sc/source/core/opencl/opencl_device.cxx b/sc/source/core/opencl/opencl_device.cxx
index 371cdbf..452848f 100644
--- a/sc/source/core/opencl/opencl_device.cxx
+++ b/sc/source/core/opencl/opencl_device.cxx
@@ -29,8 +29,8 @@
 #define OUTPUTSIZE 15360
 
 #define STRINGIFY(...) #__VA_ARGS__"\n"
-#define LOG_PRINTF(x) (std::cout << x << std::endl)
-//#define LOG_PRINTF(x)
+//#define LOG_PRINTF(x) (std::cout << x << std::endl)
+#define LOG_PRINTF(x)
 
 #define DS_CHECK_STATUS(status, name) \
     if (CL_SUCCESS != status) \


More information about the Libreoffice-commits mailing list