summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-07-04 15:13:03 +0300
committerTor Lillqvist <tml@iki.fi>2013-07-04 15:48:35 +0300
commit7e00a3690edbf71d6c3e6c0670875485f65c567d (patch)
treed0bd1586fdd5b81a9bb47a530de87434d497f58d
parent5dff961ba5fab6d451d9d993e076d190a93be495 (diff)
Use correct type for number of devices
The number returned by clGetProgramInfo(..., CL_PROGRAM_NUM_DEVICES, ...) and clGetContextInfo(..., CL_CONTEXT_NUM_DEVICES, ...) is of type cl_uint, not size_t. That makes a difference for 64-bit code. Change-Id: I1b494bf604dd87930484faed64042ed211b3d705
-rw-r--r--sc/source/core/opencl/openclwrapper.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/source/core/opencl/openclwrapper.cxx b/sc/source/core/opencl/openclwrapper.cxx
index f85f1723738e..9b9feaa24bb9 100644
--- a/sc/source/core/opencl/openclwrapper.cxx
+++ b/sc/source/core/opencl/openclwrapper.cxx
@@ -220,7 +220,8 @@ int OpenclDevice::GeneratBinFromKernelSource(cl_program program,
const char * clFileName) {
unsigned int i = 0;
cl_int status;
- size_t *binarySizes, numDevices;
+ size_t *binarySizes;
+ cl_uint numDevices;
cl_device_id *devices;
char **binaries, *str = NULL;
@@ -403,7 +404,7 @@ int OpenclDevice::CompileKernelFile(GPUEnv *gpuInfo, const char *buildOption) {
const char *source;
size_t source_size[1];
int b_error, binary_status, binaryExisted, idx;
- size_t numDevices;
+ cl_uint numDevices;
cl_device_id *devices;
FILE *fd, *fd1;
const char* filename = "kernel.cl";