diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-07-11 11:30:42 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-07-11 12:06:04 +0300 |
commit | ca3c7595221073315661458fbabc08850c2b4e58 (patch) | |
tree | c4508b8b2ea856b5e663a969b89702cb0d618219 /sc | |
parent | 7051a13fb036f17ce2cfff8f778aaf180404ac9d (diff) |
Again: Use correct type for number of devices
The change from 7e00a3690edbf71d6c3e6c0670875485f65c567d was
(unintentionally, I hope) lost in a merge, it seems?
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: I08257782ff70fbfecd5c74bde9c7b9597aed2105
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/opencl/openclwrapper.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/source/core/opencl/openclwrapper.cxx b/sc/source/core/opencl/openclwrapper.cxx index 26c4c80043e6..e377dc1cfda4 100644 --- a/sc/source/core/opencl/openclwrapper.cxx +++ b/sc/source/core/opencl/openclwrapper.cxx @@ -238,7 +238,8 @@ int OpenclDevice::GeneratBinFromKernelSource(cl_program program, { unsigned int i = 0; cl_int status; - size_t *binarySizes, numDevices; + size_t *binarySizes; + cl_uint numDevices; cl_device_id *mpArryDevsID; char **binaries, *str = NULL; @@ -426,7 +427,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 *mpArryDevsID; FILE *fd, *fd1; const char* filename = "kernel.cl"; |