[Libreoffice-commits] core.git: Branch 'feature/calc-group-interpreter' - sc/source
Michael Meeks
michael.meeks at suse.com
Tue Jul 9 04:00:41 PDT 2013
sc/source/core/opencl/openclwrapper.cxx | 9 +++++++--
sc/source/core/opencl/openclwrapper.hxx | 3 ++-
2 files changed, 9 insertions(+), 3 deletions(-)
New commits:
commit d037078fcd86527171f674cfd036a71c928d3721
Author: Michael Meeks <michael.meeks at suse.com>
Date: Tue Jul 9 12:02:43 2013 +0100
better opencl error reporting / diagnostics.
diff --git a/sc/source/core/opencl/openclwrapper.cxx b/sc/source/core/opencl/openclwrapper.cxx
index 0c83d94..6132ae3 100755
--- a/sc/source/core/opencl/openclwrapper.cxx
+++ b/sc/source/core/opencl/openclwrapper.cxx
@@ -2134,6 +2134,7 @@ double *OclCalc::OclSimpleDeltaOperation(OpCode eOp, const double *pOpArray,
size_t global_work_size[1];
kEnv.mpkKernel = clCreateKernel(kEnv.mpkProgram,kernelName, &clStatus);
+ CHECK_OPENCL(clStatus);
// Ugh - horrible redundant copying ...
cl_mem valuesCl = allocateDoubleBuffer(kEnv, pOpArray, nElements, &clStatus);
@@ -2150,12 +2151,16 @@ double *OclCalc::OclSimpleDeltaOperation(OpCode eOp, const double *pOpArray,
clStatus = clSetKernelArg(kEnv.mpkKernel, 0, sizeof(cl_mem),
(void *)&valuesCl);
+ CHECK_OPENCL(clStatus);
clStatus = clSetKernelArg(kEnv.mpkKernel, 1, sizeof(cl_mem),
(void *)&subtractCl);
- clStatus = clSetKernelArg(kEnv.mpkKernel, 2, sizeof(cl_mem),
+ CHECK_OPENCL(clStatus);
+ clStatus = clSetKernelArg(kEnv.mpkKernel, 2, sizeof(cl_int),
(void *)&start);
- clStatus = clSetKernelArg(kEnv.mpkKernel, 3, sizeof(cl_mem),
+ CHECK_OPENCL(clStatus);
+ clStatus = clSetKernelArg(kEnv.mpkKernel, 3, sizeof(cl_int),
(void *)&end);
+ CHECK_OPENCL(clStatus);
clStatus = clSetKernelArg(kEnv.mpkKernel, 4, sizeof(cl_mem),
(void *)&outputCl);
CHECK_OPENCL(clStatus);
diff --git a/sc/source/core/opencl/openclwrapper.hxx b/sc/source/core/opencl/openclwrapper.hxx
index 3405925..90c92ac 100755
--- a/sc/source/core/opencl/openclwrapper.hxx
+++ b/sc/source/core/opencl/openclwrapper.hxx
@@ -12,6 +12,7 @@
#include <config_features.h>
#include <formula/opcode.hxx>
+#include <sal/detail/log.h>
#include <cassert>
#include <CL/cl.h>
@@ -59,7 +60,7 @@ typedef int (*cl_kernel_function)(void **userdata, KernelEnv *kenv);
#define CHECK_OPENCL(status) \
if(status != CL_SUCCESS) \
{ \
- printf ("error code is %d.\n",status); \
+ printf ("OpenCL error code is %d at " SAL_DETAIL_WHERE "\n", status); \
return 0; \
}
More information about the Libreoffice-commits
mailing list